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 |
---|---|---|---|---|---|---|
Accessor d'escriptura de l'atribut koncept. | public void setKoncept(KoncepteParaula koncept) {
this.koncept = koncept;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAtk(){\n return atk;\n }",
"public int getAtk() {\n return atk;\n }",
"public KoncepteParaula getKoncept() {\n\t\treturn koncept;\n\t}",
"public int getTinta()\n {\n //COMPLETE\n return this.tinta;\n }",
"public int getNilaiBtn() {\n return nilaiBtn;\n }",
"public JButton getBtn_instrucciones() {\n return Btn_instrucciones;\n }",
"@Override\r\n public Object getAttribute() {\r\n return this.buttonKey;\r\n }",
"public int forma()\n {\n return Elemento.CUADRADA;\n }",
"public String getAzione() {\n return azione;\n }",
"public int getTipoAtaque(){return tipoAtaque;}",
"@Override\n public int getAltura(){\n return(super.getAltura());\n }",
"public NodoCaracter getArbolRaiz() {\n return inicio;\n }",
"public boolean getAButton() {\n\t\treturn getRawButton(A_Button);\n\t}",
"public int getAnio() { return this.anio; }",
"public String getAnfitrion() {\r\n\t\treturn anfitrion;\r\n\t}",
"public int getArmadura(){return armadura;}",
"private javax.swing.JButton getJButtonAceptar() {\n\t\tif(jButtonAceptar == null) {\n\t\t\tjButtonAceptar = new JHighlightButton();\n\t\t\tjButtonAceptar.setText(\"Aceptar\");\n\t\t\tjButtonAceptar.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButtonAceptar.setIcon(new ImageIcon(getClass().getResource(\"/com/becoblohm/cr/gui/resources/icons/ix16x16/check2.png\")));\n\t\t}\n\t\treturn jButtonAceptar;\n\t}",
"int getAtk();",
"public java.lang.CharSequence getKullaniciAdi() {\n return kullanici_adi;\n }",
"public int getButacas() {\r\n\t\treturn butacas;\r\n\t}",
"public Number getAncho()\n {\n return (Number)getAttributeInternal(ANCHO);\n }",
"public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }",
"public char getSezione() {\r\n return this.sezione;\r\n }",
"public JButton getComenzar() {\n return comenzar;\n }",
"public java.lang.CharSequence getKullaniciAdi() {\n return kullanici_adi;\n }",
"public boolean getAButton() {\n\t\treturn getRawButton(A_BUTTON);\n\t}",
"public int getAnio()\r\n {\r\n return this._anio;\r\n }",
"protected int getTreinAantal(){\r\n return treinaantal;\r\n }",
"public String getAsignar() {\r\n return asignar;\r\n }",
"public CtrlAcesso getCtrlA() {\r\n return this.ctrlAcesso;\r\n }",
"public int getAtk()\r\n {\r\n return attack;\r\n }",
"public abstract String getManipulatorButtonLabel();",
"public char getSezione() {\r\n return this.sezione;\r\n }",
"public String getTxtKondektur() {\n return txtKondektur.getText();\n }",
"public String getAesthetic() {\n return aesthetic;\n }",
"public int getAltura(){\n return this._altura;\n }",
"public static int getLicznikTur() { return LicznikTur; }",
"public char getTav()\r\n\t{\r\n\t\treturn this.tav;\r\n\t}",
"public String getKontaktai() {\r\n\t\treturn kontaktai;\r\n\t}",
"public abstract java.lang.String getAcma_valor();",
"public int getPantallaApunta() {\r\n return this.iPantallaApunta;\r\n }",
"public char getIcon() {\n return this.icon;\n }",
"public String getEtiqueta()\n/* 27: */ {\n/* 28:41 */ return this.etiqueta;\n/* 29: */ }",
"public String getattribut() \n\t{\n\t\treturn attribut;\n\t}",
"Appearance getAppearance();",
"public String getAsignatura() {\n return (sAsignatura);\n }",
"public int getAncho() {\n return animacion.getImagen().getIconWidth();\n }",
"public int getAncho() {\n\t\treturn ancho;\n\t}",
"public HTMLInputElement getElementTablaKey() { return this.$element_TablaKey; }",
"public abstract java.lang.String getAcma_cierre();",
"public HTMLInputElement getElementBtnAyuda() { return this.$element_BtnAyuda; }",
"public byte getAmortization() {\n return amortization;\n }",
"String getControllingAttributeName();",
"public String getAutorizacion()\r\n/* 134: */ {\r\n/* 135:226 */ return this.autorizacion;\r\n/* 136: */ }",
"public ID getActionCodeRXA() { \r\n\t\tID retVal = this.getTypedField(21, 0);\r\n\t\treturn retVal;\r\n }",
"public char getopcion(){\n return opciones;\n }",
"public Animale getAnimaleACaso(){\n\t\tthrow new NotImplementedException();\r\n\t}",
"private JButton getZahrajTlacitko() {\n\t\tif (zahrajTlacitko == null) {\n\t\t\tzahrajTlacitko = new JButton();\n\t\t\tzahrajTlacitko.setText(\"Zahraj\");\n\t\t\tzahrajTlacitko.setSize(new Dimension(100, 30));\n\t\t\tzahrajTlacitko.setLocation(new Point(20, 81));\n\t\t\tzahrajTlacitko\n\t\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t\t\t\t\t\t\tsyntetizator.hraj(priklad);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t}\n\t\treturn zahrajTlacitko;\n\t}",
"public JoystickButton getButtonA() {\n\t\treturn button[0];\n\t}",
"public int acab()\n\t\t{\n\t\t\treturn this.acabe;\n\t\t}",
"@Override\n public int altura() {\n return altura(this.raiz);\n }",
"public abstract java.lang.Short getHabilitado();",
"public String getNameAktivitaet() {\n return nameAktivitaet;\n }",
"@Override\r\n\tpublic String getIzena() {\n\t\treturn super.getIzena();\r\n\t}",
"public int getAlcance() {\n return alcance;\n }",
"public int getAp(){\n\t\treturn ap;\n\t}",
"public MapeadorAtributos getMapeadorAtributos();",
"public static CtrlObras getInstancia() {\r\n return unicaInstancia;\r\n }",
"public boolean getAceptarKeyLikeTabKey() {\r\n\t\treturn fieldAceptarKeyLikeTabKey;\r\n\t}",
"public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}",
"public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }",
"public char getRender() {\n\n return (animalChar);\n }",
"public IfcCharacterStyleSelect getTextCharacterAppearance() {\n return textCharacterAppearance;\n }",
"public void asetaTeksti(){\n }",
"public int getAantalVerwerkt() {\n return aantalVerwerkt;\n }",
"private byte attributes() {\n return (byte) buffer.getShort(ATTRIBUTES_OFFSET);\n }",
"public String getApodo(){\n\t\treturn apodo;\n\t}",
"public int getAtaque() {\r\n\t\treturn this.unidad.getAtaque() + INCREMENTO_ATAQUE;\r\n\t}",
"void tampilKarakterA();",
"public int koko() {\n return this.arvoja;\n }",
"public String konus() {\n\t\treturn this.getIsim()+\" havliyor\";\n\t}",
"public int getIcon()\n\t{\n\t\treturn getClass().getAnnotation(AccuAction.class).icon();\n\t}",
"public TipeKamar getTipeKamar()\r\n {\r\n return TIPE_KAMAR;\r\n }",
"public String getCitta() {\n return citta;\n }",
"Debut getDebut();",
"public int getPunktyZaWejscie() {\n return punktyZaWejscie;\n }",
"public String getAccession() {\n return accession;\n }",
"String getEtiqueta();",
"public int getAtt(){ \r\n return att;\r\n }",
"public abstract java.lang.String getAcma_descripcion();",
"public String getKey() {\n return this.diccionario.key;\n }",
"public Integer getAncho() {\r\n return ancho;\r\n }",
"public int mo1950a() {\n return this.f1924a;\n }",
"public JButton getBoton1(){\n return this.perfilBT;\n }",
"public int getAnnoIscrizione() {\n\t\treturn annoIscrizione;\n\t}",
"public Short getShortAttribute();",
"public String getSecretariat() {\n return secretariat;\n }",
"public static String symbol() {\n return \"ALT\";\n }",
"public java.lang.Boolean getAktif() {\n return aktif;\n }",
"public String getTorihikisakicd() {\r\n return torihikisakicd;\r\n }",
"@Basic( optional = true )\r\n\t@Column( length = 1 )\r\n\tpublic String getAktif() {\r\n\t\treturn this.aktif;\r\n\t\t\r\n\t}"
] | [
"0.61751044",
"0.60988426",
"0.6051074",
"0.60037434",
"0.59550416",
"0.586683",
"0.58485276",
"0.58350843",
"0.57939494",
"0.57924783",
"0.573768",
"0.573096",
"0.56699705",
"0.5654258",
"0.56293607",
"0.562377",
"0.56155884",
"0.5604977",
"0.5584053",
"0.5581108",
"0.55747086",
"0.55646145",
"0.5553345",
"0.5543617",
"0.55414945",
"0.5539421",
"0.5537853",
"0.5525178",
"0.5524392",
"0.5513382",
"0.55127496",
"0.5492867",
"0.5482848",
"0.54395175",
"0.5428993",
"0.54289746",
"0.54243535",
"0.54208493",
"0.5411155",
"0.54030055",
"0.53962725",
"0.53922975",
"0.538748",
"0.5386503",
"0.5385817",
"0.5381918",
"0.53808254",
"0.5350784",
"0.53442025",
"0.53427386",
"0.53349406",
"0.53294194",
"0.5311298",
"0.53084475",
"0.5303714",
"0.5303702",
"0.52823764",
"0.5279899",
"0.52756006",
"0.52749604",
"0.5254682",
"0.5244281",
"0.52304614",
"0.52271205",
"0.5224351",
"0.5220556",
"0.5219232",
"0.5214241",
"0.5213617",
"0.52092516",
"0.52086693",
"0.5205596",
"0.5202678",
"0.51980895",
"0.5196716",
"0.51943755",
"0.5190061",
"0.5187298",
"0.51818794",
"0.5181065",
"0.5180572",
"0.51771",
"0.5176558",
"0.51757634",
"0.5174223",
"0.51733917",
"0.5170343",
"0.516857",
"0.5164039",
"0.5163072",
"0.5161554",
"0.5159213",
"0.51578915",
"0.5157209",
"0.5154737",
"0.51526445",
"0.51466125",
"0.51406306",
"0.51393735",
"0.5138661",
"0.513483"
] | 0.0 | -1 |
Created by xaksamit on 10.3.17. | public interface UserManager {
/**
* Creates new User
* @exception IllegalArgumentException
* @param user to be created
*/
void createUser(User user);
/**
* Updates existing User
* @exception IllegalArgumentException
* @param user to be updated to
*/
void updateUser(User user);
/**
* Deletes existing User
* @exception IllegalArgumentException
* @param user to be deleted
*/
void deleteUser(User user);
/**
* Finds user with specific id
* @exception IllegalArgumentException
* @param id with which User should be deleted
* @return User with specific id
*/
User getUser(Long id);
/**
* Finds user with specific email
* @exception IllegalArgumentException
* @param email with which user will be returned
* @return user with specific email
*/
User getUserByEmail(String email);
/**
* Finds list of users with specific name
* @exception IllegalArgumentException
* @param name with which user will be returned
* @return List of users with specific name
*/
List<User> getUserByName(String name);
/**
* Finds all users
* @return list of users
*/
List<User> getAllUsers();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public final void mo51373a() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private void poetries() {\n\n\t}",
"private void init() {\n\n\t}",
"private void kk12() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void anular() {\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\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void mo6081a() {\n }",
"private void strin() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"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 sacrifier() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n 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 init() {}",
"@Override\n protected void init() {\n }",
"@Override\n public void init() {}",
"protected void mo6255a() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"private void init() {\n\n\n\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"static void feladat4() {\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void mo55254a() {\n }",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"Petunia() {\r\n\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"private void initialize() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"static void feladat9() {\n\t}",
"public void mo12930a() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}"
] | [
"0.58760893",
"0.5856834",
"0.57864094",
"0.56888855",
"0.5653693",
"0.56152755",
"0.5594994",
"0.5594994",
"0.5581084",
"0.5558404",
"0.5536378",
"0.55351317",
"0.55335987",
"0.55311316",
"0.5529862",
"0.5516026",
"0.5514229",
"0.55071235",
"0.5503244",
"0.549621",
"0.54910225",
"0.54882026",
"0.5486734",
"0.54826456",
"0.5476739",
"0.5476739",
"0.5476739",
"0.5476739",
"0.5476739",
"0.5465945",
"0.54537326",
"0.54383147",
"0.5435622",
"0.5434068",
"0.5434068",
"0.541297",
"0.539521",
"0.53942245",
"0.53870666",
"0.5387008",
"0.5387008",
"0.5380388",
"0.5375178",
"0.5375178",
"0.5375178",
"0.5375178",
"0.5375178",
"0.5375178",
"0.5375178",
"0.5366252",
"0.53566337",
"0.53511965",
"0.5344257",
"0.5342432",
"0.5342432",
"0.5342432",
"0.5339225",
"0.5330969",
"0.5321992",
"0.5321992",
"0.5321992",
"0.53216124",
"0.53192806",
"0.53192806",
"0.53192806",
"0.53148234",
"0.53148234",
"0.53148234",
"0.53148234",
"0.53148234",
"0.53148234",
"0.5308991",
"0.5307566",
"0.53075653",
"0.5305356",
"0.53005743",
"0.52919275",
"0.52908415",
"0.52908415",
"0.52908105",
"0.52714765",
"0.52711105",
"0.5263927",
"0.52632725",
"0.5254646",
"0.5254438",
"0.52490413",
"0.5244855",
"0.52403104",
"0.5229138",
"0.5228703",
"0.5219473",
"0.5214646",
"0.52044207",
"0.51962435",
"0.51922995",
"0.5190365",
"0.5184036",
"0.5178361",
"0.5177365",
"0.5176742"
] | 0.0 | -1 |
Finds user with specific id | User getUser(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}",
"@Override\r\n\tpublic User searchUser(Integer id) {\n\t\treturn userReposotory.getById(id);\r\n\t}",
"public User findUser(int id) {\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n return allUsers.get(i);\n }\n }\n return null;\n }",
"@Override\r\n\tpublic Userinfo findbyid(int id) {\n\t\treturn userDAO.searchUserById(id);\r\n\t}",
"public User findUser(int id)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (id == (users.get(i).getId()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"User find(long id);",
"private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }",
"public static User findUserById(int id) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserById = \"SELECT * FROM public.member \"\n + \"WHERE id = '\" + id + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserById);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"@Override\n\tpublic User findUser(int id) {\n\n\t\tUser user = em.find(User.class, id);\n\n\t\treturn user;\n\t}",
"public static User findUser(int id) {\r\n return null;\r\n }",
"@RequestMapping(value = \"/find/{id}\", method = RequestMethod.GET)\n @ResponseBody\n public ResponseEntity findUser(@PathVariable long id) {\n User user = userService.findById(id);\n if (user == null) {\n return new ResponseEntity(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity(user, HttpStatus.OK);\n }",
"public User findUser(int id) {\n\n\t\ttry {\n\t\t\tConnection conn = getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from users where id = ?\");\n\t\t\tps.setInt(1, id);\n\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUser foundUser = new User(id, rs.getString(2), rs.getString(3), rs.getString(5),\n\t\t\t\t\t\trs.getDate(6));\n\t\t\t\tconn.close();\n\t\t\t\treturn foundUser;\n\n\t\t\t}\n\t\t\tconn.close();\n\n\t\t} catch (SQLException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn null;\n\t}",
"public User findUserById(int id);",
"@Override\n public User findById(Integer id) {\n try {\n return runner.query(con.getThreadConnection(),\"select *from user where id=?\",new BeanHandler<User>(User.class),id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }",
"@Override\n public UserInfo findById(int id) {\n TypedQuery<UserInfo> query = entityManager.createNamedQuery(\"findUserById\", UserInfo.class);\n query.setParameter(\"id\", id);\n return query.getSingleResult();\n }",
"@Override\r\n\tpublic User findByIdUser(Integer id) {\n\t\treturn userReposotory.findById(id).get();\r\n\t}",
"User findUserById(Long id) throws Exception;",
"@Override\n\tpublic User findUserById(int id) {\n\t\treturn userDao.findUserById(id);\n\t}",
"@Override\r\n\tpublic User findById(int id) {\n\t\treturn userDAO.findById(id);\r\n\t}",
"@Override\r\n public Dorm findById(Integer id) {\n return userMapper.findById(id);\r\n }",
"User findUser(String userId);",
"public User findById(Long id){\n return userRepository.findOne(id);\n }",
"@Override\r\n public IUser getUserByUserId(String id)\r\n {\r\n EntityManager em = getEntityManager();\r\n\r\n try\r\n {\r\n return em.find(User.class, id);\r\n }\r\n finally\r\n {\r\n em.close();\r\n }\r\n }",
"Optional<User> findUser(int id) throws ServiceException;",
"public User getUserById(String id){\n\t\tUser e;\n\t\tfor (int i = 0 ; i < users.size() ; i++){\n\t\t\te = users.get(i);\n\t\t\tif (e.getId().equals(id))\n\t\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}",
"public String findUser(String id) throws UserNotFoundException{\n\t\tString userFound = \"\";\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tif (users.get(i).getDocumentNumber().equals(id)) {\n\t\t\t\tuserFound = \"\\n-------USER-------\\n\"+users.get(i).toString();\n\t\t\t}\n\t\t}\n\t\tif (userFound.equals(\"\")) {\n\t\t\tthrow new UserNotFoundException(id);\n\t\t}\n\t\telse {\n\t\t\treturn userFound;\n\t\t}\n\t}",
"public User user(long id) {\n\t\tOptional<User> user = repository.findById(id);\n\n\t\tif (user.isPresent()) {\n\t\t\treturn user.get();\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"User com o Id: \" + id + \" não encontrado em nossa base de dados!\");\n\t\t}\n\n\t}",
"User getUserById(int id);",
"public User findById(Long id) {\n return genericRepository.find(User.class, id);\n }",
"User findUserById(int id);",
"@Override\n\tpublic User findByUserid(Serializable id) {\n\t\treturn this.userDao.findById(id);\n\t}",
"public User findById(Long id);",
"public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }",
"@Override\n\tpublic User findUserByUserId(long id) {\n\t\treturn userDao.getUserByUserId(id);\n\t}",
"@Override\r\n\tpublic TbUser findUserById(Long id) {\n\t\tTbUser tbUser = tbUserMapper.selectByPrimaryKey(id);\r\n\t\treturn tbUser;\r\n\t}",
"public User findUserById(Long id) {\n \tOptional<User> u = userRepository.findById(id);\n \t\n \tif(u.isPresent()) {\n return u.get();\n \t} else {\n \t return null;\n \t}\n }",
"public User findUserById (long id){\n if(userRepository.existsById(id)){\n return this.userRepository.findById(id);\n }else{\n throw new UnknownUserException(\"This user doesn't exist in our database\");\n }\n }",
"User getUserById(Long id);",
"User getUserById(Long id);",
"public User getUser(Integer id)\n\t{\n\t\t// Create an user -1 for when it isn't in the list\n\t\tUser searchUser = new User();\n\t\t// Index: User's position in the list\n\t\tint index = this.getUserById(id.intValue());\n\t\t// If the user is in the list execute the action\n\t\tif(index != -1)\n\t\t{\n\t\t\tsearchUser = this.usersList.get(index);\n\t\t}\n\t\t\n\t\treturn searchUser;\n\t}",
"@Override\n public User findById(long id) {\n return dao.findById(id);\n }",
"@Override\n\tpublic User findById(String id) {\n\t\tUser u= em.find(User.class, id);\n\t\tSystem.out.println(u);\n\t\treturn u;\n\t}",
"public Users findByUserid(String id) {\n\tthis.createConnection();\n\n try {\n Connection con = this.getCon();\n PreparedStatement stmnt = con.prepareStatement(\"select * from user where id=?;\");\n stmnt.setString(1, id);\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQLException: \");\n return new Users();\n }\n }",
"public static User findById(final String id) {\n return find.byId(id);\n\n }",
"public User findById(int id) {\n\t\tString sql = \"SELECT * FROM VIDEOGAMESTORES.USERS WHERE ID=\" +id;\n\t\n\t\ttry {\n\t\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(sql);\n\t\t\twhile(srs.next())\n\t\t\t{\n\t\t\t\t// Add a new User to the list for every row that is returned\n\t\t\t\treturn new User(srs.getString(\"USERNAME\"), srs.getString(\"PASSWORD\"), srs.getString(\"EMAIL\"),\n\t\t\t\t\t\tsrs.getString(\"FIRST_NAME\"), srs.getString(\"LAST_NAME\"), srs.getInt(\"GENDER\"), srs.getInt(\"USER_PRIVILEGE\"), srs.getInt(\"ID\"));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public User findById(int id) {\n\t\treturn userRepository.findOne(id);\n\t}",
"public User getUserFromID(String id) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"_id\", new ObjectId(id));\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"@RequestMapping(method=RequestMethod.GET, value=\"{id}\")\n\tpublic User getUser(@PathVariable Long id) {\n\t\treturn RestPreconditions.checkFound(repo.findByUserId(id));\n\t}",
"public User getUserById(Long id) throws Exception;",
"@Override\r\n\tpublic User getUserById(int id) {\n\t\treturn userMapper.selById(id);\r\n\t}",
"User findById(long id);",
"User findById(Long id);",
"private int getUserById(int id)\n\t{\n\t\tint index = -1;\n\t\t// Search the user in the list\n\t\tfor(int i = 0; i < this.usersList.size(); i++)\n\t\t{\n\t\t\tif(this.usersList.get(i).getId() == id)\n\t\t\t{\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Return the index \n\t\treturn index;\n\t}",
"@Override\n\tpublic boolean findUser(String findId) {\n\t\tif(session.selectOne(namespace + \".searchUser\", findId) != null)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public User findOneUser(int id) {\n\t\treturn userMapper.findOneUser(id);\r\n\t}",
"@Override\r\n\tpublic SpUser findById(String id) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic User findNeedById(int id) {\n\t\treturn userdao.findNeedById(id);\n\t}",
"public User getUser(long id){\n User user = userRepository.findById(id);\n if (user != null){\n return user;\n } else throw new UserNotFoundException(\"User not found for user_id=\" + id);\n }",
"public UserDTO getUserById(long id) {\n return Optional.of(ObjectMapperUtility.map(dao.findById(id), UserDTO.class))\n .orElseThrow(() -> new UserNotFoundException(\"No users with matching id \" + id));\n // return Optional.of(dao.findById(id)).get().orElseThrow(()-> new UserNotFoundException(\"No users with\n // match\"));\n }",
"@GET\n\t@Path(\"/id\")\n\t@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n\tpublic Response findById(@QueryParam(\"id\") Long id) throws JsonGenerationException, JsonMappingException, IOException {\n\t\t\n\t\tUser userById = userDao.getUserById(id);\n\t\t\n\t\tif (userById != null) {\n\t\t\treturn Response\n\t\t\t\t\t.status(200)\n\t\t\t\t\t.entity(userById)\n\t\t\t\t\t.header(\"Access-Control-Allow-Headers\", \"X-extra-header\")\n\t\t\t\t\t.allow(\"OPTIONS\")\n\t\t\t\t\t.build();\n\t\t} else {\n\t\t\treturn Response\n\t\t\t\t\t.status(404)\n\t\t\t\t\t.entity(\"The user with the id \" + id + \" does not exist\")\t\t\t\t\t\n\t\t\t\t\t.build();\n\t\t}\n\t}",
"@Override\r\n\tpublic User findById(int id) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic AnswerCustom finduser(Integer id) throws Exception {\n\t\treturn null;\n\t}",
"public User findById(String id) {\n\t\treturn userDao.findById(id);\n\t}",
"public User getUser(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n User user = null;\n try {\n tx = session.beginTransaction();\n\n // Add restriction to get user with username\n Criterion emailCr = Restrictions.idEq(id);\n Criteria cr = session.createCriteria(User.class);\n cr.add(emailCr);\n user = (User)cr.uniqueResult();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return user;\n }",
"public UserEntity containsUserAndValid(long id) {\n Query query = manager.createQuery(\"select e from UserEntity e where e.id=:id\");\n List<UserEntity> list = query.setParameter(\"id\", id).getResultList();\n if (list.size() > 0) {\n UserEntity entity = list.get(0);\n FindIterable<Document> users = database.getCollection(\"users\").find(Filters.and(\n Filters.eq(UserMongo.objectId, new ObjectId(entity.getMongoId())),\n Filters.eq(UserMongo.isAccept, true),\n Filters.eq(UserMongo.isActive, true),\n Filters.or(\n Filters.eq(UserMongo.role, Role.manager),\n Filters.eq(UserMongo.role, Role.teacher)\n )\n ));\n if (users.iterator().hasNext()) {\n return entity;\n }\n }\n return null;\n }",
"User findOne(Long id);",
"public Usuario findUserById(Integer id){\n\t\treturn usuarios.findById(id);\n\t}",
"private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }",
"public User findById(long id) {\n return store.findById(id);\n }",
"@Override\r\n\tpublic User user(int id) {\r\n\t\tMap<String,String> map = getOne(SELECT_USERS+ WHERE_ID, id);\r\n\t\tif(map!= null){\r\n\t\t\treturn IMappable.fromMap(User.class, map);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Person findUserById(Integer id) {\n\t\treturn null;\n\t}",
"public User findById(int userId);",
"@Override\n\tpublic User getUser(int id) {\n\t\treturn userRepository.findById(id);\n\t}",
"@Override\n public TechGalleryUser getUser(final Long id) throws NotFoundException {\n TechGalleryUser userEntity = userDao.findById(id);\n // if user is null, return a not found exception\n if (userEntity == null) {\n throw new NotFoundException(i18n.t(\"No user was found.\"));\n } else {\n return userEntity;\n }\n }",
"public User getUserById(String id) {\n // return userRepo.findById(id);\n\n return null;\n }",
"@Override\n\tpublic Users findByID(int id) {\n\t\treturn usersDAO.findByID(id);\n\t}",
"@Override\n public ResponseEntity<User> findById(Long id) {\n User res_data = userRepository.findById(id).get();\n if (res_data != null) {\n return new ResponseEntity<>(res_data, HttpStatus.OK);\n }\n return new ResponseEntity<>((User) res_data, HttpStatus.NOT_FOUND);\n }",
"@Override\n\tpublic User find(int id) {\n\t\tSystem.out.println(\"OracleDao is find\");\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic User getUserByID(int id) {\n\t\treturn userMapper.getUserByID(id);\r\n\t}",
"public User read(String id);",
"@Override\n\tpublic User selectUserById(int id) {\n\t\tUser user = null;\n\t\ttry {\n\t\t\tuser = (User) client.queryForObject(\"selectUserById\", id);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn user;\n\n\t}",
"@GetMapping(\"consumer/find/{id}\")\n public User findby (@PathVariable(\"id\") Integer id) {\n return restTemplate.getForObject(\"http://provider-user/provider/find/\" + id, User.class);\n }",
"public User findUserByName(String id) {\n return em.find(User.class, id);\n }",
"public Optional<User> findById(Integer id);",
"public User findById(int id) {\n\t\treturn this.getHibernateTemplate().load(User.class, id);// session.load()\r\n\t}",
"public UserInformation findInformationById(int id);",
"User getOne(long id) throws NotFoundException;",
"public User getUserFromId(final long id) {\n LOG.info(\"Getting user with id {}\", id);\n return userRepo.get(id);\n }",
"@Override\n\tpublic User findById(String id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic SmbmsUser findById(int id) {\n\t\treturn sud.findById(id);\n\t}",
"public User findUserById(Long id) throws DBException {\n\t\tUser user = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = DBManager.getInstance().getConnection();\n\t\t\tpstmt = con.prepareStatement(SQL_FIND_USER_BY_ID);\n\t\t\tpstmt.setLong(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tuser = extractUser(rs);\n\t\t\t}\n\t\t\tcon.commit();\n\t\t} catch (SQLException ex) {\n\t\t\tDBManager.getInstance().rollback(con);\n\t\t\tLOG.error(Messages.ERR_CANNOT_FIND_USER_BY_ID, ex);\n\t\t\tthrow new DBException(Messages.ERR_CANNOT_FIND_USER_BY_ID, ex);\n\t\t} finally {\n\t\t\tDBManager.getInstance().close(con, pstmt, rs);\n\t\t}\n\t\treturn user;\n\n\t}",
"public abstract FoursquareUser findFoursquareUser(String id);",
"@Override\r\n\tpublic UserMain findId(String id) {\n\t\treturn (UserMain) usermaindao.findbyId(id).get(0);\r\n\t}",
"public User getUserById(int id) {\n System.out.println(id + this.userDao.selectId(id).getUsername());\n\n return this.userDao.selectId(id);\n }",
"public User getUserById(Long userId);",
"public Users getUser(Integer id) {\r\n\t\treturn usDao.findById(id, true);\r\n\r\n\t}",
"public UserEntity findByPrimaryKey(String userId) throws FinderException;",
"User findOneById(long id);",
"private User getUser(Long id) {\n\t\tEntityManager mgr = getEntityManager();\n\t\tUser user = null;\n\t\ttry {\n\t\t\tuser = mgr.find(User.class, id);\n\t\t} finally {\n\t\t\tmgr.close();\n\t\t}\n\t\treturn user;\n\t}",
"@Override\n\tpublic User findById(int userid) {\n\t\tSystem.out.println(\"Inside findOne of UserService\");\n\t\tOptional<User> user = userdao.findById(userid);\n//\t\treturn dao.findById(id);\n\t\treturn user.get();\n\t}"
] | [
"0.8024627",
"0.7972367",
"0.7965203",
"0.79257464",
"0.7833512",
"0.77927333",
"0.7773359",
"0.7748306",
"0.76517594",
"0.76395124",
"0.7541372",
"0.7540856",
"0.75406545",
"0.7538977",
"0.75260526",
"0.7525195",
"0.75244206",
"0.75228745",
"0.75064534",
"0.7500155",
"0.74761695",
"0.7470715",
"0.7470064",
"0.7458484",
"0.74537903",
"0.74210835",
"0.7417901",
"0.74093837",
"0.7378674",
"0.7378249",
"0.73781836",
"0.7367783",
"0.7365901",
"0.7348412",
"0.734532",
"0.7343819",
"0.7343101",
"0.73417675",
"0.73417675",
"0.73376614",
"0.7335772",
"0.733163",
"0.7329192",
"0.7318165",
"0.72883123",
"0.7287106",
"0.72806406",
"0.7275917",
"0.72429085",
"0.72424495",
"0.7222826",
"0.72209555",
"0.7208018",
"0.7200752",
"0.719675",
"0.71934354",
"0.7189433",
"0.7185868",
"0.71734446",
"0.716904",
"0.7136585",
"0.71338606",
"0.71239364",
"0.71204776",
"0.71127033",
"0.7108415",
"0.710351",
"0.7094941",
"0.70824164",
"0.70809567",
"0.7071348",
"0.70598763",
"0.7059402",
"0.7055498",
"0.70553774",
"0.7047324",
"0.7034742",
"0.70333594",
"0.7028",
"0.70177555",
"0.70130664",
"0.7012279",
"0.7010889",
"0.7007362",
"0.70019305",
"0.6994624",
"0.6994093",
"0.6983496",
"0.6980509",
"0.6966921",
"0.69650626",
"0.6955898",
"0.69483095",
"0.69453716",
"0.6945341",
"0.69445235",
"0.6941842",
"0.6941198",
"0.6921064",
"0.6912755"
] | 0.7342708 | 37 |
Finds user with specific email | User getUserByEmail(String email); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"User find(String email);",
"public User findUserByEmail(final String email);",
"User getUserByEmail(final String email);",
"User findUserByEmail(String email) throws Exception;",
"public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n public OpenScienceFrameworkUser findOneUserByEmail(final String email) {\n final OpenScienceFrameworkUser user = findOneUserByUsername(email);\n if (user != null) {\n return user;\n }\n\n // check emails\n try {\n // JPA Hibernate does not support postgres query array operations, use postgres native queries\n // `query.setParameter()` does not work, use string concatenation instead\n final Query query= entityManager.createNativeQuery(\n \"select u.* from osf_osfuser u where u.emails @> '{\" + email + \"}'\\\\:\\\\:varchar[]\",\n OpenScienceFrameworkUser.class\n );\n return (OpenScienceFrameworkUser) query.getSingleResult();\n } catch (final PersistenceException e) {\n LOGGER.error(e.toString());\n return null;\n }\n }",
"public Users findBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n Users registeredUser = (Users) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"public static User findUserByEmail(String email) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByEmail = \"SELECT * FROM public.member \"\n + \"WHERE email = '\" + email + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByEmail);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"public User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"public User getUser(String email) {\n for (User user : list) {\n if (user.getEmail().equals(email))\n return user; // user found. Return this user.\n }\n return null; // user not found. Return null.\n }",
"@Override\n\tpublic UserVO searchEmail(String email) throws Exception {\n\t\treturn dao.searchEmail(email);\n\t}",
"@Override\n\tpublic ERSUser getUserByEmail(String email) {\n\t\treturn userDao.selectUserByEmail(email);\n\t}",
"@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"[email protected]\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }",
"User findUserByEmail(String userEmail);",
"@Override\n\tpublic Users findUserByEmail(String email) {\n\t\treturn iUserDao.findUserByEmail(email);\n\t}",
"public static Utente findByEmail(String email) {\n \t\n\t\tSession session = DatabaseManager.getSession();\n Transaction tx = null;\n Utente user = null;\n \n \n try {\n tx = session.getTransaction();\n tx.begin();\n \n CriteriaBuilder builder = session.getCriteriaBuilder();\n CriteriaQuery<Utente> criteria = builder.createQuery(Utente.class);\n Root<Utente> root = criteria.from(Utente.class);\n \n criteria.select(root).where(builder.equal(root.get(Utente_.email), email));\n\n user = session.createQuery(criteria).getSingleResult();\n \n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n \n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return user;\n \n \n }",
"UserEntity findByEmail(String email);",
"@Override\n public User getUserByEmail(final String email){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where email = :email\");\n query.setParameter(\"email\", email);\n return (User) query.uniqueResult();\n }",
"@Override\n\tpublic User findByEmail(String email)\n\t{\n\t\tif (email == null) return null;\n\t\n\t\tString property = User.PROP_EMAIL;\n\t\tLabel label = RoostNodeType.USER;\n\t\tUser user = findByUniqueProperty(label, property, email);\n\t\t\n\t\treturn user;\n\t}",
"public User retrieveUserByEmail(String email) throws ApplicationException;",
"public User getUser(String emailId);",
"public AppUser findByEmail(String email);",
"public VendorUser findVuserBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n VendorUser registeredUser = (VendorUser) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"public boolean findEmail(String email);",
"public User getUser(String email) {\r\n\t\tOptional<User> optionalUser = null;\r\n\t\tUser user = null;\r\n\t\ttry {\r\n\t\t\toptionalUser = userList().stream().filter(u -> u.getUserEmail().equals(email)).findFirst();\r\n\t\t\tif (optionalUser.isPresent()) {\r\n\t\t\t\tuser = optionalUser.get();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error find user : \" + email + \" \" + e);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"public User readByEmail(String email) throws DaoException;",
"ServiceUserEntity getUserByEmail(String email);",
"public User getUser(String email);",
"public User findByEmail(String email){\n return userRepository.findByEmail(email);\n }",
"public User getUserByEmail(final String email) {\n return em.find(User.class, email.toLowerCase());\n }",
"Optional<User> findByEmail(String email);",
"Optional<User> findByEmail(String email);",
"@Override\n\tpublic User getUser(String email){\n\t\tif (userExists(email) == true)\n\t\t\treturn users[searchIndex(email)];\n\t\telse\n\t\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic User getUserByEmail(String email, User user) {\n\t\tSession session = sessionFactory.openSession();\n\t\tList<User> userList = new ArrayList<>();\n\t\tuserList = (List<User>) session.createQuery(\"from User\");\n\t\tfor (User tempUser : userList) {\n\t\t\tif (tempUser.getEmail().equalsIgnoreCase(email)) {\n\t\t\t\tuser = tempUser;\n\t\t\t\tSystem.out.println(\"get uswer by email: \" + user);\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\treturn user;\n\t}",
"@Override\n public User getByEmail(String email) {\n List<JdbcUser> jdbcUserList = jdbcTemplate.query(\"SELECT * FROM users WHERE email=?\", ROW_MAPPER, email);\n JdbcUser jdbcUser = DataAccessUtils.singleResult(jdbcUserList);\n if (jdbcUser == null) {\n return null;\n }\n return convertToUser(jdbcUser);\n }",
"UserDTO findUserByEmail(String email);",
"public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}",
"public User findEmail(String email){\n\t\t\n boolean found = false;\t\t\t\t\t\t\t\t\t\t/* ====> Boolean controls while loop */\n User correct = new User();\t\t\t\t\t\t\t\t\t/* ====> Create instance of the correct user*/\n User marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n marker = this.head;\t\t\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n \n // Loop keeps on going until the correct User is not found or until the next User is null\n while(!found){ \n \tif (marker.getEmail().equals(email)){\t\t\t\t\t/* ====> If the marker found the right user based on its email */ \n \t\tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \t\tcorrect = marker;\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the same User as marker */\n \t}\n \n else if (marker.getNext() == null){\t\t\t\t\t\t/* ====> If the marker reaches end of the list */ \n \tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \tcorrect = head;\t\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the head */\n }\n \n else {\n \tmarker = marker.getNext();\t\t\t\t\t\t\t/* ====> Move marker to the next element of the list */\n }\n }\n \n return correct;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return correct User */ \n \n\t}",
"@Override\n public final CustomerUser getCustomerUserByEmail(final String email) {\n\treturn (CustomerUser) getEntityManager()\t\n\t\t.createQuery(\"select customer from \"\n\t\t\t+ CustomerUser.class.getName()\n\t\t\t+ \" as customer where customer.email =:email\")\n\t\t.setParameter(\"email\", email)\n\t\t.getSingleResult();\n }",
"User findOneByMail(String mail);",
"public User existsProfile(String email) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n SuperBooleanBuilder query = new SuperBooleanBuilder();\n query.put(\"email\", email);\n Search search = new Search.Builder(query.toString())\n .addIndex(INDEX_NAME)\n .addType(User.class.toString())\n .build();\n\n User result = null;\n try {\n result = client.execute(search).getSourceAsObject(User.class);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return result;\n }",
"public User getUserByEmail(String email)throws EntityNotFoundException\n\t{\n\t\treturn userDao.getById(email);\n\t}",
"public User get(String emailID);",
"@Override\r\n\tpublic User getByMail(String eMail) {\n\r\n\t\treturn userDao.get(eMail);\r\n\t}",
"public Utente retriveByEmail(String email) {\n\t\t\n\t\tTypedQuery<Utente> query = em.createNamedQuery(Utente.FIND_BY_Email, Utente.class);\n query.setParameter(\"email\", email); //parameters by name \n return query.getSingleResult();\n\t}",
"public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }",
"public User getUser(String email) {\n\t\tLog.i(TAG, \"return a specific user with email.\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getcurrentUser = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(getcurrentUser, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return null;\n\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\treturn user;\n\t}",
"private User getUserFromUsersBy(String email, String password){\n \tUser user=null;\n \tfor(User u : users ){\n \t\tif(u.getEmail().equals(email)&&u.getPassword().equals(password)){\n \t\t\tuser = u;\n \t\t}\n \t}\n \treturn user;\n }",
"@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);",
"public String findEmail(String email) {\n\t\tString sql=\"select email from SCOTT.USERS where USERNAME='\"+email+\"'\";\n\t\t\n\t\t Dbobj dj=new Dbobj();\n\t\t JdbcUtils jdbcu=new JdbcUtils();\n\t\t dj=jdbcu.executeQuery(sql);\n\t\t ResultSet rs=dj.getRs(); \n\t\t System.out.println(\"\"+sql);\t\n\t\t String t=\"\";\n\t\t try {\n\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tt=rs.getString(1);\n\t\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t \n\t\t\n\t\treturn t;\n\t\t\n\t}",
"Optional<JUser> readByEmail(String email);",
"public String searchEmail(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username, email from \" + TABLE_NAME;\n Cursor cursor = db.rawQuery(query,null);\n\n String uname, email;\n email = \"not found\";\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if (uname.equals(username)) {\n email = cursor.getString(1);\n break;\n }\n } while (cursor.moveToNext());\n }\n return email;\n }",
"public User getUserByEmail(String email) {\r\n\t\treturn usersPersistence.getUserByEmail(email);\r\n\t}",
"@Override\n\tpublic User getUser(String email) {\n\t\treturn userDatabase.get(email);\n\t}",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"public UserTO getByEmail(String email) {\n\t\treturn getDao().getByEmail(email);\n\t}",
"Coach findByEmail(String email);",
"public static User getUser(String email){\n Connection connect = null;\n ResultSet set = null;\n String getUserSQL = \"SELECT * FROM users WHERE email =?\";\n User user = null;\n\n // Get User Details Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare SQL Statement:\n PreparedStatement statement = connect.prepareStatement(getUserSQL);\n // Set Attributes / Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Results:\n while (set.next()){\n user = new User();\n // Set User Details / Information\n user.setFirst_name(set.getString(\"first_name\"));\n user.setLast_name(set.getString(\"last_name\"));\n user.setEmail(set.getString(\"email\"));\n user.setUser_type(set.getString(\"user_type\"));\n user.setCreated_at(set.getDate(\"created_at\"));\n }\n // End Of Check For Results:.\n }catch (Exception e){\n e.printStackTrace();\n }\n return user;\n }",
"public boolean isThereSuchAUser(String username, String email) ;",
"public User findByEmail(String email) {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.add(Restrictions.eq(\"email\", email));\r\n\t\tUser user = (User) crit.uniqueResult();\r\n\t\tif(user != null) {\r\n\t\t\tHibernate.initialize(user.getUserProfiles());\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"public User getUserByEmail(String email){\n\t\tif(email == null)\n\t\t\treturn null;\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession session = sf.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry{\n\t\t\tCriteria criteria = session.createCriteria(User.class);\n\t\t\tObject obj = criteria.add(Restrictions.eq(\"email\", email)).uniqueResult();\n\t\t\tif(obj == null)\n\t\t\t\treturn null;\n\t\t\tUser user = (User)obj;\n\t\t\ttx.commit();\n\t\t\treturn user;\t\t\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"Account findByEmail(String email);",
"public User getUserFromDetails(String email, String username) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"email\", email);\r\n query.append(\"username\", username);\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"public User getUserByEmail(String email, String apikey) throws UserNotFoundException, APIKeyNotFoundException{\n if (authenticateApiKey(apikey)){\n return userMapper.getUserByEmail(email);\n }else throw new UserNotFoundException(\"User not found\");\n }",
"public User getUser(String email) {\n\n Query query = new Query(\"User\").setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if (userEntity == null) {\n return null;\n }\n\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n User user = new User(email, aboutMe);\n\n return user;\n }",
"List<Member> findByEmail(String email);",
"@Override\n\t@Transactional\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\tUserDetails user = null;\n\t\ttry {\n\t\t\t\n\t\t\tuser = searchUser(email);\n\t\t\treturn user;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t}\n\t}",
"public UserDTO findByEmail(String email) throws ApplicationException {\n\n\t\tlog.debug(\"Model findByLogin Started\");\n\t\tConnection conn = null;\n\t\tUserDTO dto = null;\n\n\t\tStringBuffer sql = new StringBuffer(\"Select * from st_user where email=?\");\n\n\t\ttry {\n\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sql.toString());\n\t\t\tstmt.setString(1, email);\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tdto = new UserDTO();\n\t\t\t\tdto.setId(rs.getLong(1));\n\t\t\t\tdto.setFirstName(rs.getString(2));\n\t\t\t\tdto.setLastName(rs.getString(3));\n\t\t\t\tdto.setEmail(rs.getString(4));\n\t\t\t\tdto.setPassword(rs.getString(5));\n\t\t\t\tdto.setDob(rs.getDate(6));\n\t\t\t\tdto.setMobileNo(rs.getString(7));\n\t\t\t\tdto.setRoleId(rs.getLong(8));\n\t\t\t\tdto.setGender(rs.getString(9));\n\t\t\t\tdto.setCreatedBy(rs.getString(10));\n\t\t\t\tdto.setModifiedBy(rs.getString(11));\n\t\t\t\tdto.setCreatedDatetime(rs.getTimestamp(12));\n\t\t\t\tdto.setModifiedDatetime(rs.getTimestamp(13));\n\n\t\t\t}\n\t\t\trs.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.error(\"Database Exception\", e);\n\t\t\tthrow new ApplicationException(\"Exception:Exception in getting User by login\");\n\n\t\t} finally {\n\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t}\n\t\tlog.debug(\"Model findByLogin End\");\n\t\treturn dto;\n\t}",
"public UsersModel getUserById(String userEmail);",
"@Query(\"select u from User u where u.email = :email\")\n User getUserByEmail(@Param(\"email\") String email);",
"public static User getUserByEmail(String email) {\n\t\t// getting user by email\n\t\treturn dao.getUserByEmail(email);\n\t}",
"public User findByEmail(String email) {\n\t\treturn repo.findByEmail(email);\r\n\t}",
"public synchronized User getUser(String email) {\r\n return (email == null) ? null : email2user.get(email);\r\n }",
"Optional<User> findOneByEmail(String email);",
"public User getUserFromEmail(final String email) {\n LOG.info(\"Getting user with email {}\", email);\n return userRepo.getUserByEmail(email);\n }",
"@Transactional\r\n\tpublic User getUserByEmail(String email) {\n\t\treturn cuser.getUserByEmail(email);\r\n\t}",
"CustomerEntity findByEmail( final String email );",
"public Optional<User> findByEmail(final String email) {\n return null;\n }",
"public User getUserByEmail(String email) throws SQLException {\n\t\ttry {\n\n\t\t\tthis.TryConnect();\n\n\t\t\tthis.m_objData.SetStoreName(\"sys_user_getByEmail(?)\");\n\t\t\tthis.m_objData.Parameters.setString(1, email);\n\n\t\t\tResultSetMapper util = new ResultSetMapper<User>();\n\n\t\t\tResultSet lstResult = this.m_objData.ExecToResultSet();\n\n\t\t\tList<User> lstUser = util.mapRersultSetToObject(lstResult,\n\t\t\t\t\tUser.class);\n\n\t\t\tif (lstUser == null)\n\t\t\t\treturn null;\n\n\t\t\tif (lstUser.size() > 0)\n\t\t\t\treturn lstUser.get(0);\n\t\t\treturn null;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tthis.TryDisconnect();\n\t\t}\n\n\t\treturn null;\n\t}",
"public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n \n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n \n // selection argument\n String[] selectionArgs = {email};\n \n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_USER, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"java.lang.String getUserEmail();",
"public Member selectByEmail(String email) {\n\t\t\n\t\ttry {\n\t\tMember member = jdbcTemplate.queryForObject(\"select * from member where email = ?\", new RowMapper<Member>() {\n\n\t\t\t@Override\n\t\t\tpublic Member mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tMember member = new Member(rs.getString(\"EMAIL\"), rs.getString(\"PASSWORD\"), rs.getString(\"NAME\"), rs.getTimestamp(\"REGDATE\").toLocalDateTime());\n\t\t\t\t\n\t\t\t\tmember.setId(rs.getString(\"ID\"));\n\t\t\t\treturn member;\n\t\t\t}\n\t\t\t\n\t\t}, email);\n\t\t\n\t\treturn member;\n\t\t\n\t\t}catch(EmptyResultDataAccessException e) {\n\t\t\treturn null;\n\t\t}\t \n\t}",
"public User findByEmail(String email) {\n\t\ttry {\n\t\t\treturn entityManager\n\t\t\t\t\t.createNamedQuery(User.FIND_BY_EMAIL, User.class)\n\t\t\t\t\t.setParameter(\"email\", email).getSingleResult();\n\t\t} catch (PersistenceException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public User getUserByEmail(String email) throws Exception {\n\t\tSession session = null;\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\tsession = getSessionFactory().openSession();\n\t\t\tif(session != null) {\n\t\t\t\ttx = session.beginTransaction();\n\t\t\t\tQuery query = session.createQuery(\"FROM User u where u.email =:email\");\n\t\t\t\tquery.setParameter(\"email\", email);\n\t\t\t\tList list = query.list();\n\t\t\t\tif(list != null && list.size() >0) {\n\t\t\t\t\treturn (User)list.get(0);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t} finally{\n\t\t\tif(tx != null) {\n\t\t\t\ttx.commit();\n\t\t\t}\n\t\t\tif(session != null) {\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}",
"private UserFormData loadUserIdByEmail(final UserFormData formData) {\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Searching userId with email : \" + formData.getEmail().getValue());\n\t\t}\n\t\tSQL.selectInto(SQLs.USER_SELECT_ID_ONLY + SQLs.USER_SELECT_FILTER_EMAIL + SQLs.USER_SELECT_INTO_ID_ONLY,\n\t\t\t\tformData);\n\t\treturn formData;\n\t}",
"private static void lookupAccount(String email) {\n\t\t\n\t}",
"Optional<User> findByLoginOrEmail(String login, String email);",
"Customer findByEmail(String email);",
"@Override\n public boolean isUserEmailExists(String email, String exludeUserName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_EMAIL_EXCLUDE_USERNAME);\n params.put(User.PARAM_EMAIL, email);\n params.put(User.PARAM_USERNAME, exludeUserName);\n User user = getRepository().getEntity(User.class, params);\n\n return user != null && user.getEmail() != null && !user.getEmail().equals(\"\");\n }"
] | [
"0.80889857",
"0.80652934",
"0.7930125",
"0.78928125",
"0.78899264",
"0.7803829",
"0.7792027",
"0.7787357",
"0.7730231",
"0.7730231",
"0.76892394",
"0.76892394",
"0.76892394",
"0.76892394",
"0.76892394",
"0.76892394",
"0.76429844",
"0.76429844",
"0.76429844",
"0.76327676",
"0.75866425",
"0.75845015",
"0.75700146",
"0.7556614",
"0.75522697",
"0.74943584",
"0.74900997",
"0.74834526",
"0.7475945",
"0.74619704",
"0.7457627",
"0.7414827",
"0.7411123",
"0.7390788",
"0.7390344",
"0.7378696",
"0.7374475",
"0.73664176",
"0.7360295",
"0.73504317",
"0.73431027",
"0.73431027",
"0.733903",
"0.73355234",
"0.73269427",
"0.7322061",
"0.73079723",
"0.7304142",
"0.7288608",
"0.7288082",
"0.7278242",
"0.7263391",
"0.72448605",
"0.72274137",
"0.71807307",
"0.71672016",
"0.71522",
"0.7145802",
"0.7106218",
"0.71027166",
"0.70896244",
"0.7085068",
"0.7017327",
"0.7017031",
"0.6978737",
"0.6978737",
"0.69693625",
"0.6948533",
"0.6944698",
"0.6932473",
"0.6922421",
"0.69196755",
"0.6919109",
"0.68854827",
"0.6884364",
"0.68632114",
"0.6859246",
"0.68585247",
"0.68573046",
"0.6853556",
"0.6853377",
"0.68478894",
"0.6844972",
"0.6839765",
"0.6834983",
"0.68258685",
"0.6802021",
"0.6798335",
"0.67881733",
"0.6756226",
"0.667614",
"0.66754425",
"0.6671534",
"0.6668863",
"0.66675866",
"0.66650724",
"0.6652453",
"0.6645879",
"0.66270626",
"0.6624417"
] | 0.784911 | 5 |
Finds list of users with specific name | List<User> getUserByName(String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<User> search(String name) {\n\t\treturn null;\r\n\t}",
"public List<User> listUsers(String userName);",
"List<User> searchUsersByUsername(String username);",
"public List<User> findUsers(final String name) {\n if (Objects.nonNull(name))\n return userRepository.findByFirstNameContainingOrLastNameContainingAllIgnoreCase(name, name);\n else\n return userRepository.findAll();\n }",
"public List<String> getByName(String name) {\r\n List<String> listOfUser = new ArrayList<>();\r\n for(User user : userRepository.findByName(name)){\r\n listOfUser.add(user.toString());\r\n }\r\n return listOfUser;\r\n }",
"@Override\n\tpublic List<User> searchByUser(String userName) {\n\t\tlog.info(\"Search by username!\");\n\t\treturn userRepository.findByFirstNameRegex(userName+\".*\");\n\t}",
"public static ArrayList<Member> findByName(String usr){\n setConnection();\n \n ArrayList<Member> members = new ArrayList<>();\n \n try{\n Statement statement = con.createStatement();\n \n //Query statement\n String query = \"SELECT * FROM member WHERE name LIKE ?\";\n\n //Create mysql prepared statement\n PreparedStatement preparedStatement = con.prepareStatement(query);\n preparedStatement.setString(1, \"%\"+usr+\"%\");\n \n //Execute the prepared statement\n ResultSet result = preparedStatement.executeQuery();\n \n while(result.next()){\n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n members.add(new Member(memberId, name, email, phone, address, dob));\n }\n\n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return members;\n }",
"public List<User> listSearch(String search);",
"public List<User> findOtherUsers(String name) {\n\t\treturn null;\r\n\t}",
"List<UserRepresentation> searchUserAccount(final String username);",
"@Test\n public void testSearchUsersByName() {\n token.setGroupId(findMemberGroup(token).getGroupId());\n\n // Setting a partial name to search for. The search will look at both\n // first and last names which contain this as part of their name. In\n // this case, we're searching for \"man\", which will yield the following:\n // - Germany\n // - Oman\n // - Romania\n final SearchUserRequest request = new SearchUserRequest();\n request.setName(\"man\");\n\n // Now, invoke the search for users with a partial name given\n final SearchUserResponse response = administration.searchUsers(token, request);\n\n // And verify the result\n assertThat(response.isOk(), is(true));\n assertThat(response.getUsers().size(), is(3));\n }",
"Collection<String> getUsernames();",
"public boolean findUserBYName(String name);",
"@Override\n\tpublic List<User> selectUserByName(String name) {\n\t\tList<User> users = null;\n\t\ttry {\n\t\t\tusers = client.queryForList(\"selectUserByName\", name);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn users;\n\n\t}",
"public List<User> searchUser(String searchValue);",
"List<User> getMembers(String companyId, String name);",
"public List<User> searchUsers(String arg) {\n\n\t\tMUser mu = new MUser();\n\t\tList<User> searchUsers = mu.searchUsers(arg);\n\t\tif (searchUsers == null) {\n\t\t\terrorMsg = mu.errorMsg;\n\t\t\treturn null;\n\t\t}\n\t\treturn searchUsers;\n\n\t}",
"@Override\n public List<User> findByName(String username){\n try {\n return runner.query(con.getThreadConnection(),\"select * from user where username like ?\",new BeanListHandler<User>(User.class),username);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }",
"@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}",
"public String[] listUsers();",
"public ArrayList<Users> ListUsers(String ValToSearch) {\n ArrayList<Users> usersList = new ArrayList<Users>();\n\n Statement st;\n ResultSet rs;\n\n try {\n Connection con = getConnection();\n st = con.createStatement();\n String searchQuery = \"SELECT * FROM `tbl_registered` WHERE CONCAT(`user_id`,'username', `firstname`,`middlename`, `lastname`, `email`)LIKE '%\" + ValToSearch + \"%'\";\n rs = st.executeQuery(searchQuery);\n\n Users user;\n\n while (rs.next()) {\n user = new Users(\n rs.getString(\"username\"),\n rs.getString(\"firstname\"),\n rs.getString(\"middlename\"),\n rs.getString(\"lastname\"),\n rs.getString(\"email\"),\n rs.getInt(\"user_id\"));\n\n usersList.add(user);\n }\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n\n return usersList;\n }",
"public User search_userinfo(String user_name);",
"public int search_userid(String user_name);",
"public List<User> withName(String name) {\n\t\treturn null;\n\t}",
"List<String> loadAllUserNames();",
"@Override\n\tpublic List<UserDTO> findByName(String s) {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic ArrayList<Object> searchUserByName(String search) {\n\t\t\n\t\tSystem.out.println(\"i am in service search looking for users\" + search.length());\n\t\t\n\t\tif(search == null){\n\t\t\t\n\t\t\tSystem.out.println(\"nothing can be find\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"its not 0000000000\");\n\t\t\n\t\tArrayList<Object> list = userRepository.findUserByName(search);\n\t\t\n\t\t//System.out.println(Arrays.toString(list));\n\t\treturn list;\n\t}",
"@RedisCashe(Type = RedisCashe.HandleType.INSERT)\n @Override\n public List<User> list(String name) {\n QueryWrapper<User> qw = new QueryWrapper<>();\n qw.eq(\"name\", name);\n List<User> userList = userMapper.selectList(qw);\n if (userList == null) {\n return new ArrayList<>();\n }\n return userList;\n }",
"@Override\n\tpublic List<MemberEntity> findByUname(String name) {\n\t\tQuery query = entityManager.createQuery(\"from MemberEntity where uname =\" + name);\n\t\tList<MemberEntity> list = query.getResultList();\n\t\treturn list;\n\t}",
"public List<EOSUser> findUsers(List<String> logins);",
"@Override\n\tpublic List<Account> getAccountsByName(String name) {\n\t\treturn jdbcTemplate.query(\"select * from account where locate(?, name)>0 \", new Object[]{name}, new BeanPropertyRowMapper(Account.class));\n\t}",
"public List<User> list(String currentUsername);",
"List<Member> findByName(String name);",
"public List getUsers(User user);",
"@Override\n public Optional<Utilizador> search(String username, List<Utilizador> list) {\n for (Utilizador u : list) {\n if (u.getUsername().equals(username)) {\n return Optional.of(u);\n }\n }\n return Optional.empty();\n }",
"public List<User> findAutoCompleteUser(String key) {\n\t\tTypedQuery<User> query = em.createQuery(\"select distinct a from User a\" + \" where UPPER(a.name) like :name\",\n\t\t\t\tUser.class);\n\t\tquery.setParameter(\"name\", \"%\" + key.toUpperCase() + \"%\");\n\t\tList<User> userLst = query.setFirstResult(0).setMaxResults(10).getResultList();\n\n\t\treturn userLst;\n\t}",
"private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }",
"public List<User> getSpecificUsers(String searchQuery) {\n logger.info(\"Currently in method 'getSpecificUsers()'.\");\n Database database = Database.getInstance();\n Connection connection = null;\n List<User> specificUsers = new ArrayList<User>();\n String sql = \"SELECT * FROM users WHERE id LIKE '%\" + searchQuery +\n \"%' OR first_name LIKE '%\" + searchQuery +\n \"%' or last_name LIKE '%\" + searchQuery +\n \"%' or date_of_birth LIKE '%\" + searchQuery + \"%'\";\n\n try {\n database.connect();\n connection = database.getConnection();\n Statement selectStatement = connection.createStatement();\n ResultSet results = selectStatement.executeQuery(sql);\n while (results.next()) {\n User employee = createUserFromResults(results);\n specificUsers.add(employee);\n }\n database.disconnect();\n } catch (SQLException e) {\n logger.error(\"Encountered an SQLException: \", e);\n } catch (Exception e) {\n logger.error(\"Encountered an Exception: \", e);\n }\n return specificUsers;\n }",
"public int[] findUser(String name){\r\n\t\tint[] ctrl= new int[2];\r\n\t\tctrl[0] = 0;\r\n\t\tctrl[1] = 0;\r\n\t\tfor(int i=0; i<user.length && ctrl[0]!=1; i++){\r\n\t\t\tif(user[i]!=null && name.equals(user[i].getUsername()) ){\r\n\t\t\t\tctrl[0]=1;\r\n\t\t\t\tctrl[1]=i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ctrl;\r\n\t}",
"List<User> findAllByUsernameContains(String username);",
"public ArrayList<Guest> searchGuestList(String name) {\n \tString checkName = name.toUpperCase();\n \tArrayList<Guest> result = new ArrayList<>();\n \tfor(Guest guest : guestList){\n if(guest.getName().toUpperCase() != null && guest.getName().toUpperCase().contains(checkName)) {\n \tresult.add(guest);\n }\n }\n \treturn result;\n }",
"public List getAllUsers();",
"public User findUserName(String name)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (name.equals(users.get(i).getUsername()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"private List<ParseUser> filterUsers(List<ParseUser> pUsers, String searchTerm) {\n List<ParseUser> filteredUsers = new ArrayList<>();\n for (ParseUser pU : pUsers) {\n User u = new User(pU);\n if (u.getName().toLowerCase().contains(searchTerm.toLowerCase())) {\n filteredUsers.add(pU);\n }\n }\n return filteredUsers;\n }",
"public User whoIsTheUser(String name){\n boolean space5 = false;\n User userPrivate = null;\n for(int i = 0; i<MAX_USER && !space5; i++){\n userPrivate = user[i];\n if(userPrivate.getUserName().equals(name)){\n space5 = true;\n }\n }\n return userPrivate;\n }",
"java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();",
"@Override\n\tpublic ArrayList<User> searchUsers() {\n\t\treturn userDao.searchUsers();\n\t}",
"public List<com.ims.dataAccess.tables.pojos.User> fetchByStreetname(String... values) {\n return fetch(User.USER.STREETNAME, values);\n }",
"private List<IUser> userSearch(IChannel root, String str) {\n List<IUser> list = new LinkedList<IUser>();\n userSearch(root, str, list);\n return list;\n }",
"public List<String> getUserIDLists(String name) {\n\t\tList<String> userlist = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tConnection con = DBConn2.getCon();\r\n\t\t\tString sql = \"select ID,PWD,NAME,AGE from user\";\r\n\t\t\tif (!name.equals(\"\")) {\r\n\t\t\t\tsql += \"WHERE NAME=?\";\t\t//sql += \"WHERE NAME='\" + name + \"'\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tPreparedStatement prestmt = con.prepareStatement(sql);\t///추가된부분\r\n\t\t\tif(!name.equals(\"\")){\r\n\t\t\t\tprestmt.setString(1, name);\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t///추가된부분\r\n\t\t\tResultSet rs = prestmt.executeQuery();\r\n\t\t\twhile (rs.next()) { // 순서대로 실행(Activate all rows)\r\n\t\t\t\tuserlist.add(rs.getString(1) + \",\" + rs.getString(2) + \",\"\r\n\t\t\t+ rs.getString(3) + \",\" + rs.getInt(4)); // 1//// 넣어두됨.\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\t\t\t\t\t\r\n\r\n\t\t\t}\r\n\t\t\tDBConn2.closeCon();\r\n\t\t\treturn userlist;\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public ArrayList<String> findallusers() {\n\t\tArrayList<String> answer = new ArrayList<String>();\n\t\ttry {\n\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT * FROM users \");\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile(rs.next()) {\n\t\t\t\tanswer.add(rs.getString(1));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\treturn answer;\n\t}",
"private ArrayList<String> findMentions(String text){\r\n int i = 0;\r\n ArrayList<String> userNames = new ArrayList<String>();\r\n ArrayList<User> users = new ArrayList<User>();\r\n String temp = null;\r\n text += \" \"; //adds a space to the end of text for function below.\r\n \r\n users = UserDB.selectUsers(); //all users in the database\r\n while(true)\r\n {\r\n int found = text.indexOf(\"@\", i);\r\n if (found == -1) break;\r\n int start = found + 1;\r\n int end = text.indexOf(\" \", start);\r\n temp = text.substring(start, end);\r\n for (int count=0; count < users.size(); count++) {\r\n if (users.get(count).getusername().equals(temp)){\r\n userNames.add(users.get(count).getemail()); //add email address instead of username\r\n }\r\n }\r\n i= end +1;\r\n }\r\n \r\n return userNames;\r\n }",
"private List<User> simulateSearchResult(String firstName)\n\t{\n\n\t\tArrayList<User> user=(ArrayList<User>) userService.getAllUsers();\n\t\tArrayList<User> result = new ArrayList<User>();\n\t\tfor (User u : user) {\n\t\t\tif (u.getFirstName().contains(firstName)) {\n\t\t\t\tresult.add(u);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;",
"com.heroiclabs.nakama.api.User getUsers(int index);",
"com.rpg.framework.database.Protocol.User getUsers(int index);",
"com.rpg.framework.database.Protocol.User getUsers(int index);",
"public static ArrayList<User> findAllUsers() {\n\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findAllUsers = \"SELECT * FROM public.member where type = 0\";\n PreparedStatement stmt = DBConnection.prepare(findAllUsers);\n ArrayList<User> userList = new ArrayList<User>();\n\n try {\n ResultSet rs = stmt.executeQuery();\n\n while(rs.next()) {\n User user = load(rs);\n\n targetUser = userIdentityMap.get(user.getId());\n if (targetUser == null) {\n userList.add(user);\n userIdentityMap.put(user.getId(), user);\n } else {\n userList.add(targetUser);\n }\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n return userList;\n }",
"public void findUsers() throws SQLException {\r\n\t\t// Query to get all users and ids.\r\n\t\t\r\n\t\t// Clear existing list\r\n\t\tusersList.clear();\r\n\t\tuseridsList.clear();\r\n\t\t\r\n\t\t Statement statement = connection.createStatement();\r\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t ResultSet rs = statement.executeQuery(\"select * from users\");\r\n\t while(rs.next())\r\n\t {\r\n\t // read the result set\r\n\t\t\t usersList.add(rs.getString(\"name\"));\r\n\t\t\t useridsList.add(rs.getInt(\"id\"));\r\n\t }\r\n\t\t// For loop to add each result to list.\r\n\r\n\t}",
"public List<User> getUsersStartingWith(String startsWith, Boolean enabled, int offset, int length) throws UserManagementException;",
"List<Integer> getUsersByNickName(String nick_name);",
"public Users findByName(String name) {\n\t\treturn usersDAO.findByName(name);\n\t}",
"public List queryTestName(String name) {\n\t\tthis.init();\n\t\tList list = null;\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"selectTestByUsername\",name);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t}",
"@RequestMapping(method = RequestMethod.GET, params = {\"name\"})\n\t public ResponseEntity<Collection<Customer>> findUserWithName(@RequestParam(value=\"name\") String name) {\n\t return service.findCustomerWithName(name);\n\t }",
"@Override\n public Set<User> usersThatFollow(String usernname) {\n return userDataMapper.getUsersThatFollow(getUser(usernname).getId());\n }",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"private Map<Object, User> getSimpleUsers(NotesSession notesSession,\n Connection connection, Collection<?> userNames) {\n PreparedStatement exactMatchStmt = null;\n PreparedStatement commonNameStmt = null;\n Map<Object, User> users = new HashMap<Object, User>();\n try {\n exactMatchStmt = connection.prepareStatement(\"select * from \"\n + userTableName + \" where notesname = ?\",\n ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n commonNameStmt = connection.prepareStatement(\"select * from \"\n + userTableName + \" where notesname like ?\",\n ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n for (Object userObj : userNames) {\n if (userObj == null) {\n continue;\n }\n String userName = userObj.toString();\n try {\n // Try an exact match.\n String lookupString = userName;\n User user = getSimpleUser(connection, exactMatchStmt, lookupString);\n if (user != null) {\n users.put(userObj, user);\n continue;\n }\n LOGGER.log(Level.FINEST, \"User not found using: {0}\", lookupString);\n // Try converting to canonical format.\n NotesName notesName = notesSession.createName(userName);\n if (notesName != null) {\n lookupString = notesName.getCanonical();\n user = getSimpleUser(connection, exactMatchStmt, lookupString);\n if (user != null) {\n users.put(userObj, user);\n continue;\n }\n LOGGER.log(Level.FINEST, \"User not found using: {0}\", lookupString);\n }\n // If an exact match failed, see if we have a common name.\n if (!userName.toLowerCase().startsWith(\"cn=\")) {\n lookupString = \"cn=\" + userName + \"/%\";\n user = getSimpleUser(connection, commonNameStmt, lookupString);\n if (user != null) {\n users.put(userObj, user);\n continue;\n }\n LOGGER.log(Level.FINEST, \"User not found using: {0}\", lookupString);\n }\n LOGGER.log(Level.FINEST, \"No record found for user: {0}\", userName);\n } catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Failed to lookup user: \" + userName, e);\n }\n }\n } catch (Exception e) {\n LOGGER.log(Level.SEVERE,\n \"Failed to complete user lookup: \" + userNames, e);\n }\n return users;\n }",
"List<KingdomUser> getUsers();",
"public Collection findAllUsers() throws FinderException;",
"public User getUserByName(String name) {\n \t\tfor (User user : users) {\n \t\t\tif (user.getName().equals(name))\n \t\t\t\treturn user;\n \t\t}\n \t\treturn null;\n \t}",
"@SuppressWarnings(\"unchecked\")\r\n public Collection<Person> findPersonsByName(String name) throws DataAccessException {\r\n return template.find(\"from Person p where p.lastName = ?\", name);\r\n }",
"public List<Trip> findByUserName( String userName ) {\n\t \n\t List<User> users = ds.find(User.class).filter(\"userName =\", userName).order(\"userName\").asList();\n\t List<Trip> returnTripList = new ArrayList<Trip>();\n\t \n\t for(User aUser: users)\n\t {\n\t \t returnTripList.addAll( aUser.getTrips());\t\n\t \t \n\t }\n\t logger.debug(\"Found {} users with userName {}\", users.size(),userName);\n\t logger.debug(\"Total of {} trips\", returnTripList.size());\n\t return returnTripList;\n\t \n\t \n\t //Using Regular Expressions\n\t //Pattern regExp = Pattern.compile(userName + \".*\", Pattern.CASE_INSENSITIVE);\n\t //return ds.find(User.class).filter(\"userName\", regExp).order(\"userName\").asList();\n\t}",
"List<User> searchUsers(String searchTerm) {\n return null;\n }",
"com.google.ads.googleads.v6.resources.UserList getUserList();",
"List<Post> findPostsByUserName(String userName);",
"public ArrayList<User> searchUsers(String fragment){\n \t\t\t// execute query\n\t\t\tString query = \"SELECT * FROM users WHERE id LIKE '%\" + fragment + \"%'\";\n \t\t\tSystem.out.println(query);\n \t\t\tResultSet rs = getResult(query);\n \t\t\t\n \t\t\tArrayList<User> matches = new ArrayList<User>();\n \t\t\ttry {\n \t\t\t\twhile(rs.next()){\n \t\t\t\t\t// add user to list\n \t\t\t\t\tString id = null;\t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\tid = rs.getString(\"id\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tString hash = null;\t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\thash = rs.getString(\"hash\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tboolean isAdmin = false;\n \t\t\t\t\ttry {\n \t\t\t\t\t\tisAdmin = rs.getBoolean(\"isAdmin\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tString image = null;\n \t\t\t\t\ttry {\n \t\t\t\t\t\timage = rs.getString(\"image_url\");\n \t\t\t\t\t} catch (SQLException e) {e.printStackTrace();}\n \t\t\t\t\t\n \t\t\t\t\tmatches.add(new User(id, hash, isAdmin, this, image));\n \t\t\t\t}\n \t\t\t}catch (SQLException e) {e.printStackTrace();}\t\t\t\n \t\t\t\n \t\t\treturn matches;\t\t\n \t\t}",
"@Override\n\tpublic ERS_USERS getByName(String name) {\n\t\treturn null;\n\t}",
"public List<Utilizator> listUsers();",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"List<User> findByfnameContaining(String search);",
"List<User> getUsers();",
"List<User> getUsers();",
"public List<Users> search(String sname, int offset, int rowCount) {\n\t\treturn usersDAO.search(sname, offset, rowCount);\n\t}",
"@Override\n\tpublic List<G_User> getByPartialUsername(String partialName, int offset,\n\t\t\tint limit) {\n\t\treturn uDao.getByPartialUsername(partialName, offset, limit);\n\t}",
"public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}",
"public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}",
"List<UserRepresentation> getUsers(final String realm);",
"public List<String> getAllUserNames()\n\t{\n\t\treturn userDao.findUserNames();\n\t}",
"@Override\npublic Users getUsersByUserName(String userName) {\n\treturn null;\n}",
"@Override\n\t@Transactional\n\tpublic List<IoMember> searchMember(String name) {\n\t\treturn memberDao.searchMember(name);\n\t}",
"public static List<String> getUsernames(int threshold) {\n\t\t\n\t\t// get all data from service\n\t\tList<Data> data = getAllDataFromService();\n\t\t\n\t\tList<String> qualifiedUsers = new ArrayList<>();\n\t\tfor(int x=0; x<data.size(); x++) {\n\t\t\tif(data.get(x).getSubmission_count() >= threshold) {\n\t\t\t\tqualifiedUsers.add(data.get(x).getUsername());\n\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn qualifiedUsers;\n\t}",
"@Override\n protected Collection<User> doInBackground(Void... params) {\n if(name.equals(\"\"))\n return new ArrayList<User>();\n return client.searchUsers(name, isPro, -1);\n }",
"private void readUsers(String filter) {\n Filter userFilter = Filter.createORFilter(\n Filter.createSubAnyFilter(\"cn\", filter),\n Filter.createSubAnyFilter(\"sn\", filter),\n Filter.createSubAnyFilter(\"givenname\", filter)\n );\n\n SearchResult searchResult = OpenLDAP.searchUser(userFilter);\n for (int i = 0; i < searchResult.getEntryCount(); i++) {\n SearchResultEntry entry = searchResult.getSearchEntries().get(i);\n User user = new User();\n user.setDistinguishedName(entry.getDN());\n user.setUsername(entry.getAttributeValue(\"cn\"));\n user.setFirstname(entry.getAttributeValue(\"givenname\"));\n user.setLastname(entry.getAttributeValue(\"sn\"));\n user.setEmail(entry.getAttributeValue(\"mail\"));\n user.setMobile(entry.getAttributeValue(\"mobile\"));\n getUsers().put(user.getUsername(), user);\n }\n }",
"public ArrayList<User> getUsersVisitingVenueByName(String venueName){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"select ?user \" +\n\t\t\t \"where { \" +\n\t\t\t \t\"?user sweb:visited ?venue.\" +\n\t\t\t \t\"?venue sweb:name ?name.\" +\n\t\t\t \t\"FILTER regex(?name, \\\"\"+ venueName +\"\\\", \\\"i\\\" )\" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"user\");\n\n\t users.add(this.buildUserFromResource(currentResource));\n\t }\n\t \n\t return users;\n\t}",
"@GetMapping(\"/search\")\n\tpublic String searchUsers(@RequestParam(\"theSearchName\") String theSearchName, Model theModel) {\n\t\tList<User> theUsers = userService.searchUsers(theSearchName);\n\n\t\t// add the customers to the model\n\t\ttheModel.addAttribute(\"users\", theUsers);\n\t\treturn \"list-users\";\n\t}",
"public Wrapper getUser(String name) {\n Wrapper<List<HashMap<String,String>>> wrapper = new Wrapper();\n\n try {\n Query searchUser = new Query();\n searchUser.addCriteria(Criteria.where(\"username\").regex(name, \"i\"));\n\n List<User> result = mongoOperations.find(searchUser, User.class, \"users\");\n\n List<HashMap<String, String>> out = new ArrayList<>();\n\n for ( User user : result) {\n HashMap<String, String> userData = new HashMap<>();\n userData.put(\"username\", user.getUsername());\n userData.put(\"id\", user.getId());\n\n out.add(userData);\n }\n\n wrapper.setData(out);\n wrapper.setSucces(true);\n\n } catch (Exception e) {\n wrapper.setSucces(false);\n wrapper.setMsg(e.toString());\n }\n\n return wrapper;\n }",
"@Override\n\tpublic List<String> findAllUsername() {\n\t\treturn userDao.findAllUsername();\n\t}",
"public ArrayList<String> findUserID(String username) {\n DataManager.getUsers getUser = new DataManager.getUsers(getActivity());\n ArrayList<String> queryList = new ArrayList<>();\n ArrayList<User> usersList = new ArrayList<>();\n\n queryList.add(\"username\");\n queryList.add(username);\n getUser.execute(queryList);\n\n try {\n usersList = getUser.get();\n } catch (Exception e) {}\n\n if (!usersList.isEmpty()) {\n String stringQuery = usersList.get(0).getID();\n queryList.clear();\n queryList.add(stringQuery);\n }\n\n return queryList;\n }",
"@Override\n\tpublic List<User> getFirstNamesLike(String username) {\n\t\tQuery query = entityManager.createNativeQuery(\"SELECT em.* FROM spring_data_jpa_example.username as em \" +\n \"WHERE em.username LIKE ?\", User.class);\n query.setParameter(1, username + \"%\");\n return query.getResultList();\n\t}"
] | [
"0.79152566",
"0.7655889",
"0.7568199",
"0.75451636",
"0.7504306",
"0.7389524",
"0.73269767",
"0.72769",
"0.72534037",
"0.7252888",
"0.72307706",
"0.7226351",
"0.7222813",
"0.7209989",
"0.72061145",
"0.7059736",
"0.70538414",
"0.702999",
"0.69730407",
"0.69588554",
"0.6935931",
"0.69309324",
"0.69216305",
"0.68819916",
"0.6873226",
"0.68158334",
"0.67875713",
"0.6771549",
"0.67274964",
"0.6695072",
"0.66849524",
"0.66755456",
"0.6667991",
"0.66211647",
"0.6619998",
"0.6607013",
"0.6603673",
"0.6602479",
"0.6598837",
"0.65877277",
"0.6580657",
"0.657706",
"0.6574497",
"0.65548474",
"0.6539003",
"0.65381676",
"0.65098256",
"0.64962333",
"0.6495219",
"0.64909357",
"0.6489998",
"0.64897835",
"0.6483402",
"0.6480016",
"0.64704454",
"0.64634997",
"0.6462108",
"0.644409",
"0.64334255",
"0.6419992",
"0.6415055",
"0.64114136",
"0.6399651",
"0.63849235",
"0.6359051",
"0.63546747",
"0.63539934",
"0.63536835",
"0.635308",
"0.63476574",
"0.6347174",
"0.63420236",
"0.63412374",
"0.6338548",
"0.6326816",
"0.63252604",
"0.63167816",
"0.6315444",
"0.6311908",
"0.6306321",
"0.6306117",
"0.6298492",
"0.6298492",
"0.6292729",
"0.62763035",
"0.6272418",
"0.62595624",
"0.6252336",
"0.6248079",
"0.62460923",
"0.6240101",
"0.6229014",
"0.6227964",
"0.622711",
"0.62250423",
"0.62152976",
"0.6207287",
"0.6206426",
"0.6205168",
"0.6203116"
] | 0.78058887 | 1 |
Searches for BPMN processes with the same, but a different containing process. | private boolean containsOtherProcessSameBPMNProcessName(SushiProcess process, String bpmnProcessName) {
List<BPMNProcess> bpmnProcesses = BPMNProcess.findByName(bpmnProcessName);
for(BPMNProcess bpmnProcess : bpmnProcesses){
if(!SushiProcess.findByBPMNProcess(bpmnProcess).equals(process)){
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String m29548a(Context context) {\n ActivityManager activityManager = (ActivityManager) context.getSystemService(\"activity\");\n int myPid = Process.myPid();\n for (RunningAppProcessInfo runningAppProcessInfo : activityManager.getRunningAppProcesses()) {\n if (runningAppProcessInfo.pid == myPid) {\n return runningAppProcessInfo.processName;\n }\n }\n return null;\n }",
"@Nullable\n public Integer findProcessByName(String targetName) throws IOException, InterruptedException, TimeoutException {\n // Debug\n String tag = TAG + \": readProcessName()\";\n Log.d(tag, \"Called\");\n\n // List all processes\n LinkedList<Integer> pids = listProcesses();\n if (pids == null || pids.size() == 0) {\n // Something went wrong...\n // TODO: Handle it like a pro.\n Log.e(tag, \"Process count is zero\"); // Debug\n return null;\n }\n\n // Go through listed processes and try matching with given target\n Iterator<Integer> iterator = pids.descendingIterator();\n while (iterator.hasNext()) {\n Integer pid = iterator.next();\n String processName = readProcessName(pid);\n Log.d(tag, processName + \" (\" + pid.toString() + \")\"); // Debug\n if (processName != null && processName.equals(targetName)) {\n Log.d(tag, \"Return: \" + pid.toString()); // Debug\n return pid;\n }\n }\n return null;\n }",
"private Process findClosestProcess(){\n\n //Ensure that the process queue is sorted by process ID for traversal.\n Collections.sort(this.unfinishedJobs,new PIDComparator());\n\n //If there was no process currently executing on the CPU,\n //the next process is simply the process queue's first item.\n if(this.activeJob == null){\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n } \n } else {\n\n //Find the first process with a higher process ID than the currently executing\n //process and set it as the new process to execute next.\n for(int i = 0; i < this.unfinishedJobs.size(); i++){\n Process temp = this.unfinishedJobs.get(i);\n if(temp.getPID() > this.activeJob.getPID()){\n return temp;\n }\n }\n\n //If there are no processes with a higher process ID than the current process, use the \n //process queue's first item as a default.\n if(this.unfinishedJobs.size() > 0){\n return this.unfinishedJobs.get(0);\n }\n }\n return null;\n }",
"private void killOverdueProcesses() {\r\n \t\tlong testTime = System.currentTimeMillis();\r\n \r\n \t\t// Kill off old ones\r\n\t\tMaximaProcess mp = pool.poll();\r\n \t\twhile (mp != null && mp.isOverdue(testTime)) {\r\n \t\t\tmp.kill();\r\n\t\t\tmp = pool.poll();\r\n \t\t}\r\n \t\tif (mp != null) {\r\n \t\t\tpool.addFirst(mp);\r\n \t\t}\r\n \r\n\t\twhile (!usedPool.isEmpty() && usedPool.get(0).isOverdue(testTime)) {\r\n \t\t\tusedPool.remove(0).close();\r\n \t\t}\r\n \t}",
"private synchronized void checkRunningProcesses() {\n\t\t// If maxProcesses is 0 or lower, we treat it as \"infinite\"\n\t\tif (maxProcesses <= 0 || runningCount < maxProcesses) {\n\t\t\tif (!waitingQueue.isEmpty()) {\n\t\t\t\t// Remove the first entry from the queue\n\t\t\t\tProcessEntry entry = waitingQueue.removeFirst();\n\t\t\t\t// And start it\n\t\t\t\tentry.process.start();\n\t\t\t\trunningCount++;\n\t\t\t\tlogger.debug(\"Starting process {}, have {} running processes, wait queue contains {} entries.\", new Object[] { entry.process, runningCount, waitingQueue.size() });\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testGetChildProcesses() {\n // Testing child processes is tricky because we don't really know a priori what\n // processes might have children, and if we do test the full list vs. individual\n // processes, we run into a race condition where child processes can start or\n // stop before we measure a second time. So we can't really test for one-to-one\n // correspondence of child process lists.\n //\n // We can expect code logic failures to occur all/most of the time for\n // categories of processes, however, and allow occasional differences due to\n // race conditions. So we will test three categories of processes: Those with 0\n // children, those with exactly 1 child process, and those with multiple child\n // processes. On the second poll, we expect at least half of processes in those\n // categories to still be in the same category.\n //\n Platform si = new Platform();\n OperatingSystem os = si.getOperatingSystem();\n List<OSProcess> processes = os.getProcesses(0, null);\n Set<Integer> zeroChildSet = new HashSet<>();\n Set<Integer> oneChildSet = new HashSet<>();\n Set<Integer> manyChildSet = new HashSet<>();\n // Initialize all processes with no children\n for (OSProcess p : processes) {\n zeroChildSet.add(p.getProcessID());\n }\n // Move parents with 1 or more children to other set\n for (OSProcess p : processes) {\n if (zeroChildSet.contains(p.getParentProcessID())) {\n // Zero to One\n zeroChildSet.remove(p.getParentProcessID());\n oneChildSet.add(p.getParentProcessID());\n } else if (oneChildSet.contains(p.getParentProcessID())) {\n // One to many\n oneChildSet.remove(p.getParentProcessID());\n manyChildSet.add(p.getParentProcessID());\n }\n }\n // Now test that majority of each set is in same category\n int matched = 0;\n int total = 0;\n for (Integer i : zeroChildSet) {\n if (os.getChildProcesses(i, 0, null).isEmpty()) {\n matched++;\n }\n // Quit if enough to test\n if (++total > 9) {\n break;\n }\n }\n if (total > 4) {\n assertTrue(\"Most processes with no children should not suddenly have them.\", matched > total / 2);\n }\n matched = 0;\n total = 0;\n for (Integer i : oneChildSet) {\n if (os.getChildProcesses(i, 0, null).size() == 1) {\n matched++;\n }\n // Quit if enough to test\n if (++total > 9) {\n break;\n }\n }\n if (total > 4) {\n assertTrue(\"Most processes with one child should not suddenly have zero or more than one.\",\n matched > total / 2);\n }\n matched = 0;\n total = 0;\n for (Integer i : manyChildSet) {\n if (os.getChildProcesses(i, 0, null).size() > 1) {\n matched++;\n }\n // Quit if enough to test\n if (++total > 9) {\n break;\n }\n }\n if (total > 4) {\n assertTrue(\"Most processes with more than one child should not suddenly have one or less.\",\n matched > total / 2);\n }\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Process)) {\r\n return false;\r\n }\r\n Process other = (Process) object;\r\n if ((this.processId == null && other.processId != null) || (this.processId != null && !this.processId.equals(other.processId))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public void markProcessPidMerge() throws JNCException {\n markLeafMerge(\"processPid\");\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static List<ProcessInstance> findProcessInstancesByVariableValue(String variable, String value)\n\t\t\tthrows WorkflowException {\n\t\tLogger log = LoggerFactory.getLogger(WorkflowUtils.class);\n\t\tlog.debug(\"findProcessInstanceByNode({})\", value);\n\n\t\tJbpmContext jbpmContext = JBPMUtils.getConfig().createJbpmContext();\n\t\tList<ProcessInstance> al = new ArrayList<>();\n\n\t\ttry {\n\t\t\tif (value != null) {\n\t\t\t\tGraphSession graphSession = jbpmContext.getGraphSession();\n\t\t\t\tList procDefList = graphSession.findAllProcessDefinitions();\n\n\t\t\t\tfor (Iterator itPd = procDefList.iterator(); itPd.hasNext();) {\n\t\t\t\t\tProcessDefinition procDef = (org.jbpm.graph.def.ProcessDefinition) itPd.next();\n\t\t\t\t\tList procInsList = graphSession.findProcessInstances(procDef.getId());\n\n\t\t\t\t\tfor (Iterator itPi = procInsList.iterator(); itPi.hasNext();) {\n\t\t\t\t\t\torg.jbpm.graph.exe.ProcessInstance procIns = (org.jbpm.graph.exe.ProcessInstance) itPi.next();\n\n\t\t\t\t\t\tif (value.equals(procIns.getContextInstance().getVariable(variable))) {\n\t\t\t\t\t\t\tal.add(WorkflowUtils.copy(procIns));\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} catch (JbpmException e) {\n\t\t\tthrow new WorkflowException(e.getMessage(), e);\n\t\t} finally {\n\t\t\tjbpmContext.close();\n\t\t}\n\n\t\tlog.debug(\"findProcessInstanceByNode: {}\", al);\n\t\treturn al;\n\t}",
"public void markProcessPidReplace() throws JNCException {\n markLeafReplace(\"processPid\");\n }",
"private String getFeasibleProcess(){\n String outSystemProcessId = null;\n if(systemProcessListIterator==null){\n systemProcessListIterator = systemProcesses.listIterator();\n }\n while (systemProcessListIterator.hasNext()) {\n SystemProcessPojo systemProcessPojo = systemProcessListIterator.next();\n// System.out.println(\"Performing check for process:\" + systemProcessPojo.getId());\n int feasibleProcessCounter = 0;\n ListIterator<SystemResourcePojo> systemResourcesListIterator = systemResources.listIterator();\n while (systemResourcesListIterator.hasNext()) {\n SystemResourcePojo systemResourcePojo = systemResourcesListIterator.next();\n if(systemProcessPojo.getRequiredResourceInstances().get(systemResourcePojo.getId())<=systemResourcePojo.getAvailableInstances()){\n feasibleProcessCounter++;\n } else {\n break;\n }\n }\n if(feasibleProcessCounter == systemResources.size() && !systemProcessPojo.isFinishedExecution()){\n outSystemProcessId = systemProcessPojo.getId();\n// Reset the Temp ListIterator here...\n if (!systemProcessListIterator.hasNext()) {\n systemProcessListIterator = null;\n }\n break;\n } else if(systemProcesses\n .stream()\n .filter(systemResourcPojoFiltered->!systemResourcPojoFiltered.isFinishedExecution())\n .count()\n >0 && !systemProcessListIterator.hasNext()){\n systemProcessListIterator = systemProcesses.listIterator();\n \n }\n \n \n }\n \n return outSystemProcessId;\n }",
"public static boolean testRemoveBestWaitingProcessQueue() {\r\n\t\tWaitingProcessQueue queue = new WaitingProcessQueue();\r\n\t\tCustomProcess process1 = new CustomProcess(10);\r\n\t\tCustomProcess process2 = new CustomProcess(2);\r\n\t\tCustomProcess process3 = new CustomProcess(5);\r\n\t\tqueue.insert(process3);\r\n\t\tqueue.insert(process2);\r\n\t\tqueue.insert(process1);\r\n\t\tqueue.removeBest();\r\n\r\n\t\treturn queue.size() == 2;\r\n\t}",
"private void checkProcess(ProcessHandle.Info process) {\n if (process.command().toString().endsWith(\"RobloxPlayerBeta.exe]\")) {\n //Roblox has been found, set path\n path = process.command().toString();\n writePath();\n }\n }",
"public Set<ProcessReader> getProcesses();",
"private void stopProcesses()\n {\n List<String> list = new ArrayList<String>(serverProcessesShutdownStack.keySet());\n ListIterator<String> iter = list.listIterator(list.size());\n while(iter.hasPrevious())\n {\n String processName = iter.previous();\n log.info(String.format(\"Stopping process: %s\", processName));\n serverProcessesShutdownStack.get(processName).stop(this);\n }\n }",
"private Stream<ProcessHandle> getProcesses() {\n return ProcessHandle.allProcesses();\n }",
"public List<Integer> killProcess(List<Integer> pid, List<Integer> ppid, int kill) {\n List<Integer> res = new LinkedList<>();\n Map<Integer, List<Integer>> map = buildMap(pid, ppid);\n res = bfsIteration(map, kill);\n return res;\n }",
"public ProcessEntity findUnClosedProcessId(Connection conn, String openId)\r\n/* 37: */ throws SQLException\r\n/* 38: */ {\r\n/* 39: 63 */ return this.dao.findUnClosedProcessId(conn, openId);\r\n/* 40: */ }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Test\r\n\tpublic void testDeployAndFindProcessDefinition()\r\n\t{\r\n\t\tthis.processDefinition = this.jbpmService.parseXMLResource(PROCESS_FILE);\r\n\r\n\t\tthis.jbpmService.deployProcessDefinition(this.processDefinition);\r\n\r\n\t\tProcessDefinition processDefFromDb = this.jbpmService.findLatestProcessDefinition(this.processDefinition.getName());\r\n\t\t\r\n\t\t// All nodes equal?\r\n\t\tList<Node> origNodes = this.processDefinition.getNodes();\r\n\t\tList<Node> rndTripNodes = processDefFromDb.getNodes();\r\n\t\tassertTrue(origNodes.size() == rndTripNodes.size());\r\n\t\tint idx = 0;\r\n\t\tfor (Object origObjNode : origNodes)\r\n\t\t{\r\n\t\t\tNode origNode = (Node) origObjNode;\r\n\t\t\tNode rndTripNode = (Node) (rndTripNodes.get(idx++));\r\n\t\t\tassertTrue(origNode.getName().equals(rndTripNode.getName()));\r\n\t\t\tassertTrue(origNode.getId() == rndTripNode.getId());\r\n\t\t\tassertTrue(origNode.getParent().getName().equals(rndTripNode.getParent().getName()));\r\n\t\t}\r\n\t}",
"private void resetPIDBreach() {\n\t\t\n\t}",
"public synchronized boolean othersWaiting(Process p, int t){\n if(queue.length < 2){\n if((queue[0].getId() != p.getId() && readyPro(queue[0],t))){\n return true;\n }\n }else {\n if((queue[0].getId() != p.getId() && readyPro(queue[0],t)) || (queue[1].getId() != p.getId() && readyPro(queue[1],t))){\n return true;\n }\n }\n return false;\n }",
"private synchronized void process()\n{\n boolean waiter = process_set.isEmpty();\n\n while (waiter || process_set.size() > 0) {\n try {\n\t wait(0);\n }\n catch (InterruptedException e) { }\n if (process_set.size() > 0) waiter = false;\n dumpProcesses();\n }\n}",
"@NotNull\n public CpuThreadSliceInfo[] getProcessList(String hint) {\n assert myModel != null;\n CpuThreadSliceInfo[] processList = new CpuThreadSliceInfo[myModel.getProcesses().size()];\n Stream<ProcessModel> processStream = myModel.getProcesses().values().stream();\n int index = 0;\n String hintLower = hint.toLowerCase(Locale.getDefault());\n processStream = processStream.sorted((a, b) -> {\n String aNameLower = getMainThreadForProcess(a).toLowerCase(Locale.getDefault());\n String bNameLower = getMainThreadForProcess(b).toLowerCase(Locale.getDefault());\n\n // If either the left or right names overlap with our hint we want to bubble those elements\n // to the top.\n // Eg. Hint = \"Test\"\n // A = \"Project\"\n // B = \"Test_Project\"\n // The sorting should be Test_Project, Project.\n if (hintLower.contains(aNameLower) && !hintLower.contains(bNameLower)) {\n return -1;\n }\n else if (hintLower.contains(bNameLower) && !hintLower.contains(aNameLower)) {\n return 1;\n }\n\n // If our name starts with < then we have a process whose name did not resolve as such we bubble these elements\n // to the bottom of our list.\n // A = \"<1234>\"\n // B = \"Test_Project\"\n // The sorting should be Test_Project, <1234>\n if (aNameLower.startsWith(\"<\") && !bNameLower.startsWith(\"<\")) {\n return 1;\n }\n else if (bNameLower.startsWith(\"<\") && !aNameLower.startsWith(\"<\")) {\n return -1;\n }\n\n // If our project names don't match either our hint, or our <> name then we sort the elements within\n // by count of threads.\n // Note: This also applies if we have multiple projects that match our hint, or don't have a name.\n int threadsGreater = b.getThreads().size() - a.getThreads().size();\n if (threadsGreater != 0) {\n return threadsGreater;\n }\n\n // Finally we sort our projects by name.\n int name = aNameLower.compareTo(bNameLower);\n if (name == 0) {\n return b.getId() - a.getId();\n }\n return name;\n });\n List<ProcessModel> processes = processStream.collect(Collectors.toList());\n for (ProcessModel process : processes) {\n String name = getMainThreadForProcess(process);\n processList[index++] = new CpuThreadSliceInfo(process.getId(), name, process.getId(), name);\n }\n return processList;\n }",
"public void getBinderPids(ArrayList<Integer> anrBinders) {\n ArrayList<Integer> tmpBindersList = new ArrayList<Integer>();\n try {\n\n for (int j = 0; j < anrBinders.size(); j++) {\n for (int i = 0; i < binderAllPids.size(); i++) {\n if (binderAllPids.get(i).get(0).equals(anrBinders.get(j))) {\n for (int k = 0; k < binderAllPids.get(i).size(); k++) {\n Integer tmp = binderAllPids.get(i).get(k);\n if ((tmpBindersList.contains(tmp) || (binderPids.contains(tmp)))) {\n continue;\n }\n Log.i(BINDERTRACKER, anrBinders.get(j) + \" binder communication with: \" + binderAllPids.get(i).get(k));\n tmpBindersList.add(tmp);\n binderPids.add(tmp);\n }\n continue;\n }\n }\n }\n //no others binders communicated with <anr_pid> ,or have found out all binders communicated with <anr_pid>\n if (tmpBindersList.size() == 0) {\n return;\n }\n if (DEBUG) {\n Log.d(BINDERTRACKER, \"binderPids: \" + binderPids.size() + \",\" + binderPids);\n }\n getBinderPids(tmpBindersList);\n\n } catch (Exception e) {\n Log.e(BINDERTRACKER, \"method getAll() happened unknown error!\");\n }\n }",
"public String[] getAllProcessNames() {\n return getProcessNames(this.getProcesses());\n }",
"public synchronized AbstractProcess[] getProcesses() {\n\t\tAbstractProcess[] result = new AbstractProcess[processes.size()];\n\t\tIterator<ProcessEntry> iter = processes.values().iterator();\n\t\tfor (int i = 0; iter.hasNext(); i++) {\n\t\t\tresult[i] = iter.next().process;\n\t\t}\n\t\treturn result;\n\t}",
"@Override\n public List<ExecutionEntity> findChildExecutionsByProcessInstanceId(String processInstanceId) {\n log.debug(\"findChildExecutionsByProcessInstanceId[processInstanceId={}]\", processInstanceId);\n return findMany(findChildExecutionsByProcessInstanceId, processInstanceId, executionsByProcessInstanceIdMatcher);\n }",
"private boolean isSecondBrowserServiceRunning() {\n ActivityManager activityManager =\n (ActivityManager) mActivityTestRule.getActivity().getSystemService(\n Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo si : activityManager.getRunningServices(65536)) {\n if (si.pid == mSecondBrowserServicePid) return true;\n }\n return false;\n }",
"public Collection<IProcess> getProcess(String processName) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic int compareTo(Process other) {\n\t\tif (this == other) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (this.administrativeDistance != other.administrativeDistance) {\n\t\t\treturn (this.administrativeDistance - other.administrativeDistance);\n\t\t}\n\t\t//FIXME tiebreaking by pid\n//\t\tif (this.isOspfProcess() && other.isOspfProcess()) {\n//\t\t\treturn (this.ospfConfig.getPid() - other.ospfConfig.getPid());\n//\t\t}\n//\t\tif (this.isBgpProcess() && other.isBgpProcess()) {\n//\t\t\treturn (this.bgpConfig.getPid() - other.bgpConfig.getPid());\n//\t\t}\n\t\t//FIXME: What is the default?\n\t\treturn 0;\n\t}",
"private Process fetchProcessByRniId(String rniId)\r\n\t{\r\n\t\tProcess process = (Process)doQueryForObject(getSqlSession(), FETCH_PROCESS_BY_RNI_ID, rniId);\r\n\r\n\t\tif (ValidationUtil.isNull(process))\r\n\t\t{\r\n\t\t\treturn process;\r\n\t\t}\r\n\r\n\t\t// if a process was found, check parent\r\n\t\tif (!ValidationUtil.isNull(process.getParentProcess())\r\n\t\t\t\t&& !ValidationUtil.isNullOrZero(process.getParentProcess().getId()))\r\n\t\t{\r\n\t\t\tprocess.setParentProcess(this.fetchProcessById(process.getParentProcess()\r\n\t\t\t\t\t.getId()));\r\n\t\t}\r\n\r\n\t\treturn process;\r\n\t}",
"private List<DownloadPackage> searchByParentCode(String parentCode) {\n Collection<DownloadPackage> packages = application.getPackageMap().values();\n List<DownloadPackage> results = new ArrayList<DownloadPackage>();\n for (DownloadPackage pack : packages) {\n if (parentCode == null) {\n if (pack.getParentCode() == null) {\n results.add(pack);\n }\n } else if (parentCode.equals(pack.getParentCode())) {\n results.add(pack);\n }\n }\n return results;\n }",
"public List<PackageInfo> getActiveApps() {\n\n ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningAppProcessInfo> tasks = activityManager.getRunningAppProcesses();\n\n List<PackageInfo> installedApps = getInstalledApps(true);\n List<String> runningAppProcesses = new ArrayList<>();\n\n List<PackageInfo> activeApps = new ArrayList<>();\n\n //get the running processes\n for(ActivityManager.RunningAppProcessInfo i : tasks){\n runningAppProcesses.add(i.processName);\n }\n\n //Check which ones of those processes correspond to a process of one installed app\n // is excluded this way all the system processes\n for(PackageInfo app : installedApps){\n String pName = app.applicationInfo.processName;\n\n if(runningAppProcesses.contains(pName)){\n activeApps.add(app);\n }\n }\n return activeApps;\n }",
"public native int getProcess();",
"public ArrayList<String> getAllRunningApp() {\n\t\tArrayList<String> apps = new ArrayList<String>();\n\t\tActivityManager activityManager = (ActivityManager)getSystemService(ACTIVITY_SERVICE);\n\t\tList<RunningAppProcessInfo> runningAppProcesses = activityManager.getRunningAppProcesses();\n\t\t\n\t\tfor (RunningAppProcessInfo runningAppProcessInfo : hgf)\n\t\t{\n\t\t apps.add(runningAppProcessInfo.processName);\n\t\t}\n\t\treturn apps;\n\t}",
"Process getProcess();",
"public static List<String> getPageProcessDefKeys2(ASPManager mgr ,String url) {\n\t\tList<String> ls_processKeys = new ArrayList<String>();\n\t\tASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n\t\tString sql = \"SELECT T.PROCESS_KEY PROCESS_KEY FROM HZ_BIZ_WF_CONFIG T WHERE T.PAGE_PATH = '\" + url + \"'\";\n\t\ttrans.addQuery(\"BPROCESSNAMES\", sql);\n\t\t\n\t\ttrans = mgr.perform(trans);\n\t\t\n\t\tASPBuffer buffer = trans.getBuffer(\"BPROCESSNAMES\");\n\t\t\n\t\tint count = buffer.countItems();\n\t\t\n\t\tfor (int i = 0; i < count; i++)\n\t\t{\n\t\t\tif(\"DATA\".equals(buffer.getNameAt(i)))\n\t\t\t{\n\t\t\t\tls_processKeys.add(buffer.getBufferAt(i).getValue(\"PROCESS_KEY\"));\n\t\t\t}\n\t\t}\n\t\treturn ls_processKeys;\n\t}",
"public Queue<PCB> getProcesses() {\r\n\t\ttry {\r\n\t\t\treturn this.loadToJobQueue();\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\tSystem.err.println(\"File not found!!\");\r\n\t\t}\r\n\t\treturn JobQueue;\r\n\t}",
"public static String m149889b(Context context) {\n String str = f123375a;\n if (!TextUtils.isEmpty(str)) {\n return str;\n }\n try {\n int myPid = Process.myPid();\n for (RunningAppProcessInfo runningAppProcessInfo : ((ActivityManager) context.getSystemService(\"activity\")).getRunningAppProcesses()) {\n if (runningAppProcessInfo.pid == myPid) {\n if (C48317f.m149883a().loggerDebug()) {\n StringBuilder sb = new StringBuilder(\"processName = \");\n sb.append(runningAppProcessInfo.processName);\n C48317f.m149883a().loggerD(\"Process\", sb.toString());\n }\n String str2 = runningAppProcessInfo.processName;\n f123375a = str2;\n return str2;\n }\n }\n } catch (Exception unused) {\n }\n String a = m149886a();\n f123375a = a;\n return a;\n }",
"public Map<Integer, AwareProcessBaseInfo> getAllProcessBaseInfo() {\n ArrayMap<Integer, AwareProcessBaseInfo> list = new ArrayMap();\n synchronized (this.mPidsSelfLocked) {\n int i = SMART_TRIM_ADJ_LIMIT;\n while (true) {\n if (i < this.mPidsSelfLocked.size()) {\n ProcessRecord p = (ProcessRecord) this.mPidsSelfLocked.valueAt(i);\n AwareProcessBaseInfo baseInfo = new AwareProcessBaseInfo();\n baseInfo.mCurAdj = p.curAdj;\n baseInfo.mForegroundActivities = p.foregroundActivities;\n baseInfo.mAdjType = p.adjType;\n baseInfo.mHasShownUi = p.hasShownUi;\n baseInfo.mUid = p.uid;\n list.put(Integer.valueOf(p.pid), baseInfo);\n i += ROG_CHANGE_EVENT_SWITCH;\n }\n }\n }\n return list;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof IwApplicationProcess)) {\n return false;\n }\n IwApplicationProcess other = (IwApplicationProcess) object;\n if ((this.iwApplicationProcessId == null && other.iwApplicationProcessId != null) || (this.iwApplicationProcessId != null && !this.iwApplicationProcessId.equals(other.iwApplicationProcessId))) {\n return false;\n }\n return true;\n }",
"private ArrayList findEntryPoints(RantSystem rantSystem, String processId) {\n ArrayList topPoints = new ArrayList();\n\n if (rantSystem.getProcess(processId) != null) {\n Process process = rantSystem.getProcess(processId);\n\n // Ok got the process, now check for processes that are not called by anyone\n MetricGroup metricGroup = (MetricGroup) process.getMetricGroup(SequencePlugin.class.getName());\n\n if (metricGroup != null) {\n // Ok now create a list of metrics that do not have a caller\n HashMap metrics = metricGroup.getMetrics();\n Iterator iterator = metrics.values().iterator();\n\n while (iterator.hasNext()) {\n SequenceMetric sequenceMetric = (SequenceMetric) iterator.next();\n\n // Establish if this sequenceplugin metric has any parents\n Iterator allSequenceMetrics = metrics.values().iterator();\n boolean hasParent = false;\n\n while (allSequenceMetrics.hasNext()) {\n SequenceMetric sequenceMetricElement = (SequenceMetric) allSequenceMetrics.next();\n\n // Ok, if this has a parent, signal and break the loop\n if (sequenceMetric.getCallerClass().equals(sequenceMetricElement.getCalleeClass()) && sequenceMetric.getCallerMethod().equals(sequenceMetricElement.getCalleeMethod())) {\n hasParent = true;\n break;\n }\n }\n\n if (hasParent == false)\n topPoints.add(sequenceMetric);\n }\n }\n }\n\n return topPoints;\n }",
"synchronized void cullDeadProcesses() {\n\t\t// Removes processes that have completed and haven't been checked on\n\t\t// for maxLiveTime milliseconds.\n\t\t//long cullBefore = System.currentTimeMillis() - maxLiveTime;\n\t\t//int before = processes.size();\n\t\tIterator<Map.Entry<Long, ProcessEntry>> iter = processes.entrySet().iterator();\n\t\tint runningCount = 0;\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry<Long, ProcessEntry> entry = iter.next();\n\t\t\tProcessEntry pe = entry.getValue();\n\t\t\tAbstractProcess.Status status = pe.process.getStatus();\n\t\t\t// For now, we never remove \"dead\" processes to ensure the status\n\t\t\t// is maintained. So instead all this does is check to make sure\n\t\t\t// that the run count doesn't get messed up.\n\t\t\t/*if (pe.lastAccess < cullBefore && status.isDead()) {\n\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\tlogger.debug(\"Process {} last accessed {}, before cutoff of {}.\",\n\t\t\t\t\t\t\tnew Object[] { uidToString(entry.getKey()),\n\t\t\t\t\t\t\tdateFormat.format(new Date(entry.getValue().lastAccess)),\n\t\t\t\t\t\t\tdateFormat.format(new Date(cullBefore)) });\n\t\t\t\t}\n\t\t\t\tpe.process.destroy();\n\t\t\t\titer.remove();\n\t\t\t} else */\n\t\t\tif (status == AbstractProcess.Status.RUNNING) {\n\t\t\t\trunningCount++;\n\t\t\t}\n\t\t}\n\t\t//logger.info(\"Removed {} processes.\", before - processes.size());\n\t\tif (this.runningCount != runningCount) {\n\t\t\tlogger.error(\"Actual running count {} does not match stored running count of {}! This is a bug!\", runningCount, this.runningCount);\n\t\t\t// Fix this\n\t\t\tthis.runningCount = runningCount;\n\t\t\tcheckRunningProcesses();\n\t\t}\n\t}",
"private void findNmap() {\n\t\tString [] command = {\"/bin/which\", \"nmap\"};\n\t Process p;\n\t String commandReturned = new String();\n\t ArrayList<String> readLine = new ArrayList<String>();\n\t\ttry {\n\t // run the command\n\t p = Runtime.getRuntime().exec(command);\n\t BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t // get the result\n\t while((commandReturned = br.readLine()) != null){\n\t \treadLine.add(commandReturned);\n\t \t//System.out.println(commandReturned);\n\t }\n\t p.waitFor();\n\t if(p.exitValue() == 1 ){\n\t \tSystem.out.println (\"Erro ao executar comando \" + command);\n\t }\n\t p.destroy();\n\t } catch (Exception e) {}\n\t\t\n\t this.setNMap(readLine.get(0));\n\t}",
"public static java.lang.String getProcessName(android.content.Context r13, int r14) {\n /*\n r12 = -108(0xffffffffffffff94, float:NaN)\n java.lang.String r6 = \"\"\n java.lang.String r8 = \"activity\"\n java.lang.Object r1 = r13.getSystemService(r8) // Catch:{ Exception -> 0x0071 }\n android.app.ActivityManager r1 = (android.app.ActivityManager) r1 // Catch:{ Exception -> 0x0071 }\n java.util.List r7 = r1.getRunningAppProcesses() // Catch:{ Exception -> 0x0071 }\n if (r7 == 0) goto L_0x003f\n int r8 = r7.size() // Catch:{ Exception -> 0x0071 }\n if (r8 <= 0) goto L_0x003f\n java.util.Iterator r3 = r7.iterator() // Catch:{ Exception -> 0x0071 }\n L_0x001e:\n boolean r8 = r3.hasNext() // Catch:{ Exception -> 0x0071 }\n if (r8 == 0) goto L_0x0034\n java.lang.Object r8 = r3.next() // Catch:{ Exception -> 0x0071 }\n android.app.ActivityManager$RunningAppProcessInfo r8 = (android.app.ActivityManager.RunningAppProcessInfo) r8 // Catch:{ Exception -> 0x0071 }\n r0 = r8\n android.app.ActivityManager$RunningAppProcessInfo r0 = (android.app.ActivityManager.RunningAppProcessInfo) r0 // Catch:{ Exception -> 0x0071 }\n r4 = r0\n int r8 = r4.pid // Catch:{ Exception -> 0x0071 }\n if (r8 != r14) goto L_0x001e\n java.lang.String r6 = r4.processName // Catch:{ Exception -> 0x0071 }\n L_0x0034:\n boolean r8 = android.text.TextUtils.isEmpty(r6)\n if (r8 == 0) goto L_0x003e\n java.lang.String r6 = getProcessNameNew(r14)\n L_0x003e:\n return r6\n L_0x003f:\n r8 = -108(0xffffffffffffff94, float:NaN)\n java.lang.StringBuilder r9 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0071 }\n r9.<init>() // Catch:{ Exception -> 0x0071 }\n java.lang.String r10 = \"BuildVersion=\"\n java.lang.StringBuilder r9 = r9.append(r10) // Catch:{ Exception -> 0x0071 }\n int r10 = android.os.Build.VERSION.SDK_INT // Catch:{ Exception -> 0x0071 }\n java.lang.String r10 = java.lang.String.valueOf(r10) // Catch:{ Exception -> 0x0071 }\n java.lang.StringBuilder r9 = r9.append(r10) // Catch:{ Exception -> 0x0071 }\n java.lang.String r9 = r9.toString() // Catch:{ Exception -> 0x0071 }\n java.lang.String r5 = anet.channel.util.ErrorConstant.formatMsg(r8, r9) // Catch:{ Exception -> 0x0071 }\n anet.channel.appmonitor.IAppMonitor r8 = anet.channel.appmonitor.AppMonitor.getInstance() // Catch:{ Exception -> 0x0071 }\n anet.channel.statist.ExceptionStatistic r9 = new anet.channel.statist.ExceptionStatistic // Catch:{ Exception -> 0x0071 }\n r10 = -108(0xffffffffffffff94, float:NaN)\n java.lang.String r11 = \"rt\"\n r9.<init>(r10, r5, r11) // Catch:{ Exception -> 0x0071 }\n r8.commitStat(r9) // Catch:{ Exception -> 0x0071 }\n goto L_0x0034\n L_0x0071:\n r2 = move-exception\n anet.channel.appmonitor.IAppMonitor r8 = anet.channel.appmonitor.AppMonitor.getInstance()\n anet.channel.statist.ExceptionStatistic r9 = new anet.channel.statist.ExceptionStatistic\n java.lang.String r10 = r2.toString()\n java.lang.String r11 = \"rt\"\n r9.<init>(r12, r10, r11)\n r8.commitStat(r9)\n goto L_0x0034\n */\n throw new UnsupportedOperationException(\"Method not decompiled: anet.channel.util.Utils.getProcessName(android.content.Context, int):java.lang.String\");\n }",
"public int[] getAllPids(Activity context) throws Exception {\n ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningServiceInfo> pids = activityManager.getRunningServices(Integer.MAX_VALUE);\n int processid = 0;\n int[] retVal = new int[pids.size()];\n Log.d(\"feature\", \"pid size: \" + pids.size());\n for (int i = 0; i < pids.size(); i++) {\n ActivityManager.RunningServiceInfo info = pids.get(i);\n retVal[i] = info.pid;\n Log.d(\"feature\", \"pid: \" + info.service);\n\n return (retVal);\n }\n return(null);\n }",
"public boolean processRunning(String process, String[] processList) {\n process = process.toLowerCase();\n\n for (String processItem : processList) {\n try {\n // should not kill system32 processes, as it might kill the system\n if (processItem.contains(\"System32\"))\n break;\n\n processItem = processItem\n .substring(processItem.lastIndexOf(\"\\\\\") + 1, processItem.length())\n .toLowerCase();\n\n if (processItem.equals(process))\n return true;\n\n } catch (NullPointerException e) {\n // do not care about nulls\n }\n }\n\n return false;\n }",
"@Override\r\n\tpublic List<Object[]> searchProductionOrderProcess() {\n\t\ttry {\r\n\r\n\t\t\tlist = productionOrderProcessDao.searchProductionOrderProcess();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}",
"void findMatchings(boolean isProtein) {\n\n GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();\n HashSet<String > searchSpaceList = new HashSet<>();\n GraphDatabaseService databaseService = dbFactory.newEmbeddedDatabase(graphFile);\n for (int id: queryGraphNodes.keySet()) {\n if(isProtein)\n searchSpaceList.add(queryGraphNodes.get(id).label);\n else\n searchSpaceList.add(String.valueOf(queryGraphNodes.get(id).labels.get(0)));\n }\n for(String x: searchSpaceList) {\n ResourceIterator<Node> xNodes;\n try(Transaction tx = databaseService.beginTx()) {\n xNodes = databaseService.findNodes(Label.label(x));\n tx.success();\n }\n\n while (xNodes.hasNext()) {\n Node node = xNodes.next();\n if (searchSpaceProtein.containsKey(x))\n searchSpaceProtein.get(x).add(node.getId());\n else {\n HashSet<Long> set = new HashSet<>();\n set.add(node.getId());\n searchSpaceProtein.put(x, set);\n }\n }\n\n }\n\n if(isProtein)\n search(0, databaseService, true);\n else\n search(0, databaseService, false);\n databaseService.shutdown();\n }",
"public int compareTo(Process other) {//Here we run through a series of variable comparisons to determine how two processes compare\n if (arrival_time > other.arrival_time) {\n return 1;\n } else if (arrival_time < other.arrival_time) {\n return -1;\n } else if ((req_time - tot_CPUtime) > (other.req_time - other.tot_CPUtime)){\n return 1;\n } else if((req_time - tot_CPUtime) < (other.req_time - other.tot_CPUtime)) {\n return -1;\n } else if (pid > other.pid) {\n return 1;\n } else if(pid < other.pid) {\n return -1;\n }\n else if (penalty_ratio > other.penalty_ratio){\n \treturn 1;\n } else if (penalty_ratio < other.penalty_ratio){\n \treturn -1;\n } else {\n \treturn 0;//If all variables are the same, then they are considered equal \n }\n }",
"void populatePidToHolderMap() {\n\t\tSet<Integer> visited = new HashSet<Integer>();\n\t\tQueue<Integer> visitQueue = new LinkedList<Integer>();\n\t\tvisitQueue.add(pid);\n\t\tvisited.add(pid);\n\t\twhile(!visitQueue.isEmpty()) {\n\t\t\tint nodePid = visitQueue.poll();\n\t\t\tList<Integer> neighborList = neighborMap.get(nodePid);\n\t\t\tfor (int neighborPid : neighborList) {\n\t\t\t\tif (!visited.contains(neighborPid)) {\n\t\t\t\t\tpidToHolderMap.put(neighborPid, nodePid);\n\t\t\t\t\tvisitQueue.add(neighborPid);\n\t\t\t\t\tvisited.add(neighborPid);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private boolean notInArray(Process p, Process[] q){\n for(int i =0; i<q.length; i++){\n if(q[i]==p){\n return false;\n }\n }\n return true;\n }",
"synchronized void addProcess(DpinProcess dp)\n{\n if (dp != null) process_set.put(dp.getId(),dp);\n notifyAll();\n}",
"private void dumpProcesses()\n{\n System.err.println(\"\\n\\nDumping Processes\");\n for (DpinProcess dp : process_set.values()) {\n dp.dump();\n }\n}",
"public BusinessConfig findProcessId(Connection conn, String openId, String businessId)\r\n/* 43: */ throws SQLException\r\n/* 44: */ {\r\n/* 45: 76 */ return this.dao.findProcessId(conn, openId, businessId);\r\n/* 46: */ }",
"public void updateStates() {\n if (isRunningProcess && currentRunningProcess.getState() == ProcessState.RUNNING\n && currentRunningProcess.remainingCPUBurstTime == 0) {\n //this is end of current cpu burst, check if any more cpu time to go.\n if (currentRunningProcess.remainingCPUTime <= 0) {\n currentRunningProcess.setFinished(currentTime);\n processCounter--;\n } else {\n //this process still has more CPU time to go.\n currentRunningProcess.setBlocked();\n isBlockedProcess++;\n }\n isRunningProcess = false;\n currentRunningProcess = null;\n }\n for (Process process : processes) {\n // For each process:\n // Check if this is the running process and if it needs to be preempted (RR algorithm only).\n if (process == currentRunningProcess && currentAlgorithm == Algorithm.RR) {\n if (isRunningProcess && remainingQuantum == 0) {\n //this process has finished its quantum, it will be preempted by the next\n //ready process.\n currentRunningProcess.setReady(readyProcesses);\n isRunningProcess = false;\n currentRunningProcess = null;\n }\n }\n // Check if this process has finished being blocked.\n if (process.getState() == ProcessState.BLOCKED\n && process.remainingBlockedBurstTime == 0) {\n \tif(currentAlgorithm == Algorithm.UP){\n \t\tprocess.setRunning(randomNumbers.remove(0));\n \t\tisRunningProcess = true;\n \t\tcurrentRunningProcess = process;\n \t}\n \telse{\n \t\tprocess.setReady(readyProcesses);\n \t}\n isBlockedProcess--;\n // If UP algorithm. Set running. Otherweise set ready\n }\n // Check if this process is ready to run:\n if (process.arrivalTime <= currentTime) {\n if (process.getState() == ProcessState.NONEXISTENT) {\n process.setReady(readyProcesses);\n }\n }\n }\n }",
"public String getProcessName() throws RemoteException;",
"@Nullable\n public LinkedList<Integer> listProcesses() throws IOException, InterruptedException, TimeoutException {\n // Debug\n String tag = TAG + \": listProcesses()\";\n Log.d(tag, \"Called\");\n\n // Start process with root\n Process proc = Runtime.getRuntime().exec(\"su\");\n\n // Input commands:\n // ls /proc\n // exit\n OutputStream stdin = proc.getOutputStream();\n stdin.write(\"ls /proc\\n\".getBytes());\n stdin.write(\"exit\\n\".getBytes());\n stdin.flush();\n stdin.close();\n\n // Gather process ids from the stdout\n LinkedList<Integer> pids = new LinkedList<>();\n BufferedReader stdout = new BufferedReader(new InputStreamReader(proc.getInputStream()));\n String filename;\n while ((filename = stdout.readLine()) != null) {\n Boolean matches = filename.matches(\"^\\\\d+$\");\n Log.d(tag, filename + \": \" + matches.toString()); // Debug\n if (!matches) continue;\n pids.add(Integer.parseInt(filename));\n }\n stdout.close();\n\n // Handle timing out execution\n if (Build.VERSION.SDK_INT >= 26) {\n boolean exited = proc.waitFor(1L, TimeUnit.SECONDS);\n if (!exited) {\n proc.destroy();\n throw new TimeoutException();\n }\n } else {\n proc.waitFor();\n }\n Log.d(tag, \"Exited with: \" + Integer.toString(proc.exitValue())); // Debug\n\n return pids;\n }",
"private void checkForOverlappingInstances(ParseTreeNode moduleDefnNode) {\r\n moduleDefnNode.verifyType(CALTreeParserTokenTypes.MODULE_DEFN); \r\n checkForOverlappingInstances(moduleDefnNode, currentModuleTypeInfo, new HashSet<ModuleName>(), new HashMap<ClassInstanceIdentifier, ClassInstance>()); \r\n }",
"public abstract Process getProcess();",
"public void closeAllProcesses(){\r\n \t\t// copy since endLongRunning removes from the map\r\n \t\tIFile[] fs=buildProcesses.keySet().toArray(new IFile[buildProcesses.size()]);\r\n \t\tfor (IFile f:fs){\r\n \t\t\tendLongRunning(f);\r\n \t\t}\r\n \t\tbuildProcesses.clear();\r\n \t}",
"private GlobalState search(Map<String,String> stateMapping) {\n GlobalState desired = new GlobalState(nodes,binding);\n desired.addMapping(stateMapping);\n for(GlobalState g : globalStates) {\n if(g.equals(desired))\n return g;\n }\n return null;\n }",
"String process_mgr_name () throws BaseException;",
"public Map<String, String> findProcessTypeName() {\n\t\tList<WorkflowVersionDTO> versions = workflowVersionService.findActiveWorkflowVersion();\n\t\tMap<String, String> map = new HashMap<>(versions.size());\n\t\tfor (WorkflowVersionDTO version : versions) {\n\t\t\tmap.put(version.getProcessType(), version.getProcessName());\n\t\t}\n\n\t\treturn sortByValue(map);\n\t}",
"public void pathFinder() {\n String oldPath = path;\n ProcessHandle.allProcesses()\n .forEach(process -> checkProcess(process.info()));\n writePath();\n //return (oldPath != path);\n }",
"private int getRunningNum() {\n\t\treturn am.getRunningAppProcesses().size();\r\n\t}",
"private static boolean isProcessRunning(ManufactureProcessInfo processInfo, Manufacture manufactureBuilding) {\n\t\tboolean result = false;\n\n\t\tIterator<ManufactureProcess> i = manufactureBuilding.getProcesses().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tManufactureProcess process = i.next();\n\t\t\tif (process.getInfo().getName() == processInfo.getName()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"protected TargetModuleID[] findApplication(String moduleID, Boolean running) \n throws Exception {\n TargetModuleID[] list = getAllApplications(running);\n return filterTargetModuleIDsByModule(list, moduleID);\n }",
"public Set<String> getBuildableProcesses(Set<String> builtProcesses){\n return dependencies.keySet().stream()\n .filter(k ->builtProcesses.containsAll(dependencies.get(k)))\n .filter(k -> !builtProcesses.contains(k))\n .collect(Collectors.toSet());\n }",
"public List getProcessIds()\r\n\t{\n\t\treturn null;\r\n\t}",
"public static boolean isNamedProcess(Context context, String processName) {\n if (context == null) {\n return false;\n }\n\n int pid = android.os.Process.myPid();\n ActivityManager manager = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningAppProcessInfo> processInfoList = manager.getRunningAppProcesses();\n if (processInfoList == null) {\n return true;\n }\n\n for (ActivityManager.RunningAppProcessInfo processInfo : manager.getRunningAppProcesses()) {\n if (processInfo.pid == pid && ObjectUtils.isEquals(processName, processInfo.processName)) {\n return true;\n }\n }\n return false;\n }",
"private static RuntimeManager getRuntimeManager(String process) {\n JBPMHelper.startH2Server();\n JBPMHelper.setupDataSource();\n\n // for external database\n // setupDataSource();\n\n Properties properties = new Properties();\n properties.setProperty(\"krisv\", \"\");\n properties.setProperty(\"mary\", \"\");\n properties.setProperty(\"john\", \"\");\n UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties);\n\n emf = Persistence.createEntityManagerFactory(\"org.jbpm.persistence.jpa\", null);\n\n RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault().persistence(true)\n .entityManagerFactory(emf).userGroupCallback(userGroupCallback)\n .addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2).get();\n return RuntimeManagerFactory.Factory.get().newPerProcessInstanceRuntimeManager(environment);\n\n }",
"private static boolean fetchProcessList(long clientId) {\n\t\tfinal Connection con = DBConnection.getConnection();\n\t\tResultSet amsResultSets = null;\n\t\tResultSet processResultSet = null;\n\t\tPreparedStatement getProcessStatement = null;\n\t\tPreparedStatement existingAmsProcessSync = null;\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);\n\t\t\texistingAmsProcessSync = con\n\t\t\t\t\t.prepareStatement(ResourceManager.getQueryValue(\"QUERY_FETCH_EXISTING_AMS_PROCESS_SYNC_LOG\"));\n\t\t\texistingAmsProcessSync.setLong(1, clientId);\n\t\t\tlog.info(existingAmsProcessSync.toString());\n\t\t\tamsResultSets = existingAmsProcessSync.executeQuery();\n\t\t\t// checking if this clientId exists in ams_process_sync table\n\t\t\tif (amsResultSets.first()) {\n\t\t\t\tcon.commit();\n\t\t\t\t// ams process sync log exists, fetching processes between last_synced_on and\n\t\t\t\t// current timestamp..\n\t\t\t\tgetProcessStatement = con\n\t\t\t\t\t\t.prepareStatement(ResourceManager.getQueryValue(\"QUERY_FETCH_UNSYNCED_PROCESS\"));\n\t\t\t} else {\n\t\t\t\tcon.commit();\n\t\t\t\t// ams process log does not exists, fetching all processes..\n\t\t\t\tgetProcessStatement = con.prepareStatement(ResourceManager.getQueryValue(\"QUERY_FETCH_ALL_PROCESS\"));\n\t\t\t}\n\t\t\tlog.info(getProcessStatement.toString());\n\t\t\tprocessResultSet = getProcessStatement.executeQuery();\n\t\t\tif (processResultSet.first()) {\n\t\t\t\tprocessResultSet.beforeFirst();\n\t\t\t\t// extracting resultSet and building process list\n\t\t\t\tPlatformProcess.Builder processList = resultToProcessBuilderMapper(processResultSet);\n\t\t\t\t// adding an empty processIds map builder\n\t\t\t\tprocessList.addProcessIds(ProcessIds.newBuilder().build());\n\t\t\t\t// publishing to ams\n\t\t\t\treturn publishProcessList(processList.build().toByteArray(), clientId);\n\t\t\t} else {\n\t\t\t\t// process(es) is/are already synced to device, sending message...\n\t\t\t\treturn publishProcessResponseMessage(clientId, \"Process list already synced to device.\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\ttry {\n\t\t\t\tcon.rollback();\n\t\t\t} catch (SQLException e2) {\n\t\t\t\tlog.error(Constants.EXCEPTION, e2);\n\t\t\t}\n\t\t\tlog.error(Constants.EXCEPTION, e);\n\t\t} finally {\n\t\t\tDBConnection.closeConnection(con, existingAmsProcessSync, amsResultSets);\n\t\t\tDBConnection.closeConnection(con, getProcessStatement, processResultSet);\n\t\t}\n\t\treturn false;\n\t}",
"public void showProcesses() {\n\t\tList<RunningAppProcessInfo> infos=am.getRunningAppProcesses();\n\t\tadapter.clear();\n\t\t\n\t\t\n\t\tProcessesListCellData data;\n\t\t\n\t\tfor (RunningAppProcessInfo info : infos) {\n\t\t\t\n\t\t\tdata=new ProcessesListCellData(this,info);\n\t\t\tif (data.appName!=null&&!data.appName.equals(\"\")) {\n\t\t\t\tadapter.addCellData(data);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tMemoryInfo memInfo=new MemoryInfo();\n\t\tam.getMemoryInfo(memInfo);\n\t\tsetTitle(\"进程管理器,可用内存:\"+memInfo.availMem/1024/1024+\"M\");\n\t}",
"private String[] getProcessNames(Stream<ProcessHandle> processHandle) {\n List<Optional<String>> opReturns = new ArrayList<>();\n\n // sort through the process handles and add them to the opReturns list\n processHandle.forEach(process -> opReturns.add(process.info().command()));\n\n List<String> returns = new ArrayList<>();\n\n // stream the names from an Optional<String> list into an array\n opReturns.stream().map(OptionWrapper.pass(Optional<String>::get)).forEach(returns::add);\n\n return returns.toArray(new String[returns.size()]);\n }",
"@Test\n public void testProcessQueryByList() {\n Platform si = new Platform();\n OperatingSystem os = si.getOperatingSystem();\n assertNotNull(os.getFamily());\n assertNotNull(os.getManufacturer());\n OperatingSystem.OSVersionInfo versionInfo = os.getVersionInfo();\n assertNotNull(versionInfo);\n\n assertTrue(os.getProcessCount() >= 1);\n assertTrue(os.getThreadCount() >= 1);\n assertTrue(os.getProcessId() > 0);\n\n List<OSProcess> processes = os.getProcesses(5, null);\n assertNotNull(processes);\n // every OS should have at least one process running on it\n assertFalse(processes.isEmpty());\n // the list of pids we want info on\n List<Integer> pids = new ArrayList<>();\n for (OSProcess p : processes) {\n pids.add(p.getProcessID());\n }\n // query for just those processes\n Collection<OSProcess> processes1 = os.getProcesses(pids);\n // there's a potential for a race condition here, if a process we\n // queried for initially wasn't running during the second query. In this case,\n // try again with the shorter list\n while (processes1.size() < pids.size()) {\n pids.clear();\n for (OSProcess p : processes1) {\n pids.add(p.getProcessID());\n }\n // query for just those processes\n processes1 = os.getProcesses(pids);\n }\n assertEquals(processes1.size(), pids.size());\n\n }",
"java.lang.String getProcessId();",
"List<ProcessDefinition> findByNameAndVersion(String name, int version);",
"public PDDeviceNProcess getProcess() {\n/* 93 */ COSDictionary process = (COSDictionary)this.dictionary.getDictionaryObject(COSName.PROCESS);\n/* 94 */ if (process == null)\n/* */ {\n/* 96 */ return null;\n/* */ }\n/* 98 */ return new PDDeviceNProcess(process);\n/* */ }",
"@Override\n public void onClick(View view) {\n List<AndroidAppProcess> runningAppProcessInfo = AndroidProcesses.getRunningAppProcesses();\n\n for (int i = 0; i < runningAppProcessInfo.size(); i++) {\n Log.i(\"MainActivity\", runningAppProcessInfo.get(i).getPackageName());\n // Check for AnkuLua\n if(runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.pro2\") ||\n runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.pro\") ||\n runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.trial\")){\n\n // AnkuLua package process has been detected! Perma ban account for abusing Terms & Conditions\n alert();\n return;\n }\n }\n Toast.makeText(MainActivity.this,\"Not Found\",Toast.LENGTH_SHORT).show();\n }",
"public void search() {\n while (!done) {\n num2 = mNums.get(cntr);\n num1 = mSum - num2;\n\n if (mKeys.contains(num1)) {\n System.out.printf(\"We found our pair!...%d and %d\\n\\n\",num1,num2);\n done = true;\n } //end if\n\n mKeys.add(num2);\n cntr++;\n\n if (cntr > mNums.size()) {\n System.out.println(\"Unable to find a matching pair of Integers. Sorry :(\\n\");\n done = true;\n }\n } //end while\n }",
"@Override\n public List<ClarifaiProcessDTO> search(String query) {\n log.debug(\"Request to search ClarifaiProcesses for query {}\", query);\n return StreamSupport\n .stream(clarifaiProcessSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .map(clarifaiProcessMapper::toDto)\n .collect(Collectors.toList());\n }",
"public static boolean testInsertWaitingProcessQueue() {\r\n\t\tWaitingProcessQueue queue = new WaitingProcessQueue();\r\n\t\tCustomProcess process1 = new CustomProcess(10);\r\n\t\tCustomProcess process2 = new CustomProcess(2);\r\n\t\tCustomProcess process3 = new CustomProcess(5);\r\n\t\tCustomProcess process4 = new CustomProcess(3);\r\n\t\tCustomProcess process5 = new CustomProcess(1);\r\n\t\tqueue.insert(process1);\r\n\t\tqueue.insert(process2);\r\n\t\tqueue.insert(process3);\r\n\t\tqueue.insert(process4);\r\n\t\tqueue.insert(process5);\r\n\r\n\t\tif (queue.size() != 5)\r\n\t\t\treturn false;\r\n\t\tif (queue.peekBest() != process5)\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t}",
"protected boolean killRunningProcesses(SUT sut, long KILL_WINDOW){\n\t\tboolean allKilled = true;\n\t\tfor(ProcessHandle ph : Util.makeIterable(sut.get(Tags.ProcessHandles, Collections.<ProcessHandle>emptyList().iterator()))){\n\t\t\tif (ph.name() != null && sut.get(Tags.Desc, \"\").contains(ph.name())){\n\t\t\t\ttry{\n\t\t\t\t\tSystem.out.println(\"\\tWill kill <\" + ph.name() +\"> with PID <\" + ph.pid() + \">\");\n\t\t\t\t\tph.kill();\n\t\t\t\t} catch (SystemStopException e){\n\t\t\t\t\tSystem.out.println(\"Exception killing SUT running processes: \" + e.getMessage());\n\t\t\t\t\tallKilled = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn allKilled;\n\t}",
"private SortedMap searchByPID(Person person, IcsTrace trace) {\n\t\tProfile.begin(\"PersonIdServiceBean.searchByPID\");\n\n\t\tTreeMap ret = new TreeMap();\n\t\tDatabaseServices dbServices = DatabaseServicesFactory.getInstance();\n\n\t\ttry {\n\t\t\tList matches = null;\n\n\t\t\tIterator ids = person.getPersonIdentifiers().iterator();\n\n\t\t\tQueryParamList params = new QueryParamList(QueryParamList.OR_LIST);\n\t\t\twhile (ids.hasNext()) {\n\t\t\t\tQueryParamList inner = new QueryParamList(\n\t\t\t\t\t\tQueryParamList.AND_LIST);\n\t\t\t\tPersonIdentifier pid = (PersonIdentifier) ids.next();\n\t\t\t\tinner.add(AttributeType.PERSON_IDENTIFIER, pid.getId());\n\t\t\t\tinner.add(AttributeType.AA_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningAuthority().getNameSpaceID());\n\t\t\t\tinner.add(AttributeType.AF_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningFacility().getNameSpaceID());\n\t\t\t\tparams.add(inner);\n\t\t\t}\n\t\t\tmatches = dbServices.query(params);\n\n\t\t\tif (trace.isEnabled()) {\n\t\t\t\ttrace.add(\"Persons that match PIDS:\");\n\t\t\t\tIterator i = matches.iterator();\n\t\t\t\twhile (i.hasNext())\n\t\t\t\t\ttrace.add((Person) i.next());\n\t\t\t}\n\n\t\t\tIterator i = matches.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tPerson match = (Person) i.next();\n\t\t\t\tret.put(new Double(1.0), match);\n\t\t\t}\n\t\t} catch (DatabaseException dbEx) {\n\t\t\tlog.error(dbEx, dbEx);\n\t\t} finally {\n\t\t\tProfile.end(\"PersonIdServiceBean.searchByPID\");\n\t\t}\n\n\t\treturn ret;\n\t}",
"String getPid();",
"@Override\n\tpublic boolean removeProcess(String procLabel) {\n\t\tif(findProcess(procLabel)) {\n\t\t\tProc procTBD = getProcViaLabel(procLabel);\n\n\t\t\tif(procTBD.getLeftProc() == null && procTBD.getRightProc() == null) {\n\t\t\t\tif(procTBD.getParentProc() != null \n\t\t\t\t\t\t&& procTBD.getParentProc().getLeftProc().getProcLabel().equals(procLabel)){\n\t\t\t\t\tprocTBD.getParentProc().setLeftProc(null);\n\t\t\t\t\tprocTBD = null;\n\t\t\t\t\treturn true;\n\t\t\t\t}else {\n\t\t\t\t\tprocTBD.getParentProc().setRightProc(null);\n\t\t\t\t\tprocTBD = null;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t}else if(procTBD.getLeftProc() != null && procTBD.getRightProc() == null) {\n\t\t\t\tif(procTBD.getParentProc() != null) {\n\t\t\t\t\tprocTBD.getParentProc().setLeftProc(procTBD.getLeftProc());\n\t\t\t\t\tprocTBD = null;\n\t\t\t\t\treturn true;\n\t\t\t\t}else if(procTBD.getParentProc() == null) {\n\t\t\t\t\troot = procTBD.getLeftProc();\n\t\t\t\t\troot.setParentProc(null);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else if(procTBD.getLeftProc() == null && procTBD.getRightProc() != null) {\n\t\t\t\tprocTBD = procTBD.getRightProc();\n\t\t\t}else if(procTBD.getLeftProc() != null && procTBD.getRightProc() != null) {\n\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false; // placeholder, modify this\n\t}",
"public void onNewWorkProcesses(IDuccWork work, ICommandLine commandLine, Map<DuccId, IDuccProcess> newWorkProcessMap, Map<DuccId, IDuccProcess> newWorkProcessMapToUpdate);",
"public void getPaPID(){\r\n DocumentBuilderFactory PAModuleFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder PAModuleBuilder = null;\r\n\r\n try { PAModuleBuilder = PAModuleFactory.newDocumentBuilder(); }\r\n catch (ParserConfigurationException e) { e.printStackTrace(); }\r\n\r\n Document mainExciterSWDocument = null;\r\n try { mainExciterSWDocument = PAModuleBuilder.parse(new File(\"pa_exciter_control.xml\")); }\r\n catch (SAXException e) { e.printStackTrace(); }\r\n catch (IOException e) { e.printStackTrace(); }\r\n\r\n NodeList SWNodeList = mainExciterSWDocument.getDocumentElement().getChildNodes();\r\n\r\n for (int j = 0; j < SWNodeList.getLength(); j++) {\r\n Node SWNode = SWNodeList.item(j);\r\n if (SWNode.getNodeType() == SWNode.ELEMENT_NODE) {\r\n Element swElement = (Element) SWNode;\r\n\r\n paModuleDescription = swElement.getElementsByTagName(\"PIDDESCRIPTION\").item(0).getChildNodes().item(0).getNodeValue();\r\n paModulePID = swElement.getElementsByTagName(\"PID\").item(0).getChildNodes().item(0).getNodeValue();\r\n if(paModuleDescription.equals(paModules.getValue()))\r\n break;\r\n\r\n }\r\n }\r\n}",
"private LinkedList<Process> getDownloaderProcesses(int count, int updateFrequency, String folder, String language, String downloader, String platformName) {\n\t\tLinkedList<Process> result = new LinkedList<Process>();\n\t\tString now = DateUtil.getNowDate();\n\t\tString query = \n\t\t\t\"SELECT platform, name, created_date, version_control, source_link FROM projects WHERE \" + \n\t\t\t\"language = '\" + language + \"' AND NOT source_link IS NULL AND \" + \" created_date IS NOT NULL AND \" + (platformName == null ? \"\" : \" platform='\" + platformName + \"' AND \") +\n\t \"(source_updated_date IS NULL OR DATEDIFF(source_updated_date, '\" + now + \"') > \" + String.valueOf(updateFrequency) + \") LIMIT \" + String.valueOf(count);\n\t\t\n\t\t\n\t\tResultSet rs = DbUtil.resultFromQuery(con, query, logger);\n\t\tLinkedList<ProcessBuilder> pBuilders = new LinkedList<ProcessBuilder>();\n\n\t\tDataManager dm = DataManager.getInstance();\n\t\tDataTable tbl = DataManagerUtility.newDataTable(\"osprojects\", \"projects\", \n\t\t\tnew String[] {\n\t\t\t\t\"platform\",\n\t\t\t\t\"name\",\n\t\t\t\t\"source_updated_date\"\n\t\t\t}, \n\t\t\tCommitMode.Update, con, logger);\n\t\ttry {\n\t\t\twhile(rs.next()) {\n\t\t\t\tString platform = rs.getString(1);\t\t\t\t\n\t\t\t\tString project = rs.getString(2);\n\t\t\t\tString createDate = DateUtil.dashStringFromDate(DateUtil.dateToCalendar((rs.getDate(3))));\t\t\t\t\n\t\t\t\tString versionControl = rs.getString(4);\n\t\t\t\tString sourceLink = rs.getString(5);\n\t\t\t\tProcessBuilder pb = getProcessBuilder(folder, platform, project, createDate, versionControl, sourceLink, downloader);\n\t\t\t\tpBuilders.add(pb);\n\t\t\t\tString[] row = new String[] {\n\t\t\t\t\tplatform,\n\t\t\t\t\tproject,\n\t\t\t\t\tnow\n\t\t\t\t};\n\t\t\t\ttbl.addRow(row);\n\t\t\t}\n\t\t\tif(tbl.rowCount()>0) {\n\t\t\t\tdm.AddTableAndCommit(tbl, con, logger);\t\n\t\t\t}\n\t\t\tfor(ProcessBuilder b : pBuilders) {\n\t\t\t\ttry {\n\t\t\t\t\tProcess prc = b.start();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000*2);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\tLogUtil.logError(logger, e);\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(prc);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLogUtil.logError(logger, e);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tLogUtil.logError(logger, e);\n\t\t}\n\t\t\t\t\n\t\treturn result;\n\t}",
"public static ProcessRegistry getInstance() {\n return INSTANCE;\n }",
"SporadicProcess getSporadic();",
"private void addNodesAndEdgesForQuerying(Vertex columnIn, Vertex columnOut, Vertex process) {\n if (isColumnEmpty(columnIn) || isColumnEmpty(columnOut)) {\n return;\n }\n GraphTraversalSource g = graphFactory.getGraphTraversalSource();\n final String processGuid = getGuid(process);\n final String columnInGuid = getGuid(columnIn);\n final String columnOutGuid = getGuid(columnOut);\n final String processName =\n g.V(process.id()).elementMap(PROPERTY_KEY_INSTANCEPROP_DISPLAY_NAME).toList().get(0).get(PROPERTY_KEY_INSTANCEPROP_DISPLAY_NAME).toString();\n\n Iterator<Vertex> t = g.V(columnIn.id()).outE(EDGE_LABEL_COLUMN_DATA_FLOW).inV()\n .has(PROPERTY_KEY_COLUMN_OUT_GUID, columnOutGuid)\n .has(PROPERTY_KEY_PROCESS_GUID, processGuid);\n\n if (!t.hasNext()) {\n Vertex subProcess = g.addV(NODE_LABEL_SUB_PROCESS)\n .property(PROPERTY_KEY_ENTITY_NODE_ID, UUID.randomUUID().toString())\n .property(PROPERTY_KEY_DISPLAY_NAME, processName)\n .property(PROPERTY_KEY_PROCESS_GUID, processGuid)\n .property(PROPERTY_KEY_COLUMN_IN_GUID, columnInGuid)\n .property(PROPERTY_KEY_COLUMN_OUT_GUID, columnOutGuid)\n .next();\n\n commitTransaction(g);\n g = graphFactory.getGraphTraversalSource();\n g.V(columnIn.id()).addE(EDGE_LABEL_COLUMN_DATA_FLOW).to(__.V(subProcess.id())).next();\n g.V(subProcess.id()).addE(EDGE_LABEL_COLUMN_DATA_FLOW).to(__.V(columnOut.id())).next();\n g.V(subProcess.id()).addE(EDGE_LABEL_INCLUDED_IN).to(__.V(process.id())).next();\n commitTransaction(g);\n\n addAssetToProcessEdges(columnIn, process, columnOut);\n\n log.info(OLS_HAS_CORRESPONDING_ELEMENTS, columnInGuid, columnOutGuid, processGuid);\n }\n }",
"private Set<Match> compareTwoNodeLists(List<Node> programANodeList, List<Node> programBNodeList) {\n\t\t// convert node list to string representations in order\n\t\tString programATypeAbbr = getProgramRepresentation(programANodeList);\n\t\tString programBTypeAbbr = getProgramRepresentation(programBNodeList);\n\n\t\t// call Greedy String Tilling algorithms to compare the Strings\n\t\tGreedyStringTilling gst = new GreedyStringTilling(MIN_MATCHED_LEN_FOR_GST);\n\n\t\treturn gst.GST(programATypeAbbr, programBTypeAbbr);\n\t}",
"boolean hasApplicationProcessName();",
"public void runRoundRobin(int quantum) {\n //init\n ArrayList<Processus> localProcess = new ArrayList<>(); //Creation of a local list of process\n for (Processus cpy : listOfProcess) { //Copy the list of process in the local list with new instances of process\n Processus tmp = new Processus(cpy.getName(), cpy.getTime(), (HashMap<Integer, Integer>) cpy.getListOfInOut().clone(), (HashMap<Integer, Integer>) cpy.getlistOfResource().clone());\n localProcess.add(tmp);\n }\n int size = listOfProcess.size(); //variable used to save the initial size of the list of process\n\n Processus executedProc = null; //ExecutedProc is the current process that is being execute\n Processus tmpProc = localProcess.get(0); //The tmpProc is the previous process executed\n\n //Variable we need to calcul\n double occupancyRate = 0;\n double averageWaitingTime = 0;\n double averageReturnTime = 0;\n int currentTime = 0;\n int occupancyTime = 0;\n int counter = 0;\n\n //beginning of the algo\n while (!localProcess.isEmpty()) {\n tmpProc = null;\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime) {\n if (localProcess.size() == 1 || tmpProc == null) {\n executedProc = proc;\n tmpProc = proc;\n } else if (proc.getCurrentOrder() <= tmpProc.getCurrentOrder()) { //selection of the older process (FIFO selection)\n executedProc = proc;\n tmpProc = proc;\n }\n }\n }\n if (executedProc != null) {\n int tmpTime = 0;\n while (tmpTime < quantum && executedProc.getRessource(executedProc.getCurrentStep()) > 0) {\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime && !proc.equals(executedProc)) {//checking if there is another process waiting and set the new waiting time\n proc.setWaitingTime(1);\n }\n }\n\n occupancyTime++;\n currentTime++;\n tmpTime++;\n executedProc.setTime(executedProc.getTime() + 1); //set the new process start time\n executedProc.setRessource(executedProc.getCurrentStep(), executedProc.getRessource(executedProc.getCurrentStep()) - 1);//delete on resource time for the current process on the current step\n }\n //set the availability to the end of the process to the end of the in/out\n if (executedProc.getCurrentStep() < executedProc.getListOfInOut().size() && executedProc.getRessource(executedProc.getCurrentStep()) <= 0) {\n executedProc.setTime(executedProc.getInOut(executedProc.getCurrentStep()) + currentTime);\n executedProc.setCurrentStep(executedProc.getCurrentStep() + 1);\n } else if (executedProc.getCurrentStep() >= executedProc.getListOfInOut().size() && executedProc.getRessource(executedProc.getCurrentStep()) <= 0) {\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n averageWaitingTime += executedProc.getWaitingTime();\n localProcess.remove(executedProc);\n }\n if (executedProc.getCurrentStep() >= executedProc.getlistOfResource().size()) {//if it is the end of the process\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n averageWaitingTime += executedProc.getWaitingTime();\n localProcess.remove(executedProc);\n }\n //put the process at the end of the list\n executedProc.setCurrentOrder(counter);\n counter++;\n executedProc = null;\n } else {\n currentTime++;\n }\n }\n //end of the algo\n\n //Calculation of the variables\n occupancyRate = ((double) occupancyTime / (double) currentTime) * 100;\n for (Processus proc : listOfProcess) {\n averageWaitingTime += proc.getWaitingTime();\n }\n averageWaitingTime = averageWaitingTime / size;\n averageReturnTime = averageReturnTime / size;\n\n //Updating the global variables\n currentAverageReturnTime = averageReturnTime;\n logger.trace(\"Current average return time : \" + currentAverageReturnTime);\n currentAverageWaitingTime = averageWaitingTime;\n logger.trace(\"Current average waiting time : \" + currentAverageWaitingTime);\n currentOccupancyRate = occupancyRate;\n logger.trace(\"Current occupancy rate : \" + currentOccupancyRate);\n currentOccupancyTime = occupancyTime;\n logger.trace(\"Current occupancy time : \" + currentOccupancyTime);\n\n restList(); //reset the list to the origin values so the user can test another algo\n }",
"public PackageProcess(PackageProcess other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.isSetProcessName()) {\n this.processName = other.processName;\n }\n this.processCount = other.processCount;\n this.uId = other.uId;\n this.sleeping = other.sleeping;\n this.foreground = other.foreground;\n this.foregroundTime = other.foregroundTime;\n this.launchCount = other.launchCount;\n this.importance = other.importance;\n this.crashCount = other.crashCount;\n this.lastStartSinceBoot = other.lastStartSinceBoot;\n this.lastStartTimestamp = other.lastStartTimestamp;\n }",
"private void setParentProcess(List<Process> result)\r\n\t{\r\n\t\tif (ValidationUtil.isNullOrEmpty(result))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// In case the Process has parent, get it too\r\n\t\tfor (Process process : result)\r\n\t\t{\r\n\t\t\tif (!ValidationUtil.isNull(process.getParentProcess())\r\n\t\t\t\t\t&& !ValidationUtil.isNullOrZero(process.getParentProcess().getId()))\r\n\t\t\t{\r\n\t\t\t\tprocess.setParentProcess(this.fetchProcessById(process.getParentProcess().getId()));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public List<ProcessEvent> getAvailableEventsByStateName(\n List<ProcessEvent> processEvents, String processStateName)\n {\n List<ProcessEvent> allEvents = new ArrayList<>();\n for (ProcessEvent processEventValue : processEvents)\n {\n if (processStateName.endsWith(processEventValue.getInitialState().getInternalName()))\n {\n allEvents.add(processEventValue);\n }\n }\n return allEvents;\n }",
"public InternalServiceProcess getInternalServiceProcess();"
] | [
"0.52918816",
"0.5244699",
"0.52394223",
"0.5118726",
"0.5037656",
"0.5009589",
"0.49855298",
"0.49773642",
"0.49733478",
"0.49732167",
"0.49681723",
"0.49670303",
"0.4945311",
"0.49329686",
"0.49165756",
"0.4914502",
"0.48801413",
"0.48737153",
"0.48618305",
"0.4861296",
"0.48545077",
"0.4853498",
"0.48373434",
"0.4819184",
"0.48057806",
"0.4786688",
"0.47826248",
"0.47652546",
"0.47364673",
"0.4719607",
"0.47127885",
"0.4698818",
"0.46723965",
"0.46546674",
"0.46531898",
"0.46336326",
"0.46330518",
"0.46303037",
"0.46292606",
"0.46193582",
"0.46192276",
"0.46148434",
"0.45778078",
"0.45717856",
"0.45705378",
"0.45625564",
"0.45502293",
"0.4541835",
"0.45397556",
"0.4539237",
"0.45355672",
"0.453005",
"0.4522911",
"0.45202675",
"0.45143571",
"0.45139554",
"0.45085764",
"0.4505459",
"0.44987494",
"0.4498184",
"0.4494139",
"0.44798633",
"0.44717732",
"0.4466149",
"0.44533974",
"0.4441792",
"0.44410777",
"0.44323245",
"0.44315922",
"0.44288585",
"0.4426819",
"0.44192648",
"0.4416399",
"0.44155997",
"0.439241",
"0.43888572",
"0.43863863",
"0.43849128",
"0.43799618",
"0.43685412",
"0.4359108",
"0.43572667",
"0.43451595",
"0.43400806",
"0.4339827",
"0.43383813",
"0.4336956",
"0.43357924",
"0.4334981",
"0.43320724",
"0.43308342",
"0.432277",
"0.4315615",
"0.43135774",
"0.43000364",
"0.42994893",
"0.4293425",
"0.42917794",
"0.42880857",
"0.4282441"
] | 0.6662566 | 0 |
XXX supply from PP? Creates a new instance of EditorPropertyDisplayer | public EditorPropertyDisplayer(Property p) {
this(p, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CustomModuleEditor getPropertyEditor() {\n\t return new SetErrorFunction();\n }",
"public interface PropertyConsumer {\n\n /**\n * Key in the associated propertyInfo object. Holds a list of\n * property names, which should be displayed and editable when\n * configuring a PropertyConsumer object interatively. List is\n * space seperated and the order is the order in which the\n * properties will appear (initProperties).\n */\n public static final String initPropertiesProperty = \"initProperties\";\n\n /**\n * Keyword for PropertyEditor class from PropertyInfo Property\n * object (editor).\n */\n public static final String EditorProperty = \"editor\";\n /**\n * Scoped keyword for PropertyEditor class from PropertyInfo\n * Property object, same as EditorProperty with a period in front\n * (.editor).\n */\n public static final String ScopedEditorProperty = \".editor\";\n /**\n * Scoped keyword for PropertyEditor class from PropertyInfo\n * Property object, to scope the label for the property as\n * displayed in the Inspector (label).\n */\n public static final String LabelEditorProperty = \".label\";\n\n /**\n * Method to set the properties in the PropertyConsumer. It is\n * assumed that the properties do not have a prefix associated\n * with them, or that the prefix has already been set.\n * \n * @param setList a properties object that the PropertyConsumer\n * can use to retrieve expected properties it can use for\n * configuration.\n */\n public void setProperties(Properties setList);\n\n /**\n * Method to set the properties in the PropertyConsumer. The\n * prefix is a string that should be prepended to each property\n * key (in addition to a separating '.') in order for the\n * PropertyConsumer to uniquely identify properties meant for it,\n * in the midst of of Properties meant for several objects.\n * \n * @param prefix a String used by the PropertyConsumer to prepend\n * to each property value it wants to look up -\n * setList.getProperty(prefix.propertyKey). If the prefix\n * had already been set, then the prefix passed in should\n * replace that previous value.\n * @param setList a Properties object that the PropertyConsumer\n * can use to retrieve expected properties it can use for\n * configuration.\n */\n public void setProperties(String prefix, Properties setList);\n\n /**\n * Method to fill in a Properties object, reflecting the current\n * values of the PropertyConsumer. If the PropertyConsumer has a\n * prefix set, the property keys should have that prefix plus a\n * separating '.' prepended to each property key it uses for\n * configuration.\n * \n * @param getList a Properties object to load the PropertyConsumer\n * properties into. If getList equals null, then a new\n * Properties object should be created.\n * @return Properties object containing PropertyConsumer property\n * values. If getList was not null, this should equal\n * getList. Otherwise, it should be the Properties object\n * created by the PropertyConsumer.\n */\n public Properties getProperties(Properties getList);\n\n /**\n * Method to fill in a Properties object with values reflecting\n * the properties able to be set on this PropertyConsumer. The key\n * for each property should be the raw property name (without a\n * prefix) with a value that is a String that describes what the\n * property key represents, along with any other information about\n * the property that would be helpful (range, default value,\n * etc.).\n * \n * @param list a Properties object to load the PropertyConsumer\n * properties into. If getList equals null, then a new\n * Properties object should be created.\n * @return Properties object containing PropertyConsumer property\n * values. If getList was not null, this should equal\n * getList. Otherwise, it should be the Properties object\n * created by the PropertyConsumer.\n */\n public Properties getPropertyInfo(Properties list);\n\n /**\n * Set the property key prefix that should be used by the\n * PropertyConsumer. The prefix, along with a '.', should be\n * prepended to the property keys known by the PropertyConsumer.\n * \n * @param prefix the prefix String.\n */\n public void setPropertyPrefix(String prefix);\n\n /**\n * Get the property key prefix that is being used to prepend to\n * the property keys for Properties lookups.\n * \n * @return the prefix string\n */\n public String getPropertyPrefix();\n\n}",
"public static List<DisplayProperty> getDisplayProperties() {return DISPLAY_PROPERTIES;}",
"protected void addEditorPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_editor_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_editor_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__EDITOR,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }",
"public Object createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}",
"private NovaInstanceDisplayPropertyToken(DisplayProperty displayProperty) {\n\t\t\tthis.displayProperty = displayProperty;\n\t\t}",
"public HasDisplayableProperties getProperties();",
"public interface InspectorComponent<PropMgr extends PropertiesManager<PropMgr>> {\n\n /**\n * Update the properties used\n *\n * @param components the components selected\n * @param properties that are now available\n * @param propertiesManager the current properties manager\n */\n void updateProperties(@NotNull List<NlComponent> components,\n @NotNull Map<String, NlProperty> properties,\n @NotNull PropMgr propertiesManager);\n\n /**\n * Return the maximum number of rows that attachToInspector may generate.\n * A row is either a title, separator, or a component row\n */\n int getMaxNumberOfRows();\n\n /**\n * Add rows of controls to the inspector panel for this inspector.\n */\n void attachToInspector(@NotNull InspectorPanel<PropMgr> inspector);\n\n /**\n * Refresh the values shown in this inspector.\n */\n void refresh();\n\n /**\n * Get the editors created by this inspector.\n */\n @NotNull\n List<NlComponentEditor> getEditors();\n\n /**\n * If customized handling of field visibility is required, use this method\n * to set the visibility of the fields.\n * Filtering in the inspector will change any visibility settings done by this\n * {@code InspectorComponent}. Use this method to override the visibility when\n * there is no filter active. When a filter is active this method should not\n * do anything.\n */\n default void updateVisibility() {\n }\n}",
"public Editor getEditor() { return editor; }",
"private ch.softenvironment.view.SimpleEditorPanel getPnlEditor() {\n\tif (ivjPnlEditor == null) {\n\t\ttry {\n\t\t\tivjPnlEditor = new ch.softenvironment.view.SimpleEditorPanel();\n\t\t\tivjPnlEditor.setName(\"PnlEditor\");\n\t\t\tivjPnlEditor.setLayout(new javax.swing.BoxLayout(getPnlEditor(), javax.swing.BoxLayout.X_AXIS));\n\t\t\tivjPnlEditor.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjPnlEditor;\n}",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"public int getPropertyShowMode()\n {\n return propertyShowMode;\n }",
"public Object showDiscreteEditor() throws Exception {\n \t\treturn showEditor(EditorDisplayer.getEditor(this, EditorType.DISCRETE));\n \t}",
"PropertyRealization createPropertyRealization();",
"public java.awt.Component getInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).getInPlaceCustomEditor ();\n } else {\n return null;\n }\n }",
"public ConfmlEditor() {\r\n\t\tsuper();\r\n\t\tinitializeEditingDomain();\r\n\t}",
"@Override\r\n\tpublic CellEditor createPropertyEditor(Composite parent) {\n\t\tMenuCellEditor editor = new MenuCellEditor(parent);\r\n\t\teditor.setListenerModel(flistenermodel);\r\n if (getValidator() != null) {\r\n\t\t\teditor.setValidator(getValidator());\r\n\t\t}\t\t\r\n\t\t return editor;\r\n\t}",
"public String getPublicPropertyForm( Presentation presentation );",
"public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }",
"public void updateDescriptionText() {\n \n String toolTipText = new String(\"<html>\");\n \n if (!m_OptionsWereValid) {\n \n toolTipText += \"<font COLOR=\\\"#FF0000\\\">\"\n\t+ \"<b>Invalid Model:</b><br>\" + m_ErrorText + \"<br></font>\";\n }\n \n toolTipText += \"<TABLE>\";\n \n PropertyDescriptor properties[] = null;\n MethodDescriptor methods[] = null;\n \n try {\n BeanInfo bi = Introspector.getBeanInfo(m_Classifier.getClass());\n properties = bi.getPropertyDescriptors();\n methods = bi.getMethodDescriptors();\n } catch (IntrospectionException ex) {\n System.err.println(\"LibraryModel: Couldn't introspect\");\n return;\n }\n \n for (int i = 0; i < properties.length; i++) {\n \n if (properties[i].isHidden() || properties[i].isExpert()) {\n\tcontinue;\n }\n \n String name = properties[i].getDisplayName();\n Class type = properties[i].getPropertyType();\n Method getter = properties[i].getReadMethod();\n Method setter = properties[i].getWriteMethod();\n \n // Only display read/write properties.\n if (getter == null || setter == null) {\n\tcontinue;\n }\n \n try {\n\tObject args[] = {};\n\tObject value = getter.invoke(m_Classifier, args);\n\t\n\tPropertyEditor editor = null;\n\tClass pec = properties[i].getPropertyEditorClass();\n\tif (pec != null) {\n\t try {\n\t editor = (PropertyEditor) pec.newInstance();\n\t } catch (Exception ex) {\n\t // Drop through.\n\t }\n\t}\n\tif (editor == null) {\n\t editor = PropertyEditorManager.findEditor(type);\n\t}\n\t//editors[i] = editor;\n\t\n\t// If we can't edit this component, skip it.\n\tif (editor == null) {\n\t continue;\n\t}\n\tif (editor instanceof GenericObjectEditor) {\n\t ((GenericObjectEditor) editor).setClassType(type);\n\t}\n\t\n\t// Don't try to set null values:\n\tif (value == null) {\n\t continue;\n\t}\n\t\n\ttoolTipText += \"<TR><TD>\" + name + \"</TD><TD>\"\n\t+ value.toString() + \"</TD></TR>\";\n\t\n } catch (InvocationTargetException ex) {\n\tSystem.err.println(\"Skipping property \" + name\n\t + \" ; exception on target: \" + ex.getTargetException());\n\tex.getTargetException().printStackTrace();\n\tcontinue;\n } catch (Exception ex) {\n\tSystem.err.println(\"Skipping property \" + name\n\t + \" ; exception: \" + ex);\n\tex.printStackTrace();\n\tcontinue;\n }\n }\n \n toolTipText += \"</TABLE>\";\n toolTipText += \"</html>\";\n m_DescriptionText = toolTipText;\n }",
"public void setupEditor(MapUIController controller, GUIEditorGrid editor) {\n editor.addLabel(\"Type\", getType().name());\n editor.addLabel(\"Vertices\", Arrays.toString(getVertices()));\n }",
"public IPropertySheetPage getPropertySheetPage() {\r\n\t\tif (propertySheetPage == null) {\r\n\t\t\tpropertySheetPage = new TabbedPropertySheetPage(this);\r\n\t\t\t/*\r\n\t\t\tpropertySheetPage = new TabbedPropertySheetPage(this) {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void setSelectionToViewer(List<?> selection) {\r\n\t\t\t\t\tConfmlEditor.this.setSelectionToViewer(selection);\r\n\t\t\t\t\tConfmlEditor.this.setFocus();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void setActionBars(IActionBars actionBars) {\r\n\t\t\t\t\tsuper.setActionBars(actionBars);\r\n\t\t\t\t\tgetActionBarContributor().shareGlobalActions(this,\r\n\t\t\t\t\t\t\tactionBars);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tpropertySheetPage\r\n\t\t\t\t\t.setPropertySourceProvider(new AdapterFactoryContentProvider(\r\n\t\t\t\t\t\t\tadapterFactory));\r\n\t\t\t*/\r\n\t\t}\r\n\r\n\t\treturn propertySheetPage;\r\n\t}",
"protected Object getDisplayParameterBean() {\n return findBaseObject(\"pmb\");\n }",
"public PropertiesQDoxPropertyExpander() {\n super();\n }",
"private void showPropertyDescription(MouseEvent event) {\r\n\t\tPropertyDescriptionStage propertyDescriptionStage = new PropertyDescriptionStage(property);\r\n\t\tpropertyDescriptionStage.show();\r\n\t}",
"public void createFieldEditors() {\n\t\taddField(\n\t\t\tnew BooleanFieldEditor(\n\t\t\t\tPreferenceConstants.PRETTY_CML,\n\t\t\t\t\"&Pretty print CML\",\n\t\t\t\tgetFieldEditorParent()));\n\t\tbioclipseLogging = new BooleanFieldEditor(\n\t\t\tPreferenceConstants.BIOCLIPSE_LOGGING,\n\t\t\t\"&Use Bioclipse Logging\",\n\t\t\tgetFieldEditorParent());\n\t\taddField(bioclipseLogging);\n\t}",
"public PropertiesView(){\n\n\t\tbtnDescTemplate = new DescTemplateWidget(this);\n\t\tbtnCalculation = new DescTemplateWidget(this);\n\n\t\ttable.setWidget(0, 0, new Label(LocaleText.get(\"text\")));\n\t\ttable.setWidget(1, 0, new Label(LocaleText.get(\"helpText\")));\n\t\ttable.setWidget(2, 0, new Label(LocaleText.get(\"type\")));\n\t\ttable.setWidget(3, 0, new Label(LocaleText.get(\"binding\")));\n\t\ttable.setWidget(4, 0, new Label(LocaleText.get(\"visible\")));\n\t\ttable.setWidget(5, 0, new Label(LocaleText.get(\"enabled\")));\n\t\ttable.setWidget(6, 0, new Label(LocaleText.get(\"locked\")));\n\t\ttable.setWidget(7, 0, new Label(LocaleText.get(\"required\")));\n\t\ttable.setWidget(8, 0, new Label(LocaleText.get(\"defaultValue\")));\n\t\ttable.setWidget(9, 0, new Label(LocaleText.get(\"calculation\")));\n\t\t\n\t\tlblDescTemplate = new Label(LocaleText.get(\"descriptionTemplate\"));\n\t\ttable.setWidget(10, 0, lblDescTemplate);\n\t\ttable.setWidget(11, 0, new Label(LocaleText.get(\"formKey\")));\n\n\t\ttable.setWidget(0, 1, txtText);\n\t\ttable.setWidget(1, 1, txtHelpText);\n\t\ttable.setWidget(2, 1, cbDataType);\n\t\ttable.setWidget(3, 1, txtBinding);\n\t\ttable.setWidget(4, 1, chkVisible);\n\t\ttable.setWidget(5, 1, chkEnabled);\n\t\ttable.setWidget(6, 1, chkLocked);\n\t\ttable.setWidget(7, 1, chkRequired);\n\t\ttable.setWidget(8, 1, txtDefaultValue);\n\n\t\tHorizontalPanel panel = new HorizontalPanel();\n\t\tpanel.add(txtCalculation);\n\t\tpanel.add(btnCalculation);\n\t\tpanel.setCellWidth(btnCalculation, \"20%\");\n\t\tFormUtil.maximizeWidget(txtCalculation);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(9, 1, panel);\n\n\t\tpanel = new HorizontalPanel();\n\t\tpanel.add(txtDescTemplate);\n\t\tpanel.add(btnDescTemplate);\n\t\tpanel.setCellWidth(btnDescTemplate, \"20%\");\n\t\tFormUtil.maximizeWidget(txtDescTemplate);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(10, 1, panel);\n\t\t\n\t\ttable.setWidget(11, 1, txtFormKey);\n\n\t\ttable.setStyleName(\"cw-FlexTable\");\n\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeText\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeNumber\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDecimal\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDate\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDateTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBoolean\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeMultSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeRepeat\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypePicture\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeVideo\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeAudio\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelectDynamic\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeGPS\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBarcode\"));\n\n\t\tFlexCellFormatter cellFormatter = table.getFlexCellFormatter();\n\t\tcellFormatter.setHorizontalAlignment(15, 1, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\ttable.setWidth(\"100%\");\n\t\tcellFormatter.setWidth(0, 0, \"20%\");\n\t\t//cellFormatter.setColSpan(0, 0, 2);\n\t\t\n\t\t//cellFormatter.setWidth(9, 0, \"20\"+PurcConstants.UNITS);\n\t\t//cellFormatter.setWidth(9, 1, \"20\"+PurcConstants.UNITS);\n\n\t\ttxtText.setWidth(\"100%\");\n\t\ttxtHelpText.setWidth(\"100%\");\n\t\ttxtBinding.setWidth(\"100%\");\n\t\ttxtDefaultValue.setWidth(\"100%\");\n\t\tcbDataType.setWidth(\"100%\");\n\t\ttxtFormKey.setWidth(\"100%\");\n\n\t\tVerticalPanel verticalPanel = new VerticalPanel();\n\t\tverticalPanel.setSpacing(5);\n\t\tverticalPanel.add(table);\n\n\t\tDecoratedTabPanel tabs = new DecoratedTabPanel();\n\t\ttabs.add(skipRulesView, LocaleText.get(\"skipLogic\"));\n\t\ttabs.add(validationRulesView, LocaleText.get(\"validationLogic\"));\n\t\ttabs.add(dynamicListsView, LocaleText.get(\"dynamicLists\"));\n\n\t\ttabs.selectTab(0);\n\t\tverticalPanel.add(tabs);\n\t\tFormUtil.maximizeWidget(tabs);\n\n\t\tFormUtil.maximizeWidget(verticalPanel);\n\t\tinitWidget(verticalPanel);\n\n\t\tsetupEventListeners();\n\n\t\tcbDataType.setSelectedIndex(-1);\n\n\t\tenableQuestionOnlyProperties(false);\n\t\ttxtText.setEnabled(false);\n\t\t//txtDescTemplate.setVisible(false);\n\t\t//btnDescTemplate.setVisible(false);\n\t\tenableDescriptionTemplate(false);\n\t\ttxtCalculation.setEnabled(false);\n\t\tbtnCalculation.setEnabled(false);\n\t\ttxtBinding.setEnabled(false);\n\n\t\ttxtText.setTitle(LocaleText.get(\"questionTextDesc\"));\n\t\ttxtHelpText.setTitle(LocaleText.get(\"questionDescDesc\"));\n\t\ttxtBinding.setTitle(LocaleText.get(\"questionIdDesc\"));\n\t\ttxtDefaultValue.setTitle(LocaleText.get(\"defaultValDesc\"));\n\t\tcbDataType.setTitle(LocaleText.get(\"questionTypeDesc\"));\n\n\t\tDOM.sinkEvents(getElement(), Event.ONKEYDOWN | DOM.getEventsSunk(getElement()));\n\t}",
"public BaseEditorPanel getEditorPanel ()\n {\n return _epanel;\n }",
"public interface AttributePropertiesEditionPart {\n\n\n\n\t/**\n\t * Init the anotations\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initAnotations(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the anotations\n\t * @param newValue the anotations to update\n\t * \n\t */\n\tpublic void updateAnotations();\n\n\t/**\n\t * Adds the given filter to the anotations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToAnotations(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the anotations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToAnotations(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the anotations table\n\t * \n\t */\n\tpublic boolean isContainedInAnotationsTable(EObject element);\n\n\n\t/**\n\t * @return the visibility\n\t * \n\t */\n\tpublic Enumerator getVisibility();\n\n\t/**\n\t * Init the visibility\n\t * @param input the viewer input\n\t * @param current the current value\n\t */\n\tpublic void initVisibility(Object input, Enumerator current);\n\n\t/**\n\t * Defines a new visibility\n\t * @param newValue the new visibility to set\n\t * \n\t */\n\tpublic void setVisibility(Enumerator newValue);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"public interface ComboPropertiesEditionPart {\n\n\t/**\n\t * @return the combo\n\t */\n\tpublic Object getCombo();\n\n\t/**\n\t * Init the combo\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initCombo(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new combo\n\t * @param newValue the new combo to set\n\t */\n\tpublic void setCombo(Object newValue);\n\n\t/**\n\t * Adds the given filter to the combo edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToCombo(ViewerFilter filter);\n\n\n\n\n\n\n\t/**\n\t * @return the comboRO\n\t */\n\tpublic Object getComboRO();\n\n\t/**\n\t * Init the comboRO\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initComboRO(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new comboRO\n\t * @param newValue the new comboRO to set\n\t */\n\tpublic void setComboRO(Object newValue);\n\n\t/**\n\t * Adds the given filter to the comboRO edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToComboRO(ViewerFilter filter);\n\n\n\n\n\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"private PropertyPagePropertyDescriptor getPropertyDescriptor() {\n \t\treturn propertyDescriptor;\n \t}",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"public EntryEditorOutlinePage( EntryEditor entryEditor )\n {\n this.entryEditor = entryEditor;\n BrowserCommonActivator.getDefault().getPreferenceStore().addPropertyChangeListener( propertyChangeListener );\n }",
"public PropertyPageCellEditor(\n \t\tComposite parent,\n \t\tPropertyPagePropertyDescriptor descriptor) {\n \t\tthis(parent, descriptor, SWT.NONE);\n \t}",
"public KeyFramePropertyViewer()\n {\n initComponents();\n \n this.jScrollPane.getVerticalScrollBar().setBlockIncrement(20);\n this.jScrollPane.getVerticalScrollBar().setUnitIncrement(20);\n //keyFrameEditor = new KeyFrameEditor(new KeyFrame());\n\n this.jointChangeListener = new PropertyChangeListener()\n {\n public void propertyChange(PropertyChangeEvent evt)\n {\n if(evt.getPropertyName().compareTo(\"jointStateChanged\") == 0)\n {\n firePropertyChange(\"jointStateChanged\", null, null);\n }\n }\n };\n\n\n }",
"public EditPanel getEditPanel() { return ep; }",
"public PropertyInspector()\n {\n super( new BorderLayout() );\n\n add(splitPane, BorderLayout.CENTER); \n splitPane.setDividerSize(5);\n\n setupPopupMenu( popup = new JPopupMenu() );\n\n //inspectorActionManager = new InspectorActionManager( mobile );\n\n addComponentListener(new ComponentAdapter()\n {\n @Override\n public void componentResized(ComponentEvent evt)\n {\n updateSplitPaneDivider();\n }\n });\n\n }",
"protected abstract IEditorPreferences getPreferences();",
"public void showProperties() {\n if ( _project != null ) {\n AntelopeProperties ap = new AntelopeProperties( this );\n ap.showProperties( _project );\n }\n }",
"default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }",
"public interface InternalLinkReferencePropertiesEditionPart {\n\n\t/**\n\t * @return the referencedLink\n\t * \n\t */\n\tpublic EObject getReferencedLink();\n\n\t/**\n\t * Init the referencedLink\n\t * @param settings the combo setting\n\t */\n\tpublic void initReferencedLink(EObjectFlatComboSettings settings);\n\n\t/**\n\t * Defines a new referencedLink\n\t * @param newValue the new referencedLink to set\n\t * \n\t */\n\tpublic void setReferencedLink(EObject newValue);\n\n\t/**\n\t * Defines the button mode\n\t * @param newValue the new mode to set\n\t * \n\t */\n\tpublic void setReferencedLinkButtonMode(ButtonsModeEnum newValue);\n\n\t/**\n\t * Adds the given filter to the referencedLink edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToReferencedLink(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the referencedLink edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToReferencedLink(ViewerFilter filter);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}",
"public interface UnitTestPropertiesEditionPart {\n\n\t/**\n\t * @return the locs\n\t * \n\t */\n\tpublic String getLocs();\n\n\t/**\n\t * Defines a new locs\n\t * @param newValue the new locs to set\n\t * \n\t */\n\tpublic void setLocs(String newValue);\n\n\n\t/**\n\t * @return the comments\n\t * \n\t */\n\tpublic String getComments();\n\n\t/**\n\t * Defines a new comments\n\t * @param newValue the new comments to set\n\t * \n\t */\n\tpublic void setComments(String newValue);\n\n\n\n\n\t/**\n\t * Init the anotations\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initAnotations(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the anotations\n\t * @param newValue the anotations to update\n\t * \n\t */\n\tpublic void updateAnotations();\n\n\t/**\n\t * Adds the given filter to the anotations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToAnotations(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the anotations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToAnotations(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the anotations table\n\t * \n\t */\n\tpublic boolean isContainedInAnotationsTable(EObject element);\n\n\n\t/**\n\t * @return the weight\n\t * \n\t */\n\tpublic String getWeight();\n\n\t/**\n\t * Defines a new weight\n\t * @param newValue the new weight to set\n\t * \n\t */\n\tpublic void setWeight(String newValue);\n\n\n\t/**\n\t * @return the name\n\t * \n\t */\n\tpublic String getName();\n\n\t/**\n\t * Defines a new name\n\t * @param newValue the new name to set\n\t * \n\t */\n\tpublic void setName(String newValue);\n\n\n\t/**\n\t * @return the maxWeight\n\t * \n\t */\n\tpublic String getMaxWeight();\n\n\t/**\n\t * Defines a new maxWeight\n\t * @param newValue the new maxWeight to set\n\t * \n\t */\n\tpublic void setMaxWeight(String newValue);\n\n\n\n\n\t/**\n\t * Init the migRelations\n\t * @param settings settings for the migRelations ReferencesTable \n\t */\n\tpublic void initMigRelations(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the migRelations\n\t * @param newValue the migRelations to update\n\t * \n\t */\n\tpublic void updateMigRelations();\n\n\t/**\n\t * Adds the given filter to the migRelations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToMigRelations(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the migRelations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToMigRelations(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the migRelations table\n\t * \n\t */\n\tpublic boolean isContainedInMigRelationsTable(EObject element);\n\n\n\t/**\n\t * @return the parentLayer\n\t * \n\t */\n\tpublic EObject getParentLayer();\n\n\t/**\n\t * Init the parentLayer\n\t * @param settings the combo setting\n\t */\n\tpublic void initParentLayer(EObjectFlatComboSettings settings);\n\n\t/**\n\t * Defines a new parentLayer\n\t * @param newValue the new parentLayer to set\n\t * \n\t */\n\tpublic void setParentLayer(EObject newValue);\n\n\t/**\n\t * Defines the button mode\n\t * @param newValue the new mode to set\n\t * \n\t */\n\tpublic void setParentLayerButtonMode(ButtonsModeEnum newValue);\n\n\t/**\n\t * Adds the given filter to the parentLayer edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToParentLayer(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the parentLayer edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToParentLayer(ViewerFilter filter);\n\n\n\t/**\n\t * @return the parentModule\n\t * \n\t */\n\tpublic EObject getParentModule();\n\n\t/**\n\t * Init the parentModule\n\t * @param settings the combo setting\n\t */\n\tpublic void initParentModule(EObjectFlatComboSettings settings);\n\n\t/**\n\t * Defines a new parentModule\n\t * @param newValue the new parentModule to set\n\t * \n\t */\n\tpublic void setParentModule(EObject newValue);\n\n\t/**\n\t * Defines the button mode\n\t * @param newValue the new mode to set\n\t * \n\t */\n\tpublic void setParentModuleButtonMode(ButtonsModeEnum newValue);\n\n\t/**\n\t * Adds the given filter to the parentModule edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToParentModule(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the parentModule edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToParentModule(ViewerFilter filter);\n\n\n\t/**\n\t * @return the originalFilePath\n\t * \n\t */\n\tpublic String getOriginalFilePath();\n\n\t/**\n\t * Defines a new originalFilePath\n\t * @param newValue the new originalFilePath to set\n\t * \n\t */\n\tpublic void setOriginalFilePath(String newValue);\n\n\n\t/**\n\t * @return the newFilePath\n\t * \n\t */\n\tpublic String getNewFilePath();\n\n\t/**\n\t * Defines a new newFilePath\n\t * @param newValue the new newFilePath to set\n\t * \n\t */\n\tpublic void setNewFilePath(String newValue);\n\n\n\t/**\n\t * @return the visibility\n\t * \n\t */\n\tpublic Enumerator getVisibility();\n\n\t/**\n\t * Init the visibility\n\t * @param input the viewer input\n\t * @param current the current value\n\t */\n\tpublic void initVisibility(Object input, Enumerator current);\n\n\t/**\n\t * Defines a new visibility\n\t * @param newValue the new visibility to set\n\t * \n\t */\n\tpublic void setVisibility(Enumerator newValue);\n\n\n\n\n\t/**\n\t * Init the attributes\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initAttributes(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the attributes\n\t * @param newValue the attributes to update\n\t * \n\t */\n\tpublic void updateAttributes();\n\n\t/**\n\t * Adds the given filter to the attributes edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToAttributes(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the attributes edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToAttributes(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the attributes table\n\t * \n\t */\n\tpublic boolean isContainedInAttributesTable(EObject element);\n\n\n\n\n\t/**\n\t * Init the methods\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initMethods(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the methods\n\t * @param newValue the methods to update\n\t * \n\t */\n\tpublic void updateMethods();\n\n\t/**\n\t * Adds the given filter to the methods edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToMethods(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the methods edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToMethods(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the methods table\n\t * \n\t */\n\tpublic boolean isContainedInMethodsTable(EObject element);\n\n\n\t/**\n\t * @return the inhertance\n\t * \n\t */\n\tpublic Enumerator getInhertance();\n\n\t/**\n\t * Init the inhertance\n\t * @param input the viewer input\n\t * @param current the current value\n\t */\n\tpublic void initInhertance(Object input, Enumerator current);\n\n\t/**\n\t * Defines a new inhertance\n\t * @param newValue the new inhertance to set\n\t * \n\t */\n\tpublic void setInhertance(Enumerator newValue);\n\n\n\n\n\t/**\n\t * Init the implements\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initImplements_(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the implements\n\t * @param newValue the implements to update\n\t * \n\t */\n\tpublic void updateImplements_();\n\n\t/**\n\t * Adds the given filter to the implements edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToImplements_(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the implements edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToImplements_(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the implements table\n\t * \n\t */\n\tpublic boolean isContainedInImplements_Table(EObject element);\n\n\n\t/**\n\t * @return the originalFileName\n\t * \n\t */\n\tpublic String getOriginalFileName();\n\n\t/**\n\t * Defines a new originalFileName\n\t * @param newValue the new originalFileName to set\n\t * \n\t */\n\tpublic void setOriginalFileName(String newValue);\n\n\n\t/**\n\t * @return the type\n\t * \n\t */\n\tpublic String getType();\n\n\t/**\n\t * Defines a new type\n\t * @param newValue the new type to set\n\t * \n\t */\n\tpublic void setType(String newValue);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"public PropertyPageCellEditor(\n \t\tComposite parent,\n \t\tPropertyPagePropertyDescriptor descriptor,\n \t\tint style) {\n \t\tsuper(parent, style);\n \t\tpropertyDescriptor = descriptor;\n \t}",
"public interface MemoPropertiesEditionPart {\n\n\n\n\t/**\n\t * Init the creator\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initCreator(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the creator\n\t * @param newValue the creator to update\n\t * \n\t */\n\tpublic void updateCreator();\n\n\t/**\n\t * Adds the given filter to the creator edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToCreator(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the creator edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToCreator(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the creator table\n\t * \n\t */\n\tpublic boolean isContainedInCreatorTable(EObject element);\n\n\n\n\n\t/**\n\t * Init the reader\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initReader(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the reader\n\t * @param newValue the reader to update\n\t * \n\t */\n\tpublic void updateReader();\n\n\t/**\n\t * Adds the given filter to the reader edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToReader(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the reader edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToReader(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the reader table\n\t * \n\t */\n\tpublic boolean isContainedInReaderTable(EObject element);\n\n\n\t/**\n\t * @return the subject\n\t * \n\t */\n\tpublic String getSubject();\n\n\t/**\n\t * Defines a new subject\n\t * @param newValue the new subject to set\n\t * \n\t */\n\tpublic void setSubject(String newValue);\n\n\n\t/**\n\t * @return the body\n\t * \n\t */\n\tpublic String getBody();\n\n\t/**\n\t * Defines a new body\n\t * @param newValue the new body to set\n\t * \n\t */\n\tpublic void setBody(String newValue);\n\n\n\t/**\n\t * @return the id\n\t * \n\t */\n\tpublic String getId();\n\n\t/**\n\t * Defines a new id\n\t * @param newValue the new id to set\n\t * \n\t */\n\tpublic void setId(String newValue);\n\n\n\t/**\n\t * @return the type\n\t * \n\t */\n\tpublic String getType();\n\n\t/**\n\t * Defines a new type\n\t * @param newValue the new type to set\n\t * \n\t */\n\tpublic void setType(String newValue);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"private void initEditorComponent () {\n // Overriding the 'setJawbDocument' method to handle logging too.\n final AnnotationPopupListener popupListener =\n new AnnotationPopupListener(this);\n \n JTabbedPane tp = new DetachableTabsJawbComponent (task.getName()) {\n public void setJawbDocument (JawbDocument doc) {\n\t JawbDocument old = getJawbDocument();\n super.setJawbDocument (doc); // this is a must!!!\n\t if (old != null) \n\t old.getAnnotationMouseModel().\n\t removeAnnotationMouseListener(popupListener);\n\t if (doc != null)\n\t doc.getAnnotationMouseModel().\n\t addAnnotationMouseListener(popupListener);\n }\n };\n\n // add a simple editor for each\n Iterator iter = task.getMaiaScheme().iteratorOverAnnotationTypes();\n while (iter.hasNext()) {\n AnnotationType type = (AnnotationType) iter.next();\n Component editor = new SimpleAnnotEditor(this, type);\n tp.add (type.getName(), editor);\n }\n\n editorComponent = (JawbComponent)tp;\n }",
"public interface SlamPropertiesEditionPart {\n\n\t/**\n\t * @return the side\n\t * \n\t */\n\tpublic Enumerator getSide();\n\n\t/**\n\t * Init the side\n\t * @param eenum the enum to manage\n\t * @param current the current value\n\t */\n\tpublic void initSide(EEnum eenum, Enumerator current);\n\n\t/**\n\t * Defines a new side\n\t * @param newValue the new side to set\n\t * \n\t */\n\tpublic void setSide(Enumerator newValue);\n\n\n\t/**\n\t * @return the announced\n\t * \n\t */\n\tpublic Boolean getAnnounced();\n\n\t/**\n\t * Defines a new announced\n\t * @param newValue the new announced to set\n\t * \n\t */\n\tpublic void setAnnounced(Boolean newValue);\n\n\n\t/**\n\t * @return the achieved\n\t * \n\t */\n\tpublic Boolean getAchieved();\n\n\t/**\n\t * Defines a new achieved\n\t * @param newValue the new achieved to set\n\t * \n\t */\n\tpublic void setAchieved(Boolean newValue);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"public void _addPropertyConfigMenuItem(JComponent parentMenu, String name, BasicPropertyList pl) {\n JMenu menu = new JMenu(name + \" Display\");\n parentMenu.add(menu);\n\n for (BasicPropertyList.BasicProperty bp : pl.getProperties()) {\n if (bp instanceof BasicPropertyList.BooleanProperty)\n menu.add(_createBooleanPropertyMenuItem((BasicPropertyList.BooleanProperty)bp, pl));\n else if (bp instanceof BasicPropertyList.ChoiceProperty)\n menu.add(_createChoicePropertyMenu((BasicPropertyList.ChoiceProperty)bp, pl));\n }\n }",
"public MarkersViewPropertyTester() {\n }",
"@Override\n \tpublic void createFieldEditors() {\n\t\t\n\t\t\n\t\tGraphics3DRegistry.resetDescriptors();\n\t\tList<Graphics3DDescriptor> descr = Graphics3DRegistry.getRenderersForType(Graphics3DType.SCREEN);\n\t\tString[][] renderers = new String[descr.size()][2];\n\t\tfor (int i=0; i<descr.size(); i++) {\n\t\t\trenderers[i][0] = descr.get(i).getName();\n\t\t\trenderers[i][1] = descr.get(i).getRendererID();\n\t\t}\n\t\t\n\t\tComboFieldEditor rendererCombo = new ComboFieldEditor(PrefNames.DEFAULT_SCREEN_RENDERER, \"Default screen renderer\", \n\t\t\trenderers, getFieldEditorParent());\n\t\taddField(rendererCombo);\n\t\t\n\t\t// TODO enable\n\t\trendererCombo.setEnabled(false, getFieldEditorParent());\n\t\t\n \n \t\tString[][] cameraTypes =\n \t\t\tnew String[][] {\n \t\t\t\t{ \"Default first person camera\",\n \t\t\t\t\tFirstPersonCamera.class.getName() },\n \t\t\t\t{ \"Restricted first person camera\",\n \t\t\t\t\tRestrictedFirstPersonCamera.class.getName() } };\n \n \t\taddField(new RadioGroupFieldEditor(PrefNames.LWS_CAMERA_TYPE,\n \t\t\t\"Camera type:\", 1, cameraTypes, getFieldEditorParent()));\n \n \t\taddField(new ColorFieldEditor(PrefNames.LWS_BACKGROUND,\n \t\t\t\"Background color\", getFieldEditorParent()));\n \n \t\taddField(new BooleanFieldEditor(PrefNames.LWS_DRAW_AXES, \"Draw axes\",\n \t\t\tgetFieldEditorParent()));\n \n \t\taddField(new BooleanFieldEditor(PrefNames.LWS_DEBUG, \"Debug\",\n \t\t\tgetFieldEditorParent()));\n \n \t\tString[][] fontOptions =\n \t\t\tnew String[][] {\n \t\t\t\tnew String[] { \"Editor setting\", PrefNames.FONT_AA_EDITOR },\n \t\t\t\tnew String[] { \"Always on (ignore editor setting)\",\n \t\t\t\t\tPrefNames.FONT_AA_ON },\n \t\t\t\tnew String[] { \"Always off (ignore editor setting)\",\n \t\t\t\t\tPrefNames.FONT_AA_OFF } };\n \t\taddField(new ComboFieldEditor(PrefNames.LWS_FONT_AA,\n \t\t\t\"Font antialiasing\", fontOptions, getFieldEditorParent()));\n \t}",
"public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}",
"private void storComponentProperties(){\n\t\t//IPreferenceStore prefStore = JFacePreferences.getPreferenceStore();\n\t\t//PreferenceStore prefStore = mOyster2.getPreferenceStore();\n\t\tProperties mprop = mOyster2.getProperties();\n\t\tint count = mprop.getInteger(Constants.NUMBER_OF_COLUMNS);\n\t\tfor(int i=0; i<count; i++){\n\t\t\tmprop.setString(Constants.COLUMN_TYPE+i, mprop.getDefaultString(Constants.COLUMN_TYPE+i));\n\t\t\tmprop.setString(Constants.COLUMN_NAME+i, mprop.getDefaultString(Constants.COLUMN_NAME+i));\n\t\t\tmprop.setString(Constants.COLUMN_WIDTH+i, mprop.getDefaultString(Constants.COLUMN_WIDTH+i));\n\t\t\t/*\n\t\t\tprefStore.setToDefault(Constants.COLUMN_TYPE+i);\n\t\t\tprefStore.setToDefault(Constants.COLUMN_NAME+i);\n\t\t\tprefStore.setToDefault(Constants.COLUMN_WIDTH+i);\n\t\t\t*/\n\t\t}\n\t\tmprop.setString(Constants.NUMBER_OF_COLUMNS, \"\"+columns.size());\n\t\tfor(int i=0; i<columns.size(); i++){\n\t\t\tResultViewerColumnInfo colInf = getColumnInfo(i);\n\t\t\tmprop.setString(Constants.COLUMN_NAME + i, colInf.getColumnName());\n\t\t\tmprop.setString(Constants.COLUMN_TYPE + i, colInf.getColumnType());\n\t\t\tmprop.setString(Constants.COLUMN_WIDTH + i, \"\"+colInf.getWidth());\n\t\t}\n\t\ttry{\n\t\t\tmprop.storeOn();\n\t\t\t//prefStore.save();\n\t\t}\n\t\tcatch(Exception IO){\n\t\t\tSystem.out.println(\"couldnt save properties\");\n\t\t}\n\t\t\n\t}",
"public ViewProperty() {\n initComponents();\n }",
"public interface ProjectPropertiesView extends View<ProjectPropertiesView.ActionDelegate> {\n \n public interface ActionDelegate {\n /** Performs any actions appropriate in response to the user having pressed the Add button. */\n void onAddClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Edit button. */\n void onEditClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Delete button. */\n void onDeleteClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Save button. */\n void onSaveClicked();\n\n /** Performs any actions appropriate in response to the user having pressed the Cancel button. */\n void onCancelClicked();\n \n /** Returns selected property. */\n void selectedProperty(Property property);\n }\n \n /**\n * Sets whether Edit button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setEditButtonEnabled(boolean isEnabled);\n \n /**\n * Sets whether Delete button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setDeleteButtonEnabled(boolean isEnabled);\n \n /**\n * Sets whether Save button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setSaveButtonEnabled(boolean isEnabled);\n\n /**\n * Sets properties.\n *\n * @param projects\n */\n void setProperties(Array<Property> properties);\n \n /** Close dialog. */\n void close();\n\n /** Show dialog. */\n void showDialog();\n}",
"Builder addEditor(String value);",
"protected EditDialog(Shell parentShell, AdapterFactory adapterFactory,\n IItemPropertyDescriptor itemPropertyDescriptor, EObject eObject) {\n super(parentShell);\n this.adapterFactory = adapterFactory;\n this.itemPropertyDescriptor = itemPropertyDescriptor;\n this.eObject = eObject;\n\n }",
"public PlotDefinitionEditor() {\n // TODO maybe move it in setPlotId, setPlotId to register to event notifiers instead of both:\n ocm.getPlotDefinitionChangedEventNotifier().register(this);\n ocm.getPlotChangedEventNotifier().register(this);\n ocm.getPlotViewportChangedEventNotifier().register(this);\n\n initComponents();\n postInit();\n }",
"public FieldModifierPropertyEditor() {\n super(Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.STATIC |\n Modifier.FINAL | Modifier.TRANSIENT | Modifier.VOLATILE);\n }",
"public interface DisplayPropertiesListener {\r\n public void displayAnnViewChanged(DisplayProperties dp, \r\n Sequence seq,\r\n boolean show);\r\n public void displaySeqSelectChanged(DisplayProperties dp, \r\n Sequence seq,\r\n boolean select);\r\n public void displayColorSchemeChanged(DisplayProperties dp, \r\n ColorScheme old);\r\n public void displayFontChanged(DisplayProperties dp);\r\n public void displayRenderGapsChanged(DisplayProperties dp);\r\n public void displayGroupEditingChanged(DisplayProperties dp);\r\n public void displayOverwriteChanged(DisplayProperties dp);\r\n public void displayHighlightsChanged(DisplayProperties dp,\r\n Sequence seq);\r\n public void displayHighlightsChanged(DisplayProperties dp,\r\n Sequence[] seqs);\r\n}",
"protected void addPropNames()\n{\n addPropNames(\"Visible\", \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\",\n \"Font\", \"TextColor\", \"FillColor\", \"StrokeColor\", \"URL\");\n}",
"public CurveEditorPanel(RavenEditor editor)\n {\n this.editor = editor;\n initComponents();\n\n coordToDeviceXform.setToScale(1, -1);\n\n selection.addSelectionListener(this);\n ToolTipManager.sharedInstance().registerComponent(this);\n }",
"public void createFieldEditors() {\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SPACES_PER_TAB, \"Spaces per tab (Re-open editor to take effect.)\", getFieldEditorParent(), 2 ) );\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SECONDS_TO_REEVALUATE, \"Seconds between syntax reevaluation\", getFieldEditorParent(), 3 ) );\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.OUTLINE_SCALAR_MAX_LENGTH, \"Maximum display length of scalar\", getFieldEditorParent(), 4 ) );\n\t\taddField(new BooleanFieldEditor(PreferenceConstants.OUTLINE_SHOW_TAGS, \"Show tags in outline view\", getFieldEditorParent() ) );\n\n addField(new BooleanFieldEditor(PreferenceConstants.SYMFONY_COMPATIBILITY_MODE, \"Symfony compatibility mode\", getFieldEditorParent() ) );\t\t\n\t\n addField(new BooleanFieldEditor(PreferenceConstants.AUTO_EXPAND_OUTLINE, \"Expand outline on open\", getFieldEditorParent() ) );\n \n String[][] validationValues = new String[][] {\n \t\t{\"Error\", PreferenceConstants.SYNTAX_VALIDATION_ERROR}, \n \t\t{\"Warning\", PreferenceConstants.SYNTAX_VALIDATION_WARNING}, \n \t\t{\"Ignore\", PreferenceConstants.SYNTAX_VALIDATION_IGNORE}\n };\n addField(new ComboFieldEditor(PreferenceConstants.VALIDATION, \"Syntax validation severity\", validationValues, getFieldEditorParent()));\n\t\n\t}",
"public TextEditorPreferencePage() {\n \t\tsuper(GRID);\n \t\t\n \t\tsetDescription(TextEditorMessages.getString(\"PreferencePage.description\"));\t\t //$NON-NLS-1$\n \t\tPlugin plugin= Platform.getPlugin(\"org.eclipse.ui.workbench\"); //$NON-NLS-1$\n \t\tif (plugin instanceof AbstractUIPlugin) {\n \t\t\tAbstractUIPlugin uiPlugin= (AbstractUIPlugin) plugin;\n \t\t\tsetPreferenceStore(uiPlugin.getPreferenceStore());\n \t\t}\n \t}",
"public PropertiesChooserView() {\n initComponents();\n choicesModel = new DefaultListModel();\n chosenModel = new DefaultListModel();\n chooseList.setModel(choicesModel);\n chosenList.setModel(chosenModel);\n }",
"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}",
"@Override\r\n public void AddTo(DrawingEditor editor, JPanel panel, ResourceBundleUtil labels) {\n JAttributeTextField<Double> strokeWidthField = new JAttributeTextField<Double>();\r\n strokeWidthField.setColumns(2);\r\n strokeWidthField.setToolTipText(labels.getString(\"attribute.strokeWidth.toolTipText\"));\r\n strokeWidthField.setHorizontalAlignment(JAttributeTextField.LEFT);\r\n strokeWidthField.putClientProperty(\"Palette.Component.segmentPosition\", \"first\");\r\n strokeWidthField.setUI((PaletteFormattedTextFieldUI) PaletteFormattedTextFieldUI.createUI(strokeWidthField));\r\n strokeWidthField.setFormatterFactory(JavaNumberFormatter.createFormatterFactory(0d, 100d, 1d));\r\n new FigureAttributeEditorHandler<Double>(STROKE_WIDTH, strokeWidthField, editor);\r\n GridBagConstraints gbc = new GridBagConstraints();\r\n gbc.gridx = 0;\r\n gbc.gridy = 2;\r\n gbc.insets = new Insets(3, 0, 0, 0);\r\n gbc.fill = GridBagConstraints.BOTH;\r\n panel.add(strokeWidthField, gbc);\r\n\r\n JPopupButton strokeWidthPopupButton = new JPopupButton();\r\n JAttributeSlider strokeWidthSlider = new JAttributeSlider(\r\n JSlider.VERTICAL, 0, 50, 1);\r\n strokeWidthSlider.setUI((SliderUI) PaletteSliderUI.createUI(strokeWidthSlider));\r\n strokeWidthPopupButton.add(strokeWidthSlider);\r\n labels.configureToolBarButton(strokeWidthPopupButton, \"attribute.strokeWidth\");\r\n strokeWidthPopupButton.setUI((PaletteButtonUI) PaletteButtonUI.createUI(strokeWidthPopupButton));\r\n gbc = new GridBagConstraints();\r\n gbc.anchor = GridBagConstraints.FIRST_LINE_START;\r\n gbc.gridx = 1;\r\n gbc.insets = new Insets(3, 0, 0, 0);\r\n panel.add(strokeWidthPopupButton, gbc);\r\n new FigureAttributeEditorHandler<Double>(STROKE_WIDTH, strokeWidthSlider, editor);\r\n }",
"private SizeModifierSettingsEditor() {\n\t\tinitComponents();\n\t\tsettings = SizeModifierSettings.getInstance();\n\t\tloadSettings();\n\t\tmainShell.pack();\n\t\tmainShell.setBounds(\n\t\t\tCrunch3.mainWindow.getShell().getBounds().x + Crunch3.mainWindow.getShell().getBounds().width / 2 - mainShell.getBounds().width / 2,\n\t\t\tCrunch3.mainWindow.getShell().getBounds().y + Crunch3.mainWindow.getShell().getBounds().height / 2 - mainShell.getBounds().height / 2,\n\t\t\tmainShell.getBounds().width,\n\t\t\tmainShell.getBounds().height);\n\t\tmainShell.open();\n\t}",
"public ItemPresentation getPresentation() {\n return new ItemPresentation() {\n public String getPresentableText() {\n return getName();\n }\n\n @Nullable\n public String getLocationString() {\n return getNode().getPsi().getContainingFile().getName();\n }\n\n @Nullable\n public Icon getIcon(boolean open) {\n return VariableAssignment.this.getIcon(0);\n }\n\n @Nullable\n public TextAttributesKey getTextAttributesKey() {\n return null; // TODO - Investigate different fonts/colors/etc.for def vs. mac...?\n }\n };\n }",
"Builder addEditor(Person value);",
"protected ITextEditor getEditor() {\n return editor;\n }",
"public void showProperties() {\n \t\tmainFrame.showProperties();\n \t}",
"private void createDisplayEditOverlay() {\n\t}",
"ObjectProperty<Piece> getPieceProperty();",
"private void initEditorPanel() {\n\t\t\n\t\t//Remove all components from panel\n\t\tthis.editor.removeAll();\n\t\t\n\t\t//Redraw which feature\n\t\tthis.whichFeature.validate();\n\t\tthis.whichFeature.repaint();\n\t\t\n\t\t//Setting icon values\n\t\tpartL.setIcon(myParent.editor.profileImage);\n\t\tendTypeLTL.setIcon(myParent.editor.ltImage);\n\t\tendTypeRBL.setIcon(myParent.editor.rbImage);\n\t\tpfFormLL.setIcon(myParent.profileshapeImage);\n\t\tsetGo.setIcon(myParent.setImage);\n\t\tcancel.setIcon(myParent.cancelImage);\n\t\t\n\t\t//Setting values visibility\n\t\tpart.setVisible(false);\n\t\tpartL.setVisible(false);\n\t\tparts.setVisible(false);\n\t\t\n\t\tendTypeLT.setVisible(false);\n\t\tendTypeLTL.setVisible(false);\n\t\tlCut.setVisible(false);\n\t\tendTypeRB.setVisible(false);\n\t\tendTypeRBL.setVisible(false);\n\t\trCut.setVisible(false);\n\t\tpfFormL.setVisible(false);\n\t\tpfFormLL.setVisible(false);\n\t\tpfCombo.setVisible(false);\n\t\t\n\t\toffsetL.setVisible(false);\n\t\toffsetR.setVisible(false);\n\t\toffsetLT.setVisible(false);\n\t\toffsetRB.setVisible(false);\n\t\t\n\t\tbL.setVisible(false);\n\t\tbR.setVisible(false);\n\t\tdeltaL.setVisible(false);\n\t\tdeltaR.setVisible(false);\n\t\t\n\t\tsetGo.setVisible(false);\n\t\tcancel.setVisible(false);\n\t\t\n\t\tmyParent.dim.masterSelected.setEnabled(false);\n\t\tmyParent.dim.slaveSelected.setEnabled(false);\n\t\tmyParent.dim.masterSelected.setVisible(false);\n\t\tmyParent.dim.slaveSelected.setVisible(false);\n\t\tmyParent.dim.doAlign.setVisible(false);\n\t\tmyParent.dim.changeAlign.setVisible(false);\n\t\tmyParent.dim.cancelAlign.setVisible(false);\n\t\tmyParent.dim.doAlign.setEnabled(false);\n\t\tmyParent.dim.changeAlign.setEnabled(false);\n\t\t\n\t\tmyParent.alignSeq = 0;\n\t\t\n\t\t//Adding components to editor panel\n\t\teditor.add(part, new XYConstraints(1, 1, 20, 19));\n\t\teditor.add(partL, new XYConstraints(22, 1, 20, 19));\n\t\teditor.add(parts, new XYConstraints(42, 1, 140, 19));\n\t\t\n\t\teditor.add(endTypeLT, new XYConstraints(1, 23, 20, 19));\n\t\teditor.add(endTypeLTL, new XYConstraints(22, 23, 20, 19));\n\t\teditor.add(lCut, new XYConstraints(81, 23, 100, 19));\n\t\t\n\t\teditor.add(endTypeRB, new XYConstraints(1, 44, 20, 19));\n\t\teditor.add(endTypeRBL, new XYConstraints(22, 44, 20, 19));\n\t\teditor.add(rCut, new XYConstraints(81, 44, 100, 19));\n\t\t\n\t\teditor.add(pfFormL, new XYConstraints(1, 65, 20, 19));\n\t\teditor.add(pfFormLL, new XYConstraints(22, 65, 20, 19));\n\t\teditor.add(pfCombo, new XYConstraints(81, 65, 100, 19));\n\t\t\n\t\teditor.add(offsetL, new XYConstraints(1, 86, 50, 19));\n\t\teditor.add(offsetR, new XYConstraints(1, 107, 50, 19));\n\t\teditor.add(bL, new XYConstraints(1, 128, 50, 19));\n\t\teditor.add(bR, new XYConstraints(1, 149, 50, 19));\n\t\t\n\t\teditor.add(offsetLT, new XYConstraints(60, 86, 118, 19));\n\t\teditor.add(offsetRB, new XYConstraints(60, 107, 118, 19));\n\t\t\n\t\teditor.add(deltaL, new XYConstraints(60, 127, 118, 19));\n\t\teditor.add(deltaR, new XYConstraints(60, 147, 118, 19));\n\t\t\n\t\teditor.add(setGo, new XYConstraints(56, 168, 60, 19));\n\t\teditor.add(cancel, new XYConstraints(118, 168, 60, 19));\n\t\t\n\t\teditor.add(myParent.dim.masterSelected, new XYConstraints(1, 3, 120, 19));\n\t\teditor.add(myParent.dim.slaveSelected, new XYConstraints(1, 24,120, 19));\n\t\t\n\t\teditor.add(myParent.dim.doAlign, new XYConstraints(1, 50, 59, 19));\n\t\teditor.add(myParent.dim.changeAlign, new XYConstraints(61, 50, 59, 19));\n\t\teditor.add(myParent.dim.cancelAlign, new XYConstraints(121, 50, 59, 19));\n\t}",
"private InspectorInterface createInspector() {\n Inspector inspector = new Inspector(parent);\n com.cosylab.vdct.DataProvider.getInstance().addInspectableListener(inspector);\n return inspector;\n}",
"private static MenuItem createEditPropertiesMenuItem(SongManager model, Item selectedItem) {\n MenuItem editProperties = new MenuItem(EDIT_PROPERTIES);\n\n editProperties.setOnAction((event) -> {\n if (selectedItem instanceof Song) {\n PromptUI.editMetadata((Song) selectedItem);\n model.notifyCenterFolderObservers();\n model.notifyPlaylistSongsObservers();\n }\n });\n\n return editProperties;\n }",
"@Override\r\n protected void updateView() {\r\n putValue(ActionUtil.SELECTED_KEY,\r\n getActiveView() != null &&\r\n ! getActiveView().isPropertiesPanelVisible()\r\n );\r\n }",
"public VisualProperty getVisualProperty() {\n \t\treturn vizProp;\n \t}",
"public PropertySet getViewProperties() {\r\n return prefs;\r\n }",
"public void edit()\n {\n openProperties(getHighlightedActors());\n }",
"@Override\n\tpublic void onEditorCreate()\n\t{\n\t\tsetPath(t().getComponent(LttlPath.class, true));\n\t}",
"Property createProperty();",
"void showCustomizer();",
"public void createFieldEditors() {\n\t\taddField(new BooleanFieldEditor(SUAEntityPreferenceConstants.FILTER_DIFFS,\n\t\t\t\t\"Filter &Diff on startup\", getFieldEditorParent()));\n\n\t\taddField(new BooleanFieldEditor(SUAEntityPreferenceConstants.FILTER_DIFFS,\n\t\t\t\t\"Filter D&oclocs on startup\", getFieldEditorParent()));\n\n\t\taddField(new BooleanFieldEditor(SUAEntityPreferenceConstants.FILTER_DIFFS,\n\t\t\t\t\"Filter &Survey on startup\", getFieldEditorParent()));\n\t}",
"public interface Displayable {\n\n /**\n * Updates the DetailWindow with the information of the Component currently\n * selected\n */\n public void updateDetailWindow();\n\n /**\n * Retrieves the type of the displayable\n * @return A string representing the type of the component\n */\n public String getType();\n\n /**\n * Retrieves the ID of the displayable\n * @return A string representing the ID of the component\n */\n public String getID();\n \n \n /**\n * Retrieves the name of the displayable\n * @return A string representing the name of the displayable\n */\n public String getName();\n}",
"FormPropertyEditor(RADComponent radComponent, Class propertyType, RADComponent.RADProperty radProperty) {\n source = this;\n this.radComponent = radComponent;\n this.radProperty = radProperty;\n this.propertyType = propertyType;\n modifiedEditor = radProperty.getCurrentEditor ();\n if (modifiedEditor instanceof FormAwareEditor) {\n ((FormAwareEditor)modifiedEditor).setRADComponent (radComponent, radProperty);\n }\n if (modifiedEditor instanceof org.openide.explorer.propertysheet.editors.NodePropertyEditor) {\n ((org.openide.explorer.propertysheet.editors.NodePropertyEditor)modifiedEditor).attach (new org.openide.nodes.Node[] { radComponent.getNodeReference () });\n }\n modifiedEditor.addPropertyChangeListener (this);\n }",
"public java.lang.String getNewProperty_description(){\n return localNewProperty_description;\n }",
"public Object showContinuousEditor() throws Exception {\n \t\tfinal EditorDisplayer editor = EditorDisplayer.getEditor(this, EditorType.CONTINUOUS);\n \n \t\tif (editor == EditorDisplayer.CONTINUOUS_COLOR)\n \t\t\teditor.setParameters(new Object[] { 450, 180, \"Gradient Editor for \" + this.calcName, this });\n \t\telse if (editor == EditorDisplayer.CONTINUOUS_CONTINUOUS)\n \t\t\teditor.setParameters(new Object[] {\n \t\t\t 450, 350, \"Continuous Editor for \" + this.calcName, this\n \t\t\t });\n \t\telse\n \t\t\teditor.setParameters(new Object[] {\n \t\t\t 450, 300, \"Continuous Editor for \" + this.calcName, this\n \t\t\t });\n \n \t\treturn showEditor(editor);\n \t}",
"public interface AdvancedTableCompositionEditorSamplePropertiesEditionPart {\n\n\n\n\t/**\n\t * Init the advancedtablecompositionRequiredProperty\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initAdvancedtablecompositionRequiredProperty(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the advancedtablecompositionRequiredProperty\n\t * @param newValue the advancedtablecompositionRequiredProperty to update\n\t * \n\t */\n\tpublic void updateAdvancedtablecompositionRequiredProperty();\n\n\t/**\n\t * Adds the given filter to the advancedtablecompositionRequiredProperty edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToAdvancedtablecompositionRequiredProperty(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the advancedtablecompositionRequiredProperty edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToAdvancedtablecompositionRequiredProperty(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the advancedtablecompositionRequiredProperty table\n\t * \n\t */\n\tpublic boolean isContainedInAdvancedtablecompositionRequiredPropertyTable(EObject element);\n\n\n\n\n\t/**\n\t * Init the advancedtablecompositionOptionalProperty\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initAdvancedtablecompositionOptionalProperty(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the advancedtablecompositionOptionalProperty\n\t * @param newValue the advancedtablecompositionOptionalProperty to update\n\t * \n\t */\n\tpublic void updateAdvancedtablecompositionOptionalProperty();\n\n\t/**\n\t * Adds the given filter to the advancedtablecompositionOptionalProperty edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToAdvancedtablecompositionOptionalProperty(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the advancedtablecompositionOptionalProperty edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToAdvancedtablecompositionOptionalProperty(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the advancedtablecompositionOptionalProperty table\n\t * \n\t */\n\tpublic boolean isContainedInAdvancedtablecompositionOptionalPropertyTable(EObject element);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\r\n\t\r\n\t// End of user code\n\n}",
"protected abstract BaseDualControlDataEditor<PK, DATA> instantiateEditorPanel () ;",
"public JPanel buildProjectProperties()\n\t{\n\t\tprojectProperties.setPreferredSize(new Dimension(200, 190)); //Set the size of the window\n \tprojectProperties.setBorder (projectTitle); //Add a border around the window\n \t\n \treturn projectProperties;\n\t}",
"@Override\n public String toString() {\n return \"Property{\" +\n \"boardPosition=\" + boardPosition +\n \", name='\" + name + '\\'' +\n \", value=\" + value +\n \", rentPrice=\" + rentPrice +\n \", mortgagePrice=\" + mortgagePrice +\n \", isMortgaged=\" + isMortgaged +\n \", redeemPrice=\" + redeemPrice +\n '}';\n }",
"public MultiViewDescription getActiveDescription() {\n \treturn currentEditor;\n }",
"public void createFieldEditors() \n\t{\n\t\n\tprefix = new StringFieldEditor(PreferenceConstants.PSQL_PREFIX, \"Verbindungsprefix:\", 14, getFieldEditorParent());\n\taddField(prefix);\n\t\n\tip = new StringFieldEditor(PreferenceConstants.PSQL_IP, \"IP-Adresse der Datenbank:\", 14, getFieldEditorParent());\n\taddField(ip);\n\t\n\tport = new IntegerFieldEditor(PreferenceConstants.PSQL_PORT, \"Port der Datenbank:\", getFieldEditorParent(),5);\n\taddField(port);\n\t\n\tdb = new StringFieldEditor(PreferenceConstants.PSQL_DATABASE, \"Name des Datenbankschemas:\", 14, getFieldEditorParent());\n\taddField(db);\n\t\n\tuser = new StringFieldEditor(PreferenceConstants.PSQL_USER, \"Name des Datenbankbenutzers:\", 14, getFieldEditorParent());\n\taddField(user);\n\n\tpasswort = new StringFieldEditor(PreferenceConstants.PSQL_PASSWORT, \"Passwort des Datenbankbenutzers:\", 14, getFieldEditorParent());\n\taddField(passwort);\n\n\t}",
"protected void configureShell(Shell shell) {\n super.configureShell(shell);\n shell.setText(Messages.getString(\"EditAction.Edit\") + getPropertyLabel()); //$NON-NLS-1$\n }",
"public POGOProtos.Rpc.QuestDisplayProto.Builder getDisplayBuilder() {\n \n onChanged();\n return getDisplayFieldBuilder().getBuilder();\n }",
"protected Display getDisplay() {\n return display;\n }",
"public Property createProperty() {\n if (newProject == null) {\n reinit();\n }\n Property p = new Property(true, getProject());\n p.setProject(newProject);\n p.setTaskName(\"property\");\n properties.addElement(p);\n return p;\n }",
"public interface Displayable {\n\n\tpublic String getDisplayName();\n\n\tpublic String getDisplayTooltip();\n\t\n}",
"public void properties(){\n setChanged();\n notifyObservers(name);\n System.out.println(\"Name: \" + name);\n System.out.println(\"Formula: \" + FORMULA);\n System.out.println(\"Colour: \" + COLOUR);\n System.out.println(\"Streak: \" + STREAK);\n System.out.println(\"Luster: \" + LUSTER);\n System.out.println(\"Diaphaneity: \" + DIAPHANEITY);\n System.out.println(\"Cleavage: \" + CLEAVAGE);\n System.out.println(\"Crystal system: \" + CRYSTAL_SYSTEM);\n System.out.println(\"Hardness: \" + HARDNESS);\n System.out.println(\"Specific Gravity: \" + SPECIFIC_GRAVITY);\n }"
] | [
"0.62836003",
"0.615627",
"0.60967094",
"0.6071574",
"0.6042168",
"0.60037154",
"0.6002211",
"0.5854544",
"0.5852782",
"0.5852627",
"0.58445305",
"0.58326095",
"0.5828475",
"0.58198315",
"0.5819442",
"0.5799287",
"0.57928115",
"0.578143",
"0.5780925",
"0.57637775",
"0.57560766",
"0.57461655",
"0.5733275",
"0.57027286",
"0.5685432",
"0.56771564",
"0.56522846",
"0.564414",
"0.56421304",
"0.5640935",
"0.56222606",
"0.5601821",
"0.55882597",
"0.5582002",
"0.5554755",
"0.5551572",
"0.554884",
"0.55372757",
"0.5530173",
"0.5513008",
"0.55003047",
"0.54983294",
"0.54851454",
"0.5478689",
"0.54709196",
"0.54634684",
"0.5416608",
"0.5411992",
"0.5408102",
"0.5407904",
"0.54061186",
"0.539758",
"0.53973085",
"0.5395914",
"0.5384919",
"0.5372274",
"0.5371384",
"0.5364182",
"0.5363132",
"0.5362386",
"0.53503954",
"0.5350224",
"0.534565",
"0.53326184",
"0.53265095",
"0.532266",
"0.53187007",
"0.5315138",
"0.5313598",
"0.5311305",
"0.5306925",
"0.53033864",
"0.53021055",
"0.53000706",
"0.5297936",
"0.52952343",
"0.52921724",
"0.52866787",
"0.5284907",
"0.5284017",
"0.5283039",
"0.52785355",
"0.5274734",
"0.52647114",
"0.52621573",
"0.5259197",
"0.52485263",
"0.5238654",
"0.5236438",
"0.52306706",
"0.5229675",
"0.5222532",
"0.52169317",
"0.52144796",
"0.51962173",
"0.5195758",
"0.5194051",
"0.51923877",
"0.5191965",
"0.5179451"
] | 0.79972327 | 0 |
If the property descriptor explicitly says it does not want a custom editor button, this overrides anything set on the PropertyPanel. | public final void setShowCustomEditorButton(boolean val) {
if (getProperty() != null) {
Property p = getProperty();
Boolean explicit = (Boolean) p.getValue("suppressCustomEditor"); //NOI18N
if (explicit != null) {
val = explicit.booleanValue();
System.err.println("Found explicit value: " + val);
}
}
if (showCustomEditorButton != val) {
showCustomEditorButton = val;
replaceInner();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean supportsCustomEditor() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean hasCustomUI() {\n\t\treturn false;\n\t}",
"public boolean hasInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).hasInPlaceCustomEditor ();\n } else {\n return false;\n }\n }",
"public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}",
"public FieldModifierPropertyEditor() {\n super(Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.STATIC |\n Modifier.FINAL | Modifier.TRANSIENT | Modifier.VOLATILE);\n }",
"public final JButton getDefaultSPViewEditDescButton() {\n return defaultSPViewEditDescButton;\n }",
"public java.awt.Component getInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).getInPlaceCustomEditor ();\n } else {\n return null;\n }\n }",
"public CustomModuleEditor getPropertyEditor() {\n\t return new SetErrorFunction();\n }",
"public PropertyPageCellEditor(\n \t\tComposite parent,\n \t\tPropertyPagePropertyDescriptor descriptor) {\n \t\tthis(parent, descriptor, SWT.NONE);\n \t}",
"public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}",
"public boolean shouldEditButtonBePresent();",
"@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }",
"protected void addEditorPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_editor_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_editor_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__EDITOR,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }",
"public SwitchYardSettingsPropertyPage() {\n super();\n noDefaultAndApplyButton();\n }",
"public void enableSaveButton()\n {\n boilerplate.getSaveButton().setDisable(false);\n }",
"public void disable() {\n parent.setDefaultEnabled(false);\n }",
"private void configureComponents() {\n save.setStyleName(ValoTheme.BUTTON_PRIMARY);\n save.setClickShortcut(ShortcutAction.KeyCode.ENTER);\n setVisible(false);\n }",
"@Override\r\n\tprotected boolean hasEditSupport() {\n\t\treturn false;\r\n\t}",
"@Override\n\tprotected Control createControl(Composite parent) {\n\t\tthis.parent = parent;\n\t\t//return cellEditor.getControl();\n\t\treturn null; \n\t}",
"public FXMLPropertiesDisabler() {\n this(OS.get());\n }",
"@Override\n\tprotected void setValueOnUi() {\n\n\t}",
"protected void addIgnorePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Widget_ignore_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Widget_ignore_feature\", \"_UI_Widget_type\"),\n\t\t\t\t WavePackage.Literals.WIDGET__IGNORE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }",
"@StudioProperty(type = PropertyType.COMPONENT_REF,\n options = \"io.jmix.ui.component.Button\")\n void setButton(@Nullable Button button);",
"public JButton getAddButton(){ return addCustomTraitButton; }",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"public boolean supportsCustomEditor() {\n PropertyEditor[] editors = getAllEditors ();\n if (editors.length > 1) return true; // we must allow to choose the editor even if none of them supports custom editing\n if (editors.length == 1) return editors[0].supportsCustomEditor ();\n return false;\n }",
"public void propertyChange(final PropertyChangeEvent e) {\n if (JInternalFrame.IS_MAXIMUM_PROPERTY.equals(e.getPropertyName())\n || JInternalFrame.IS_ICON_PROPERTY.equals(e.getPropertyName())) {\n setButtonIcons();\n enableActions();\n } else if (e.getPropertyName().\n equals(StringConstants.INTERNAL_FRAME_ICONABLE_PROPERTY)) {\n updateButton(iconButton, frame.isIconifiable());\n } else if (e.getPropertyName().\n equals(StringConstants.INTERNAL_FRAME_MAXIMIZABLE_PROPERTY)) {\n updateButton(maxButton, frame.isMaximizable());\n } else if (e.getPropertyName().\n equals(StringConstants.INTERNAL_FRAME_CLOSABLE_PROPERTY)) {\n updateButton(closeButton, frame.isClosable());\n } else if (e.getPropertyName().\n equals(StringConstants.INTERNAL_FRAME_RESIZABLE_PROPERTY)) {\n enableActions();\n } else if (e.getPropertyName().equals(\"ancestor\")) {\n // to enable sizeAction, moveAction\n enableActions();\n revalidate();\n } else if (JInternalFrame.FRAME_ICON_PROPERTY.\n equals(e.getPropertyName())) {\n internals.setFrameIcon(frame.getFrameIcon());\n revalidate();\n repaint();\n } else if (JInternalFrame.TITLE_PROPERTY.\n equals(e.getPropertyName())) {\n revalidate();\n repaint();\n }\n }",
"@Override\r\n\tpublic CellEditor createPropertyEditor(Composite parent) {\n\t\tMenuCellEditor editor = new MenuCellEditor(parent);\r\n\t\teditor.setListenerModel(flistenermodel);\r\n if (getValidator() != null) {\r\n\t\t\teditor.setValidator(getValidator());\r\n\t\t}\t\t\r\n\t\t return editor;\r\n\t}",
"void setEditButtonEnabled(boolean isEnabled);",
"@Override\n\tpublic void setButtonAction() {\n\t}",
"@Override\r\n\tprotected void onBoEdit() throws Exception {\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tsuper.onBoEdit();\r\n\t}",
"@Override\n protected Button createButton(Composite parent, int id, String label,\n boolean defaultButton) {\n return null;// 重写父类的按钮,返回null,使默认按钮失效\n }",
"@Override\n\tpublic Button getEraseParameterButton() {\n\t\treturn parameterButtonBar.getEraseButton();\n\t}",
"public BooleanProperty getOverrideProperty() {\n return overrideProperty;\n }",
"private void initEditorPanel() {\n\t\t\n\t\t//Remove all components from panel\n\t\tthis.editor.removeAll();\n\t\t\n\t\t//Redraw which feature\n\t\tthis.whichFeature.validate();\n\t\tthis.whichFeature.repaint();\n\t\t\n\t\t//Setting icon values\n\t\tpartL.setIcon(myParent.editor.profileImage);\n\t\tendTypeLTL.setIcon(myParent.editor.ltImage);\n\t\tendTypeRBL.setIcon(myParent.editor.rbImage);\n\t\tpfFormLL.setIcon(myParent.profileshapeImage);\n\t\tsetGo.setIcon(myParent.setImage);\n\t\tcancel.setIcon(myParent.cancelImage);\n\t\t\n\t\t//Setting values visibility\n\t\tpart.setVisible(false);\n\t\tpartL.setVisible(false);\n\t\tparts.setVisible(false);\n\t\t\n\t\tendTypeLT.setVisible(false);\n\t\tendTypeLTL.setVisible(false);\n\t\tlCut.setVisible(false);\n\t\tendTypeRB.setVisible(false);\n\t\tendTypeRBL.setVisible(false);\n\t\trCut.setVisible(false);\n\t\tpfFormL.setVisible(false);\n\t\tpfFormLL.setVisible(false);\n\t\tpfCombo.setVisible(false);\n\t\t\n\t\toffsetL.setVisible(false);\n\t\toffsetR.setVisible(false);\n\t\toffsetLT.setVisible(false);\n\t\toffsetRB.setVisible(false);\n\t\t\n\t\tbL.setVisible(false);\n\t\tbR.setVisible(false);\n\t\tdeltaL.setVisible(false);\n\t\tdeltaR.setVisible(false);\n\t\t\n\t\tsetGo.setVisible(false);\n\t\tcancel.setVisible(false);\n\t\t\n\t\tmyParent.dim.masterSelected.setEnabled(false);\n\t\tmyParent.dim.slaveSelected.setEnabled(false);\n\t\tmyParent.dim.masterSelected.setVisible(false);\n\t\tmyParent.dim.slaveSelected.setVisible(false);\n\t\tmyParent.dim.doAlign.setVisible(false);\n\t\tmyParent.dim.changeAlign.setVisible(false);\n\t\tmyParent.dim.cancelAlign.setVisible(false);\n\t\tmyParent.dim.doAlign.setEnabled(false);\n\t\tmyParent.dim.changeAlign.setEnabled(false);\n\t\t\n\t\tmyParent.alignSeq = 0;\n\t\t\n\t\t//Adding components to editor panel\n\t\teditor.add(part, new XYConstraints(1, 1, 20, 19));\n\t\teditor.add(partL, new XYConstraints(22, 1, 20, 19));\n\t\teditor.add(parts, new XYConstraints(42, 1, 140, 19));\n\t\t\n\t\teditor.add(endTypeLT, new XYConstraints(1, 23, 20, 19));\n\t\teditor.add(endTypeLTL, new XYConstraints(22, 23, 20, 19));\n\t\teditor.add(lCut, new XYConstraints(81, 23, 100, 19));\n\t\t\n\t\teditor.add(endTypeRB, new XYConstraints(1, 44, 20, 19));\n\t\teditor.add(endTypeRBL, new XYConstraints(22, 44, 20, 19));\n\t\teditor.add(rCut, new XYConstraints(81, 44, 100, 19));\n\t\t\n\t\teditor.add(pfFormL, new XYConstraints(1, 65, 20, 19));\n\t\teditor.add(pfFormLL, new XYConstraints(22, 65, 20, 19));\n\t\teditor.add(pfCombo, new XYConstraints(81, 65, 100, 19));\n\t\t\n\t\teditor.add(offsetL, new XYConstraints(1, 86, 50, 19));\n\t\teditor.add(offsetR, new XYConstraints(1, 107, 50, 19));\n\t\teditor.add(bL, new XYConstraints(1, 128, 50, 19));\n\t\teditor.add(bR, new XYConstraints(1, 149, 50, 19));\n\t\t\n\t\teditor.add(offsetLT, new XYConstraints(60, 86, 118, 19));\n\t\teditor.add(offsetRB, new XYConstraints(60, 107, 118, 19));\n\t\t\n\t\teditor.add(deltaL, new XYConstraints(60, 127, 118, 19));\n\t\teditor.add(deltaR, new XYConstraints(60, 147, 118, 19));\n\t\t\n\t\teditor.add(setGo, new XYConstraints(56, 168, 60, 19));\n\t\teditor.add(cancel, new XYConstraints(118, 168, 60, 19));\n\t\t\n\t\teditor.add(myParent.dim.masterSelected, new XYConstraints(1, 3, 120, 19));\n\t\teditor.add(myParent.dim.slaveSelected, new XYConstraints(1, 24,120, 19));\n\t\t\n\t\teditor.add(myParent.dim.doAlign, new XYConstraints(1, 50, 59, 19));\n\t\teditor.add(myParent.dim.changeAlign, new XYConstraints(61, 50, 59, 19));\n\t\teditor.add(myParent.dim.cancelAlign, new XYConstraints(121, 50, 59, 19));\n\t}",
"public abstract boolean isAllowCustomProperties();",
"@Override\r\n protected final Control createButtonBar(Composite parent) {\n return null;\r\n }",
"public final void setDefaultSPViewEditDescButton(final JButton defaultSPViewEditDescButtonParam) {\n defaultSPViewEditDescButton = defaultSPViewEditDescButtonParam;\n }",
"protected Component getControlOwner() {\r\n return null;\r\n }",
"@Override\n public boolean isDisableMetadataField() {\n return false;\n }",
"public void setOverrideProperty(BooleanProperty overrideProperty) {\n this.overrideProperty = overrideProperty;\n }",
"public default boolean isEditable(){ return false; }",
"@Override protected JComponent setupPanel()\t{ return null; }",
"public java.awt.Component getCustomEditor() {\n return new FormCustomEditor (this);\n }",
"private void rHintButton(Button button){\r\n button.getStyleClass().remove(\"closedButton\");\r\n button.getStyleClass().add(\"chooseButtons\");\r\n button.setMouseTransparent(false);\r\n }",
"protected void addReadOnlyPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Widget_readOnly_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Widget_readOnly_feature\", \"_UI_Widget_type\"),\n\t\t\t\t WavePackage.Literals.WIDGET__READ_ONLY,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"public BaseEditorPanel getEditorPanel ()\n {\n return _epanel;\n }",
"@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}",
"public void setEditor(Editor editor)\n {\n this.editor = editor;\n }",
"default void disableFollowButton() {}",
"private void disableButtons() {\n for (DeployCommand cmd : DeployCommand.values()){\n setButtonEnabled(cmd, false);\n }\n butDone.setEnabled(false);\n setLoadEnabled(false);\n setUnloadEnabled(false);\n setAssaultDropEnabled(false);\n }",
"@Override\n\t\tpublic void configureRegistry(IConfigRegistry configRegistry) {\n\t\t\tconfigRegistry.unregisterConfigAttribute(EditConfigAttributes.OPEN_IN_DIALOG);\n\t\t\tconfigRegistry.registerConfigAttribute(EditConfigAttributes.OPEN_IN_DIALOG, popupEdit, DisplayMode.EDIT);\n\t\t}",
"public final BooleanProperty editableProperty() {\n\n return this.getWrappedControl().editableProperty();\n }",
"public boolean isVisualizeEditEnabled() {\n return visualizeEditEnabled;\n }",
"@Override\n\tpublic void setParameterWidgetReadOnly(boolean isEditable){\n\t\t\n\t\tgetParameterNameTxtArea().setEnabled(isEditable);\n\t\tgetParameterAceEditor().setReadOnly(!isEditable);\n\t\tSystem.out.println(\"in setParameterWidgetReadOnly: setting Ace Editor read only flag. read only = \" + !isEditable);\n\t\tgetParameterButtonBar().getSaveButton().setEnabled(isEditable);\n\t\tgetParameterButtonBar().getDeleteButton().setEnabled(isEditable);\n\t\tgetParameterButtonBar().getInsertButton().setEnabled(isEditable);\n\t}",
"public PropertyPageCellEditor(\n \t\tComposite parent,\n \t\tPropertyPagePropertyDescriptor descriptor,\n \t\tint style) {\n \t\tsuper(parent, style);\n \t\tpropertyDescriptor = descriptor;\n \t}",
"default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }",
"protected void addDisableInputPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_UnitField_disableInput_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_UnitField_disableInput_feature\", \"_UI_UnitField_type\"),\n\t\t\t\t WafPackage.Literals.UNIT_FIELD__DISABLE_INPUT,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"@Override\n\t\tpublic void postInit(){\n\t\tsuper.postInit();\n\t\tthis.buttonList.add(this.readDescription = new GuiButton(6, this.width - 110, 2, 100, 20, \"World Description\"));\n\t\tthis.readDescription.enabled = false;\n\t}",
"@Test\n public void testAdditionalActionVisible() {\n JXTable table = new JXTable(10, 4);\n ColumnControlButton button = new ColumnControlButton(table);\n assertEquals(true, button.getAdditionalActionsVisible());\n DefaultColumnControlPopup popup = (DefaultColumnControlPopup) button.getColumnControlPopup();\n assertEquals(\"additional actions visible, component count expected \", \n table.getColumnCount() + 1 /* separator */ + 3 /* actions with column. prefix*/, \n popup.getPopupMenu().getComponentCount());\n PropertyChangeReport report = new PropertyChangeReport(button);\n button.setAdditionalActionsVisible(false);\n TestUtils.assertPropertyChangeEvent(report, \"additionalActionsVisible\", true, false);\n assertEquals(false, button.getAdditionalActionsVisible());\n assertEquals(\"additional actions hidden, component count expected \", \n table.getColumnCount(),\n popup.getPopupMenu().getComponentCount());\n \n }",
"@FXML\n void setBtnAddEditLocationOnClick() {\n this.setDisableLocation(false);\n this.setDisableContent(true);\n this.setDisablePrice(true);\n this.setDisableSelectedButtons(false);\n this.setDisableAds(true);\n this.tableViewAds.setDisable(true);\n this.cleanDetailsFields();\n this.selectOptionAddEdit(false, false, true, false);\n\n if (isEdit) {\n this.comboBoxLocation.setDisable(false);\n }\n }",
"public JComponent getPreferenceUI() {\n\t\treturn null;\n\t}",
"@Override\n public void testCreateAsEditor() {}",
"@Override\npublic boolean isEnabled() {\n\treturn false;\n}",
"@Override\n\tpublic Button getEraseDefineButton() {\n\t\treturn defineButtonBar.getEraseButton();\n\t}",
"public void designerInputModified(DesignerEvent e);",
"public void editButtonClicked() {\n setButtonsDisabled(false, true, true);\n setAllFieldsAndSliderDisabled(false);\n }",
"@Override\n public boolean onCheckIsTextEditor() {\n return false;\n }",
"private void disableButtons()\r\n {\r\n }",
"@FXML\n void setBtnDeleteLocationOnClick() {\n this.btnAdd.setDisable(true);\n this.btnEdit.setDisable(true);\n this.setDisableSelectedButtons(false);\n this.comboBoxLocation.setDisable(false);\n this.tableViewAds.setDisable(true);\n this.selectOptionAddEdit(false, false, true, false);\n }",
"@Override\n public boolean isEnabled() {\n return false;\n }",
"@Override\n public boolean isEnabled() {\n return false;\n }",
"@Override\r\n public boolean isEditable(AuthenticationInfo obj) {\n if (CFG_GUI.CFG.isPresentationModeEnabled()) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public IButton getEditButton() {\n return controls.getEditButton();\n }",
"@Override\n\tpublic JToggleButton getToggleButton() {\n\t\treturn null;\n\t}",
"public JButton getAddModifyButton() {\n return addModifyButton;\n }",
"public void setHasCustom(boolean hasCustom);",
"protected boolean hasNegativeButton() {\n return false;\n }",
"@Override\r\n\tpublic void createPartControl(Composite parent) {\n\r\n\t}",
"public boolean hasEditor()\n\t{\n\t\treturn true;\n\t}",
"public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }",
"public final BooleanProperty disabledProperty()\n {\n return myDisabledProperty;\n }",
"@Override\n\tpublic boolean requiresToggleButton() {\n\t\treturn false;\n\t}",
"@Override\npublic void removeAllProperties(VirtualContainer widget) {\n\t\n}",
"void addCustomization(@NotNull EditorEx editor, @NotNull Feature feature);",
"public ToggleControl() {\n\t\tfieldName = \"Untitled Control\";\n\t\tvalue = false;\n\t}",
"@Override\n\tpublic void setDefinitionWidgetReadOnly(boolean isEditable){\n\t\t\n\t\tgetDefineNameTxtArea().setEnabled(isEditable);\n\t\tgetDefineAceEditor().setReadOnly(!isEditable);\n\t\tgetContextDefinePATRadioBtn().setEnabled(isEditable);\n\t\tgetContextDefinePOPRadioBtn().setEnabled(isEditable);\n\t\tSystem.out.println(\"in setDefinitionWidgetReadOnly: setting Ace Editor read only flag. read only = \" + !isEditable);\n\t\tgetDefineButtonBar().getSaveButton().setEnabled(isEditable);\n\t\tgetDefineButtonBar().getDeleteButton().setEnabled(isEditable);\n\t\tgetDefineButtonBar().getInsertButton().setEnabled(isEditable);\n\t\tgetDefineButtonBar().getTimingExpButton().setEnabled(isEditable);\n\t}",
"@Override\n public void checkEditing() {\n }",
"public SettingsMenuPanel() {\n initComponents();\n changed.setVisible(false);\n }",
"public EditorPropertyDisplayer(Property p) {\n this(p, null);\n }",
"private ch.softenvironment.view.SimpleEditorPanel getPnlEditor() {\n\tif (ivjPnlEditor == null) {\n\t\ttry {\n\t\t\tivjPnlEditor = new ch.softenvironment.view.SimpleEditorPanel();\n\t\t\tivjPnlEditor.setName(\"PnlEditor\");\n\t\t\tivjPnlEditor.setLayout(new javax.swing.BoxLayout(getPnlEditor(), javax.swing.BoxLayout.X_AXIS));\n\t\t\tivjPnlEditor.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjPnlEditor;\n}",
"public OSDarkLAFComboBoxEditor()\r\n {\r\n super();\r\n editor.setBorder(OSDarkLAFBorders.getComboEditorBorder());\r\n }",
"private void disablePhotoEditing() {\r\n isEditingPhotos = false;\r\n }",
"protected void installDefaults() {\n\t\tColor bg = this.controlPanel.getBackground();\n\t\tif (bg == null || bg instanceof UIResource) {\n\t\t\tthis.controlPanel.setBackground(FlamingoUtilities.getColor(\n\t\t\t\t\tColor.lightGray, \"ControlPanel.background\",\n\t\t\t\t\t\"Panel.background\"));\n\t\t}\n\n\t\tBorder b = this.controlPanel.getBorder();\n\t\tif (b == null || b instanceof UIResource) {\n\t\t\tBorder toSet = UIManager.getBorder(\"ControlPanel.border\");\n\t\t\tif (toSet == null)\n\t\t\t\tnew BorderUIResource.EmptyBorderUIResource(1, 2, 1, 2);\n\t\t\tthis.controlPanel.setBorder(toSet);\n\t\t}\n\t\t\n\t\tFont font = this.controlPanel.getFont();\n if (font == null || font instanceof UIResource) {\n Font toSet = UIManager.getFont(\"Panel.font\");\n this.controlPanel.setFont(toSet);\n }\n\t}",
"@Override\n\tprotected Control createContents(Composite arg0) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic ToolStripButton getConfigurationButton() {\n\t\treturn configurationButton;\n\t}",
"@Override\npublic boolean delegateSelectionToWidgetShell() {\n\treturn false;\n}",
"@Override\n\tprotected void initializePopupFields(Owner data) {\n\t}",
"@Override\n\tprotected void handleSettings(ClickEvent event) {\n\t\t\n\t}"
] | [
"0.62741894",
"0.6188662",
"0.61318207",
"0.606741",
"0.59131444",
"0.580118",
"0.57796514",
"0.5764428",
"0.5757403",
"0.5751678",
"0.5721563",
"0.5691282",
"0.56860256",
"0.5678437",
"0.56566846",
"0.56363404",
"0.562533",
"0.56233364",
"0.55951726",
"0.55799943",
"0.5577146",
"0.5575233",
"0.5570361",
"0.5563939",
"0.5550448",
"0.55293256",
"0.5503931",
"0.5488482",
"0.548547",
"0.54643166",
"0.5452442",
"0.54365474",
"0.54254097",
"0.5413372",
"0.5408674",
"0.54066503",
"0.5403861",
"0.53895503",
"0.53661275",
"0.53577244",
"0.535308",
"0.5352874",
"0.533964",
"0.53389907",
"0.5323245",
"0.5300712",
"0.5300601",
"0.5298477",
"0.5297212",
"0.5296733",
"0.52870953",
"0.5282683",
"0.52762884",
"0.52717394",
"0.5271202",
"0.5265844",
"0.5248254",
"0.52476233",
"0.5246288",
"0.52339154",
"0.5232831",
"0.5209895",
"0.5203627",
"0.5190868",
"0.5186593",
"0.518399",
"0.5179776",
"0.5178361",
"0.51779264",
"0.517739",
"0.5173517",
"0.5172641",
"0.5172641",
"0.5171337",
"0.51639986",
"0.51596886",
"0.51553154",
"0.51515263",
"0.51512647",
"0.5150825",
"0.51487213",
"0.5145906",
"0.5139418",
"0.513013",
"0.5122572",
"0.51172996",
"0.5107753",
"0.51076853",
"0.5093403",
"0.5076326",
"0.507019",
"0.5069258",
"0.5059302",
"0.5049922",
"0.50463927",
"0.50453997",
"0.5036501",
"0.5031646",
"0.5025212",
"0.5024528"
] | 0.6937546 | 0 |
Basically some hacks to acquire the underlying property descriptor in the case of a wrapper. This is here because some property editors will cast the result of PropertyEnv.getFeatureDescriptor() as a specific implementation type, so even if we're wrapping a property model, we still need to make sure we're returning the class they expect. | static final FeatureDescriptor findFeatureDescriptor(PropertyDisplayer pd) {
if (pd instanceof EditorPropertyDisplayer) {
//Issue 38004, more gunk to ensure we get the right feature
//descriptor
EditorPropertyDisplayer epd = (EditorPropertyDisplayer) pd;
if (epd.modelRef != null) {
PropertyModel pm = epd.modelRef.get();
if (pm instanceof ExPropertyModel) {
FeatureDescriptor fd = ((ExPropertyModel) pm).getFeatureDescriptor();
if (fd != null) {
return fd;
}
}
}
}
Property p = pd.getProperty();
if (p instanceof ModelProperty) {
return ((ModelProperty) p).getFeatureDescriptor();
} else if (p instanceof ModelProperty.DPMWrapper) {
return ((ModelProperty.DPMWrapper) p).getFeatureDescriptor();
} else {
return p;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private PropertyPagePropertyDescriptor getPropertyDescriptor() {\n \t\treturn propertyDescriptor;\n \t}",
"public java.beans.PropertyDescriptor[] getPropertyDescriptors()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfinal java.beans.PropertyDescriptor[] res =\n\t\t\t\t{ prop(\"TargetType\", \"the type of vessel this model is evading\"),\n\t\t\t\t\t\tprop(\"Name\", \"the name of this detonation model\"),\n\t\t\t\t\t\tprop(\"DetectionLevel\", \"the name of this detonation model\"), };\n\t\t\t\tres[2]\n\t\t\t\t\t\t.setPropertyEditorClass(DetectionEvent.DetectionStatePropertyEditor.class);\n\t\t\t\treturn res;\n\t\t\t}\n\t\t\tcatch (java.beans.IntrospectionException e)\n\t\t\t{\n\t\t\t\treturn super.getPropertyDescriptors();\n\t\t\t}\n\t\t}",
"public ClassDescriptor getClassDescriptor() {\n\t\tClassDescriptor desc = getDescriptor();\n\t\tif (desc instanceof ClassDescriptor) {\n\t\t\treturn (ClassDescriptor)desc;\n\t\t} else {\n\t\t\tthrow ValidationException.cannotCastToClass(desc, desc.getClass(), ClassDescriptor.class);\n\t\t}\n }",
"protected EntityDescriptor getDescriptor() {\n if (descriptor == null) {\n descriptor = mixing.getDescriptor(type);\n }\n return descriptor;\n }",
"public PropertyDefinitionBase getPropertyDefinition() {\n return propertyDefinition;\n }",
"protected PropertyDescriptor getPropDescriptor(Object target, String propName)\n\t\t\tthrows IntrospectionException {\n\t\tPropertyDescriptor result = null;\n\t\tBeanInfo bi = Introspector.getBeanInfo(target.getClass());\n\t\tPropertyDescriptor[] properties = bi.getPropertyDescriptors();\n\t\tfor (PropertyDescriptor p : properties) {\n\t\t\tif (p.getName().equals(propName)) {\n\t\t\t\tresult = p;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"@Override\r\n\tpublic ElementKind getElementKind() \r\n\t{\r\n\t\t/* if the Property is just a reference,\r\n\t\t * return the type of the referent */\r\n\t\tif (referent != null) return referent.getElementKind();\r\n\r\n\t\treturn ElementKind.PROPERTY;\r\n\t}",
"PropertyInfo getPropertyInfo();",
"public ClassDescriptor getDescriptor() {\n return descriptor;\n }",
"Property getProperty();",
"Property getProperty();",
"public java.beans.PropertyDescriptor[] getPropertyDescriptors() {\n\ttry {\n\t\tjava.beans.PropertyDescriptor aDescriptorList[] = {\n\t\t\tcomponentOrientationPropertyDescriptor()\n\t\t};\n\t\treturn aDescriptorList;\n\t} catch (Throwable exception) {\n\t\thandleException(exception);\n\t};\n\treturn null;\n}",
"public interface Property {\n /**\n * @return Type of the property.\n */\n PropertyType getPropertyType();\n\n /**\n * Gets propertyInfo of this property.\n *\n * @return PropertyInfo or null, if the property is not part of any model; and thus it has no info associated\n */\n PropertyInfo getPropertyInfo();\n\n /**\n * Casts the property value safely, possibly to more specific type.\n *\n * @param <T> expected type of a value (must be same type or supertype of the type defined in the propertyInfo of this property)\n * @param clazz clazz which represents type of a property value\n * @return property value\n * @throws UnsupportedPropertyException if this property represents another than requested, thus it is not possible to cast property\n * to the requested type.\n */\n <T extends Property> T cast(Class<T> clazz) throws UnsupportedPropertyException;\n\n void setPropertyInfo(PropertyInfo propertyInfo);\n\n /**\n * Gets Model which owns this property.\n *\n * @return Model which owns this property or null, if the preperty is not part of any model; and thus it has no model associated.\n */\n Model getModel();\n\n /**\n * Sets a model which owns this property.\n *\n * @param model model which owns this property.\n */\n void setModel(Model model);\n\n /**\n * This method performs validation of this property and determines if property is valid.\n *\n * @return true if and only if the content of a property is valid.\n */\n boolean isValid();\n\n /**\n * This method performs validation of this property and in case that property is invalid it returns error\n * description.\n *\n * @return validation error object or null if this property is valid.\n */\n ValidationError getValidationError();\n\n /**\n * Adds a listener for this property.\n *\n * @param listener listener of the property.\n */\n void addPropertyListener(PropertyListener listener);\n\n /**\n * Removes a listener for this property.\n *\n * @param listener listener to be removed\n */\n void removePropertyListener(PropertyListener listener);\n}",
"private JSType getPropertyType(JSType objType, String propName, Node n, FlowScope scope) {\nJSType unknownType = getNativeType(UNKNOWN_TYPE);\n JSType propertyType = null;\n boolean isLocallyInferred = false;\n // Scopes sometimes contain inferred type info about qualified names.\nString qualifiedName = n.getQualifiedName();\n StaticSlot<JSType> var = scope.getSlot(qualifiedName);\n if (var != null) {\n JSType varType = var.getType();\n if (varType != null) {\n boolean isDeclared = !var.isTypeInferred();\n isLocallyInferred = (var != syntacticScope.getSlot(qualifiedName));\n if (isDeclared || isLocallyInferred) {\n propertyType = varType;\n }\n }\n }\n if (propertyType == null && objType != null) {\n JSType foundType = objType.findPropertyType(propName);\n if (foundType != null) {\n propertyType = foundType;\n }\n }\n if ((propertyType == null || propertyType.isUnknownType()) && qualifiedName != null) {\n // If we find this node in the registry, then we can infer its type.\nObjectType regType = ObjectType.cast(registry.getType(qualifiedName));\n if (regType != null) {\n propertyType = regType.getConstructor();\n }\n }\n if (propertyType == null) {\n return getNativeType(UNKNOWN_TYPE);\n } else if (propertyType.equals(unknownType) && isLocallyInferred) {\n return getNativeType(CHECKED_UNKNOWN_TYPE);\n } else {\n return propertyType;\n }\n }",
"public PropertyDefDto getDto();",
"protected abstract String getFactPropertyType(Object property);",
"@Override\n public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }",
"public BeanDefinitionHolder getDecoratedDefinition()\n/* */ {\n/* 221 */ return this.decoratedDefinition;\n/* */ }",
"PropertyRealization createPropertyRealization();",
"public interface IPropertyInfo extends IAttributedFeatureInfo, IIntrinsicTypeReference\n{\n /**\n * @return true if the property is readable given the visibility constraint passed in,\n * false otherwise.\n */\n public boolean isReadable();\n\n /**\n * @return True if the property is writable given the visibility constraint passed in,\n * false otherwise.\n */\n public boolean isWritable();\n\n /**\n * @param whosAskin The type querying the property writability. For example, passing in the type the property is on will\n * allow properties that have private access in the setter to be written to. Passing in an unrelated type will only\n * allow properties that are public to be written to.\n *\n * @return True if the property is writable given the visibility constraint passed in,\n * false otherwise.\n */\n public boolean isWritable( IType whosAskin );\n\n /**\n * @return the PropertyAccessor (for getting and setting) this property.\n */\n public IPropertyAccessor getAccessor();\n\n public IPresentationInfo getPresentationInfo();\n}",
"@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl) super.getDescriptor();\n }",
"@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl) super.getDescriptor();\n }",
"public interface IComponentDescriptor {\r\n\r\n\t/**\r\n\t * Returns the component type.\r\n\t *\r\n\t * @return class of the described component\r\n\t */\r\n\tClass<?> getComponentType();\r\n\r\n//\t/**\r\n//\t * Returns all properties descriptions (meta-properties) of this component.\r\n//\t *\r\n//\t * @return list of meta properties\r\n//\t */\r\n//\tCollection<MetaProperty> getProperties();\r\n\r\n//\t/**\r\n//\t * Returns required properties descriptions (meta-properties) of this component. These properties are required to\r\n//\t * proper component initialization.\r\n//\t *\r\n//\t * @return list of required meta properties\r\n//\t */\r\n//\tCollection<MetaProperty> getRequriedProperties();\r\n\r\n//\t/**\r\n//\t * Returns optional properties descriptions (meta-properties) of this component. These properties are not required\r\n//\t * for proper component initialization.\r\n//\t *\r\n//\t * @return list of optional meta properties\r\n//\t */\r\n//\tCollection<MetaProperty> getOptionalProperties();\r\n\r\n\t/**\r\n\t * Returns list containing sequences of parameters types of available constructors.\r\n\t *\r\n\t * @return list of available constructor parameters\r\n\t */\r\n\tList<List<Class<?>>> getConstructorParametersTypes();\r\n\r\n\t/**\r\n\t * Checks if described component contains a property with a given name.\r\n\t *\r\n\t * @param name\r\n\t * name of a property\r\n\t * @return true if this described component contains a needed property\r\n\t */\r\n\tboolean containsProperty(String name);\r\n\r\n}",
"@Override\n\tpublic DescriptorImpl getDescriptor() {\n\t\treturn (DescriptorImpl) super.getDescriptor();\n\t}",
"public DatatypeProp getProperty() {\n return property;\n }",
"public final Class getDescriptorClass() {\n\treturn descriptorClass;\n }",
"public EntityDescriptor getDescriptor() {\n return descriptor;\n }",
"public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }",
"@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl)super.getDescriptor();\n }",
"@Override\n public DescriptorImpl getDescriptor() {\n return (DescriptorImpl)super.getDescriptor();\n }",
"protected PropertyChangeSupport getPropertyChange() {\r\n\t\tif (propertyChange == null) {\r\n\t\t\tpropertyChange = new PropertyChangeSupport(this);\r\n\t\t}\r\n\t\t;\r\n\t\treturn propertyChange;\r\n\t}",
"public Integer getPropertyClass()\r\n\t{\r\n\t\treturn propertyClass;\r\n\t}",
"public PropertyDescriptor[] getPropertyDescriptors () {\n return desc;\n }",
"Property createProperty();",
"Object getPropertytrue();",
"public List<IPropertyDescriptor<T>> getProperties();",
"@Override\n public Object getProperty(String property) {\n for (Map.Entry<String, RequiredFunctionalExtension> requiredBehaviorEntry : myRequiredBehaviorById.entrySet()) {\n Object prop = requiredBehaviorEntry.getValue().getProperty(property);\n if (prop != null) {\n return prop;\n }\n }\n return null;\n }",
"public interface Property extends Assignable\n{\n\t/**\n\t * Property name\n\t */\n\tString getName();\n\n\t/**\n\t * Type.\n\t * \n\t * If this is a getter, the returned value is the getter's return type.\n\t * If this is a setter, the returned value is the type of the input argument of the setter.\n\t */\n\tType getType();\n\n /**\n * [InstanceType]\n *\n * @return null if the instance type metadata is not available or if the\n * instance type is not specified.\n */\n Type getInstanceType();\n\n\t/**\n\t * Is this read only?\n\t */\n\tboolean readOnly();\n\n /**\n\t *\n\t */\n\tboolean hasPublic();\n\n // metadata\n\n\t/**\n\t * [Inspectable]\n\t */\n\tInspectable getInspectable();\n\n\t/**\n\t * [CollapseWhiteSpace]\n\t */\n\tboolean collapseWhiteSpace();\n\n /**\n * [RichTextContent]\n */\n boolean richTextContent();\n\n\t/**\n\t * [Deprecated]\n\t */\n\tDeprecated getDeprecated();\n\n\t/**\n\t * [ChangeEvent]\n\t */\n\tboolean hasChangeEvent(String name);\n\n\n\t/**\n\t * [PercentProxy]\n\t */\n\tString getPercentProxy();\n}",
"public String getPropertyWatcherClass()\n {\n return propertyWatcherClass;\n }",
"public final Properties getPropertiesObject()\n {\n return fProp;\n }",
"protected java.beans.PropertyChangeSupport getPropertyChange() {\r\n\tif (propertyChange == null) {\r\n\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\r\n\t};\r\n\treturn propertyChange;\r\n}",
"PropertyReference createPropertyReference();",
"public int getPropertyType() {\n\t\treturn 0;\n\t}",
"public Object getDescriptor()\n {\n return protocolProvider;\n }",
"PropertyType createPropertyType();",
"protected ParameterCheckerDescriptor _getParameterCheckerDescriptorInstance()\n {\n return new ParameterCheckerDescriptor();\n }",
"public Class<?> getType(ELContext context, Object base, Object property) {\n/* 282 */ context.setPropertyResolved(false);\n/* */ \n/* */ \n/* 285 */ for (int i = 0; i < this.size; i++) {\n/* 286 */ Class<?> type = this.elResolvers[i].getType(context, base, property);\n/* 287 */ if (context.isPropertyResolved()) {\n/* 288 */ return type;\n/* */ }\n/* */ } \n/* 291 */ return null;\n/* */ }",
"message.Figure.FigureData.FigureProperty getProperty();",
"protected java.beans.PropertyChangeSupport getPropertyChange() {\n\t\tif (propertyChange == null) {\n\t\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\n\t\t};\n\t\treturn propertyChange;\n\t}",
"public interface IBeanWrapper {\r\n\r\n\tIBeanPropertyWrapper getBeanPropertyWrapperById(Object id) throws NoSuchFieldException;\r\n\t\r\n\tIBeanPropertyWrapper getBeanPropertyWrapperByName(String propertyName) throws NoSuchFieldException;\r\n\r\n\tvoid setProperty(String propertyName, Object value)\r\n\t\t\tthrows NoSuchFieldException, NoSuchMethodException,\r\n\t\t\t\t\tInvocationTargetException, IllegalAccessException;\r\n\t\r\n\tObject getProperty(String propertyName)\r\n\t\t\tthrows NoSuchFieldException, NoSuchMethodException,\r\n\t\t\t\t\tInvocationTargetException, IllegalAccessException;\r\n\r\n\tString getPropertyAsString(String propertyName)\r\n\t\t\tthrows NoSuchFieldException, NoSuchMethodException,\r\n\t\t\t\t\tInvocationTargetException, IllegalAccessException;\r\n\r\n\tClass getPropertyType(String propertyName)\r\n\t\t\tthrows NoSuchFieldException, NoSuchMethodException,\r\n\t\t\t\t\tInvocationTargetException, IllegalAccessException;\r\n\r\n\tIBeanPropertyWrapper[] getBeanPropertyWrappers(IObjectFilter filter);\r\n\t\r\n\tIBeanPropertyWrapper[] getBeanPropertyWrappers();\r\n\r\n\tIBeanPropertyWrapper[] getPreferredBeanPropertyWrappers();\r\n\r\n\tString[] getPropertyNames();\r\n\r\n\tString[] getPreferredPropertyNames();\r\n\r\n}",
"EStructuralFeature getBoundProperty();",
"private PropertyDescriptor findPropertyDesc(Class<?> type,String propertyName){\n\t\tString key=(type.getName()+PropertyAccessor.NESTED_PROPERTY_SEPARATOR+propertyName);\n\t\tif(propertyDescCache.containsKey(key)){\n\t\t\treturn propertyDescCache.get(key);\n\t\t}\n\t return doFindPropertyDesc(type.getName(), type, propertyName);\n\t}",
"Object getOtherprops();",
"default Component getQuickPropertiesComponent()\r\n {\r\n return null;\r\n }",
"public IDefinition resolveProperty(IClassDefinition classDefinition, String propertyName)\n {\n Iterator<IClassDefinition> classIterator = classDefinition.classIterator(this, true);\n while (classIterator.hasNext())\n {\n IClassDefinition c = classIterator.next();\n \n ASScope classScope = ((ClassDefinition)c).getContainedScope();\n IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(propertyName);\n if (definitionSet != null)\n {\n IDefinition winner = null;\n \n int n = definitionSet.getSize();\n for (int i = 0; i < n; i++)\n {\n IDefinition definition = definitionSet.getDefinition(i);\n \n // Look for vars and setters, but not getters.\n // Remember that getters and setters implement IVariableDefinition!\n if (definition instanceof IVariableDefinition &&\n !(definition instanceof IGetterDefinition))\n {\n // TODO Add namespace logic.\n // Can MXML set protected properties?\n // Can MXML set mx_internal properties if you've done\n // 'use namesapce mx_internal' in a <Script>?\n winner = definition;\n final INamespaceReference namespaceReference = definition.getNamespaceReference();\n final INamespaceDefinition thisNamespaceDef = namespaceReference.resolveNamespaceReference(this);\n final boolean isBindable = ((NamespaceDefinition)thisNamespaceDef).getAETNamespace().getName().equals(\n BindableHelper.bindableNamespaceDefinition.getAETNamespace().getName());\n // if we find a setter always take it, otherwise \n // keep looking for a setter\n if (winner instanceof ISetterDefinition && !isBindable)\n break;\n }\n }\n if (winner != null)\n {\n \tif (apiReportFile != null)\n \t\taddToAPIReport(classDefinition, winner);\n return winner;\n }\n }\n }\n \n return null;\n }",
"public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }",
"public PropertyDescriptor[] getPropertyDescriptors() {\n\tPropertyDescriptor[] pd = new PropertyDescriptor[3];\n\ttry {\n\t\tpd [0] = new PropertyDescriptor(\"name\", RateTypeAccessBean.class);\n\t\tpd [1] = new PropertyDescriptor(\"ratetype\", RateTypeAccessBean.class);\n\t\tpd [2] = new PropertyDescriptor(\"basecurrency\", RateTypeAccessBean.class, \"getBasecurrency\", null);\n\t\treturn pd;\n\t} catch (IntrospectionException ex) {\n\t\tex.printStackTrace(System.out);\n\t}\n\treturn null;\n}",
"@SuppressWarnings(\"unchecked\")\n \tprivate Object getLnfValueInternal(Class<? extends Control> controlClass, PropertyDescriptor property) {\n \t\tString lnfKey = generateLnfKey(controlClass, property);\n \t\tObject lnfValue = LnfManager.getLnf().getResource(lnfKey);\n \t\tif (lnfValue == null) {\n \t\t\tif (Control.class.isAssignableFrom(controlClass.getSuperclass())) {\n \t\t\t\tlnfValue = getLnfValueInternal((Class<? extends Control>) controlClass.getSuperclass(), property);\n \t\t\t}\n \t\t}\n \t\treturn lnfValue;\n \t}",
"public static Object referenceMacro_GetReferent_118_0(final ReferenceMacroContext _context) {\n return SModelOperations.getModelName(((SModel) _context.getVariable(\"model\"))) + \".EditorAspectDescriptorImpl\";\n }",
"public Property getProperty() {\n\treturn commonproperty;\r\n}",
"public interface ElPropertyValue extends ElPropertyDeploy {\r\n\r\n /**\r\n * Return the Id values for the given bean value.\r\n */\r\n public Object[] getAssocOneIdValues(Object bean);\r\n\r\n /**\r\n * Return the Id expression string.\r\n * <p>\r\n * Typically used to produce id = ? expression strings.\r\n * </p>\r\n */\r\n public String getAssocOneIdExpr(String prefix, String operator);\r\n\r\n /**\r\n * Return the logical id value expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInValueExpr(int size);\r\n \r\n /**\r\n * Return the logical id in expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInExpr(String prefix);\r\n \r\n /**\r\n * Return true if this is an ManyToOne or OneToOne associated bean property.\r\n */\r\n public boolean isAssocId();\r\n\r\n /**\r\n * Return true if any path of this path contains a Associated One or Many.\r\n */\r\n public boolean isAssocProperty();\r\n\r\n /**\r\n * Return true if the property is encrypted via Java.\r\n */\r\n public boolean isLocalEncrypted();\r\n \r\n /**\r\n * Return true if the property is encrypted in the DB.\r\n */\r\n public boolean isDbEncrypted();\r\n\r\n /**\r\n * Return the deploy order for the property.\r\n */\r\n public int getDeployOrder();\r\n \r\n /**\r\n * Return the default StringParser for the scalar property.\r\n */\r\n public StringParser getStringParser();\r\n\r\n /**\r\n * Return the default StringFormatter for the scalar property.\r\n */\r\n public StringFormatter getStringFormatter();\r\n\r\n /**\r\n * Return true if the last type is \"DateTime capable\" - can support\r\n * {@link #parseDateTime(long)}.\r\n */\r\n public boolean isDateTimeCapable();\r\n\r\n /**\r\n * Return the underlying JDBC type or 0 if this is not a scalar type.\r\n */\r\n public int getJdbcType();\r\n \r\n /**\r\n * For DateTime capable scalar types convert the long systemTimeMillis into\r\n * an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).\r\n */\r\n public Object parseDateTime(long systemTimeMillis);\r\n\r\n /**\r\n * Return the value from a given entity bean.\r\n */\r\n public Object elGetValue(Object bean);\r\n\r\n /**\r\n * Return the value ensuring objects prior to the top scalar property are\r\n * automatically populated.\r\n */\r\n public Object elGetReference(Object bean);\r\n\r\n /**\r\n * Set a value given a root level bean.\r\n * <p>\r\n * If populate then\r\n * </p>\r\n */\r\n public void elSetValue(Object bean, Object value, boolean populate, boolean reference);\r\n\r\n /**\r\n * Make the owning bean of this property a reference (as in not new/dirty).\r\n */\r\n public void elSetReference(Object bean);\r\n\r\n /**\r\n * Convert the value to the expected type.\r\n * <p>\r\n * Typically useful for converting strings to the appropriate number type\r\n * etc.\r\n * </p>\r\n */\r\n public Object elConvertType(Object value);\r\n}",
"interface PropertyInfo {}",
"public final String\r\n getDescriptor() {\r\n if (this.descriptorCache != null) return this.descriptorCache;\r\n return (this.descriptorCache = this.getDescriptor2());\r\n }",
"abstract ChildListPropertyDescriptor internalThenDeclarationsProperty();",
"@Override\n\tpublic IPropertyGetter getPropertyGetter() {\n\t\treturn null;\n\t}",
"private static PropertyDescriptor[] getPdescriptor() {\n PropertyDescriptor[] properties = new PropertyDescriptor[4];\n\n try {\n properties[PROPERTY_length] = new PropertyDescriptor(\"length\", org.geogurus.gas.objects.GeometryClassFieldBean.class, \"getLength\", \"setLength\"); // NOI18N\n properties[PROPERTY_name] = new PropertyDescriptor(\"name\", org.geogurus.gas.objects.GeometryClassFieldBean.class, \"getName\", \"setName\"); // NOI18N\n properties[PROPERTY_nullable] = new PropertyDescriptor(\"nullable\", org.geogurus.gas.objects.GeometryClassFieldBean.class, \"getNullable\", \"setNullable\"); // NOI18N\n properties[PROPERTY_type] = new PropertyDescriptor(\"type\", org.geogurus.gas.objects.GeometryClassFieldBean.class, \"getType\", \"setType\"); // NOI18N\n } catch (IntrospectionException e) {\n e.printStackTrace();\n }//GEN-HEADEREND:Properties\n\n // Here you can add code for customizing the properties array.\n\n return properties;\n }",
"public final PropertyDescriptor[] getPropertyDescriptors()\n {\n try{\n final PropertyDescriptor[] res={\n prop(\"Color\", \"Color to paint highlight\"),\n prop(\"Size\", \"size to paint highlight (pixels\"),\n };\n return res;\n }\n catch(Exception e)\n {\n MWC.Utilities.Errors.Trace.trace(e);\n return super.getPropertyDescriptors();\n }\n\n }",
"String get(String kind, String name, String property);",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"public String getJavaProperty() {\n return this.javaProperty;\n }",
"protected Object fetchBean()\n {\n if (isAttributeDefined(ATTR_REF))\n {\n return getContext().findVariable(getStringAttr(ATTR_REF));\n }\n\n else\n {\n BeanContext bc = FormBaseTag.getBuilderData(getContext())\n .getBeanContext();\n if (isAttributeDefined(ATTR_BEAN_CLASS))\n {\n Class<?> beanClass = FormBaseTag.convertToClass(getAttributes()\n .get(ATTR_BEAN_CLASS));\n return bc.getBean(beanClass);\n }\n else\n {\n return bc.getBean(getStringAttr(ATTR_BEAN_NAME));\n }\n }\n }",
"public PropertyFileHandle createPropertyHandleOfAnyType();",
"public abstract Object getValue(Context context) throws PropertyException;",
"public abstract List<PropertyType> getBuiltInProperties();",
"private WorkspacePatchProperties innerProperties() {\n return this.innerProperties;\n }",
"public Obj GetDescriptor() throws PDFNetException {\n/* 524 */ return Obj.__Create(GetDescriptor(this.a), this.b);\n/* */ }",
"public Class<?> getMethodOwner() {\n Class<?> wrapperByPrimitive = ReflectClassUtilKt.getWrapperByPrimitive(getJClass());\n return wrapperByPrimitive != null ? wrapperByPrimitive : getJClass();\n }",
"public static DispatchingProperties getInstance() {\r\n\t\t// if (handler == null) {\r\n\t\t// handler = new DispatchingProperties();\r\n\t\t// }\r\n\t\t// return handler;\r\n\t\treturn (DispatchingProperties) Properties.forClassName(Properties.DISPATCHING_PROPERTIES_HANDLER_CLASS);\r\n\t}",
"private static Class<?> getWrapperClass(Class<?> primitiveClass) {\n return WrapperClassGenerator.wrapperClassMap.get(primitiveClass.getName());\n }",
"public BeanDescriptor getBeanDescriptor() {\n return getBdescriptor();\n }",
"@Override\r\n public MetadataDescriptor getReferenceDescriptor() {\r\n if (isDirectEmbeddableCollection()) {\r\n return getEmbeddableAccessor().getDescriptor();\r\n } else {\r\n return super.getReferenceDescriptor();\r\n }\r\n }",
"Object getProperty(String name);",
"private PropertyDefinition getProperty(\n String property,\n String name,\n String description,\n String defaultValue,\n PropertyType type\n ) {\n return PropertyDefinition.builder(property)\n .name(name)\n .description(description)\n .defaultValue(defaultValue)\n .type(type)\n .category(Constants.CATEGORY)\n .subCategory(Constants.SUBCATEGORY)\n .index(propertyIndex++)\n .build();\n }",
"public ModuleDescriptor getDescriptor() {\n return descriptor;\n }",
"public Class<?> getCommonPropertyType(ELContext context, Object base) {\n/* 483 */ Class<?> commonPropertyType = null;\n/* 484 */ for (int i = 0; i < this.size; i++) {\n/* */ \n/* 486 */ Class<?> type = this.elResolvers[i].getCommonPropertyType(context, base);\n/* 487 */ if (type != null)\n/* */ {\n/* */ \n/* 490 */ if (commonPropertyType == null) {\n/* 491 */ commonPropertyType = type;\n/* 492 */ } else if (!commonPropertyType.isAssignableFrom(type)) {\n/* */ \n/* 494 */ if (type.isAssignableFrom(commonPropertyType)) {\n/* 495 */ commonPropertyType = type;\n/* */ } else {\n/* */ \n/* 498 */ return null;\n/* */ } \n/* */ } } \n/* 501 */ } return commonPropertyType;\n/* */ }",
"public static <T> BeanVerifier<T> forProperty(Class<T> type, PropertyDescriptor descriptor, ITypeFactory typeFactory)\n\t{\n\t\treturn new BeanVerifier<T>(type, descriptor, typeFactory);\n\t}",
"private PropertyEvaluator createEvaluator() {\n return helper.getStandardPropertyEvaluator();\n }",
"private static String getStringValueFromGetter(Object dto, PropertyDescriptor propertyDescriptor) {\n Method method = propertyDescriptor.getReadMethod();\n String value = \"\";\n\n try {\n value = (String) method.invoke(dto, new Object[]{});\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return value;\n }",
"private PropertyDescriptor locatePropertyDescriptor(Set<PropertyDescriptor> propertyDescriptors, PropertyDescriptor specDescriptor) {\n for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {\n if (propertyDescriptor.equals(specDescriptor)) {\n return propertyDescriptor;\n }\n }\n return specDescriptor;\n }",
"public boolean isProperty();",
"public Class<?> getPropertyType(String property, int typeConstrParamCount) {\n List<Method> methods = getSetterMethods(property);\n Class<?> result = null;\n\n for (Method method : methods) {\n Class<?> paramType = method.getParameterTypes()[0];\n\n if (!getConstructors(paramType, typeConstrParamCount).isEmpty()) {\n result = paramType;\n break;\n }\n }\n\n return result;\n }"
] | [
"0.61963177",
"0.60254854",
"0.5794402",
"0.5722748",
"0.5651864",
"0.5591935",
"0.5573587",
"0.5548992",
"0.5521717",
"0.5494136",
"0.5494136",
"0.54733235",
"0.54704756",
"0.5440892",
"0.5428297",
"0.5403326",
"0.540225",
"0.53843963",
"0.5370714",
"0.5343851",
"0.5332133",
"0.5332133",
"0.5331836",
"0.53317404",
"0.5329917",
"0.5302098",
"0.52973455",
"0.52632403",
"0.52564824",
"0.52564824",
"0.52414954",
"0.52197784",
"0.51933366",
"0.51758987",
"0.51540935",
"0.5153053",
"0.51302826",
"0.51302457",
"0.51183474",
"0.5107245",
"0.5082183",
"0.50646484",
"0.50514257",
"0.5046845",
"0.5038874",
"0.5028721",
"0.5028509",
"0.50249726",
"0.4992278",
"0.49840462",
"0.49764568",
"0.49654123",
"0.4954198",
"0.49211666",
"0.49206442",
"0.49188358",
"0.49159577",
"0.4909116",
"0.49088082",
"0.49000967",
"0.48926285",
"0.48807693",
"0.4861375",
"0.48610115",
"0.4857166",
"0.485529",
"0.4853333",
"0.48463106",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48332587",
"0.48324332",
"0.4831282",
"0.4829727",
"0.48246217",
"0.48201558",
"0.48118618",
"0.48100373",
"0.48090962",
"0.48053852",
"0.4795708",
"0.47883335",
"0.47878513",
"0.477885",
"0.477348",
"0.47721854",
"0.4771891",
"0.47694144",
"0.47620547",
"0.47595784",
"0.47472408",
"0.4738025"
] | 0.6189955 | 1 |
Overridable if retention strategy is parameterized | public void updateState(Map<String, String[]> parameters){
if(this instanceof ParameterizedStrategy){
((ParameterizedStrategy)this).updateStrategyParameters(parameters);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void trackRetention() {\n track(\"_retention\");\n }",
"public Integer getRetentionPeriod()\n {\n return retentionPeriod;\n }",
"public Retention getRetention() {\n return retention;\n }",
"public void setRetentionPolicy(String retentionPolicy) {\n this.retentionPolicy = retentionPolicy;\n }",
"public RetentionPolicy retentionPolicy() {\n return this.retentionPolicy;\n }",
"public RetentionPolicy retentionPolicy() {\n return this.retentionPolicy;\n }",
"@Override\r\n\tpublic RetentionManager getRetentionManager()\r\n\t\t\tthrows UnsupportedRepositoryOperationException, RepositoryException {\n\t\treturn null;\r\n\t}",
"public Logging withRetentionPolicy(RetentionPolicy retentionPolicy) {\n this.retentionPolicy = retentionPolicy;\n return this;\n }",
"public void setRetentionExpiryDateTime(long expires) {\n\t\t\n\t\t// Check if the retention date/time has changed\n\t\t\n\t\tif ( getRetentionExpiryDateTime() != expires) {\n\t\t\t\n\t\t\t// Update the retention date/time\n\t\t\t\n\t\t\tsuper.setRetentionExpiryDateTime(expires);\n\t\t\t\n\t\t\t// Queue a low priority state update\n\t\t\t\n\t\t\tqueueLowPriorityUpdate( UpdateRetentionExpire);\n\t\t}\n\t}",
"public void oneRuntimeRetention_OneSourceRetention(@ParamAnnoRuntime @ParamAnnoSource final int input) {\n }",
"public final void setRetentionExpiryDateTime(long expires) {\n\t m_retainUntil = expires;\n\t}",
"public TimeBasedRollingPolicy() {\r\n super();\r\n }",
"boolean hasRetentionPolicy();",
"public void setRetentionPeriod(int value)\n {\n // per https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutRetentionPolicy.html\n // as-of 2019-05-04\n switch (value)\n {\n case 1 :\n case 3 :\n case 5 :\n case 7 :\n case 14 :\n case 30 :\n case 60 :\n case 90 :\n case 120 :\n case 150 :\n case 180 :\n case 365 :\n case 400 :\n case 545 :\n case 731 :\n case 1827 :\n case 3653 :\n retentionPeriod = Integer.valueOf(value);\n break;\n default :\n throw new IllegalArgumentException(\"invalid retention period; see AWS API for allowed values\");\n }\n }",
"private MetadataCheckpointPolicy getNoOpCheckpointPolicy() {\n DurableLogConfig dlConfig = DurableLogConfig\n .builder()\n .with(DurableLogConfig.CHECKPOINT_COMMIT_COUNT, Integer.MAX_VALUE)\n .with(DurableLogConfig.CHECKPOINT_TOTAL_COMMIT_LENGTH, Long.MAX_VALUE)\n .build();\n\n return new MetadataCheckpointPolicy(dlConfig, Runnables.doNothing(), executorService());\n }",
"public void setRetentionFlag(String value) {\n setAttributeInternal(RETENTIONFLAG, value);\n }",
"public DefaultEventRecorderStrategy(RecorderStrategy strategy) {\r\n super(strategy.getStorage());\r\n this.strategy = strategy;\r\n start();\r\n }",
"public void parameterAnnotation_WithRuntimeRetention(@ParamAnnoRuntime final int input) {\n }",
"public void markFileRetentionPeriodCreate() throws JNCException {\n markLeafCreate(\"fileRetentionPeriod\");\n }",
"public void oneRuntimeRetention_OneClassRetention(@ParamAnnoRuntime @ParamAnnoClass final int input) {\n }",
"@Test\n public void expiry10m() {\n Cache<Integer, Integer> c = new Cache2kBuilder<Integer, Integer>() {}\n .expireAfterWrite(10, TimeUnit.MINUTES)\n /* ... set loader ... */\n .build();\n target.setCache(c);\n DefaultResiliencePolicy p = extractDefaultPolicy();\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getResilienceDuration());\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getMaxRetryInterval());\n assertEquals(TimeUnit.MINUTES.toMillis(1), p.getRetryInterval());\n }",
"public UnknownRetentionPolicyException(String retentionPolicyName, String databaseName) {\n super(\"Unknown retention policy \" + retentionPolicyName + \" on database \" + databaseName);\n }",
"Snapshot apply();",
"public Map<DHTKey, LruRetentionInfo> getCurrentRetentionMap() {\n retentionMap.cleanUp();\n return Collections.unmodifiableMap(retentionMap.asMap());\n }",
"public void markFileRetentionPeriodReplace() throws JNCException {\n markLeafReplace(\"fileRetentionPeriod\");\n }",
"int getDefaultAutoArchiveDuration();",
"public AllocationRetentionPriority(Long priorityLevel) {\n\t\tthis();\n\t\tsetPriorityLevel(priorityLevel);\n\t}",
"public void markFileRetentionPeriodDelete() throws JNCException {\n markLeafDelete(\"fileRetentionPeriod\");\n }",
"@Test\n public void testSetExclusiveProperties() {\n final DefaultScopeDescription metadata = new DefaultScopeDescription();\n metadata.setDataset(\"A dataset\");\n assertEquals(\"dataset\", \"A dataset\", metadata.getDataset());\n loggings.assertNoUnexpectedLog();\n\n metadata.setOther(\"Other value\");\n assertEquals(\"other\", \"Other value\", metadata.getOther());\n assertNull(\"dataset\", metadata.getDataset());\n loggings.assertNextLogContains(\"dataset\", \"other\");\n loggings.assertNoUnexpectedLog();\n\n metadata.setDataset(null); // Expected to be a no-op.\n assertEquals(\"other\", \"Other value\", metadata.getOther());\n assertNull(\"dataset\", metadata.getDataset());\n\n metadata.setOther(null);\n assertNull(\"other\", metadata.getOther());\n assertNull(\"dataset\", metadata.getDataset());\n }",
"protected void notificationOnExpiration() {\n }",
"public default boolean canBePermanent(){ return false; }",
"com.google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy getRetentionPolicy();",
"public interface JungleDataKeeper {\n void keepData(String identifier, int iteration, double biomass);\n}",
"public Integer softDeleteRetentionInDays() {\n return this.softDeleteRetentionInDays;\n }",
"void onAggregateRestored(AggregateHistory history) {\n this.eventCountAfterLastSnapshot = history.getEventCount();\n }",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"void mark(@Nonnegative int readLimit);",
"@Override\n Store apply(@Required Store store);",
"public void markFileRetentionPeriodMerge() throws JNCException {\n markLeafMerge(\"fileRetentionPeriod\");\n }",
"@Override\n protected Object freshBatch(Object reuse)\n {\n throw new NotImplementedException();\n }",
"public ReviewerStatisticsManagerImpl() {\n this(DEFAULT_NAMESPACE);\n }",
"protected final void getRetentionDetailsForState(DBDeviceContext dbCtx, FileState fstate)\n throws DBException {\n\n // If retention is enabled get the expiry date/time\n \n if ( dbCtx.hasRetentionPeriod()) {\n \n // Get the file retention expiry date/time\n \n RetentionDetails retDetails = dbCtx.getDBInterface().getFileRetentionDetails(-1, fstate.getFileId());\n if ( retDetails != null)\n fstate.setRetentionExpiryDateTime( retDetails.getEndTime());\n }\n }",
"public void setTRetentionPolicyInfo(TRetentionPolicyInfo info) {\n\n\t\tthis.retentionPolicyInfo = info;\n\t}",
"@Override\n public void setExpiration( Date arg0)\n {\n \n }",
"@Override\n public void preSave(BigDataStructureContainer learnedParameters, MemoryConfiguration memoryConfiguration) {\n }",
"@Override\n public void apply() {\n }",
"protected ClassifierImpl(StorableObject storable) {\n super(storable);\n }",
"public interface RawAnnotationSet<V> extends ReadableAnnotationSet<V> {\n\n /**\n * @see NindoCursor#begin()\n */\n void begin();\n\n /**\n * @see NindoCursor#finish()\n */\n void finish();\n\n /**\n * Content has been inserted into the document being annotated\n *\n * @param insertSize\n */\n void insert(int insertSize);\n\n String getInherited(String key);\n\n /**\n * Content has been removed from the document being annotated\n *\n * @param deleteSize\n */\n void delete(int deleteSize);\n\n /**\n */\n void skip(int skipSize);\n\n /**\n * @see ModifiableDocument#startAnnotation(String, String)\n */\n void startAnnotation(String key, V value);\n\n /**\n * @see ModifiableDocument#endAnnotation(String)\n */\n void endAnnotation(String key);\n\n /**\n * @return a live updated set of the known keys\n */\n ReadableStringSet knownKeysLive();\n\n public abstract class AnnotationEvent {\n final int index;\n final String key;\n\n private AnnotationEvent(int index, String key) {\n this.index = index;\n this.key = key;\n }\n\n abstract String getChangeKey();\n abstract String getChangeOldValue();\n abstract String getEndKey();\n }\n\n public final class AnnotationStartEvent extends AnnotationEvent {\n final String value;\n AnnotationStartEvent(int index, String key, String value) {\n super(index, key);\n// assert !Annotations.isLocal(key);\n this.value = value;\n }\n\n @Override\n String getChangeKey() {\n return key;\n }\n\n @Override\n String getChangeOldValue() {\n return value;\n }\n\n @Override\n String getEndKey() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"AnnotationStart \" + key + \"=\" + value + \" @\" + index;\n }\n }\n\n public final class AnnotationEndEvent extends AnnotationEvent {\n AnnotationEndEvent(int index, String key) {\n super(index, key);\n }\n\n\n @Override\n String getChangeKey() {\n return null;\n }\n\n @Override\n String getChangeOldValue() {\n return null;\n }\n\n @Override\n String getEndKey() {\n return key;\n }\n\n @Override\n public String toString() {\n return \"AnnotationEndEvent \" + key + \" @\" + index;\n }\n }\n\n}",
"public interface EvictionPolicy\n {\n /**\n * This method is called by the cache to indicate that an entry has\n * been touched.\n *\n * @param entry the Cache Entry that has been touched\n */\n public void entryTouched(OldOldCache.Entry entry);\n\n /**\n * This method is called by the cache when the cache requires the\n * eviction policy to evict entries.\n *\n * @param cMaximum the maximum number of units that should remain\n * in the cache when the eviction is complete\n */\n public void requestEviction(int cMaximum);\n }",
"@Override\n public Watermark getCurrentWatermark() {\n return new Watermark(currentMaxTimestamp - maxOutOfOrderness);\n }",
"public void unsetFileRetentionPeriodValue() throws JNCException {\n delete(\"file-retention-period\");\n }",
"public Integer getManualSnapshotRetentionPeriod() {\n return this.manualSnapshotRetentionPeriod;\n }",
"public final long getRetentionExpiryDateTime() {\n\t return m_retainUntil;\n\t}",
"interface CleanupStrategy extends Serializable {\n\n\t\t}",
"void setStatisticsHistorySize(int historySize);",
"public interface Cache<T> {\n\n /**\n * Put the object in the cache with the given <code>key</code>.\n * <p>\n * The object is stored for the default configured time, depending on the\n * cache implementation. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n void put(@NonNull String key, @NonNull T value);\n\n /**\n * Put the object in the cache with the given <code>key</code> for the\n * given <code>duration</code>.\n * <p>\n * The object is stored for the requested duration. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param duration The (not null) duration to store the object for.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for ever.\n * <p>\n * The object is stored and should never be removed. This should overrule configured default\n * expiry time for objects put in the cache. However, the object may still be evicted from\n * the cache, for instance for memory reasons.\n * <p>\n * This method calls Duration.ofMillis(Long.max()) and passes it to the put(key, value, Duration duration).\n * So this method does not persist eternally, but rather persists for a long time.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n default void putEternally(@NonNull final String key, @NonNull final T value) {\n put(key, value, Duration.ofMillis(Long.MAX_VALUE));\n }\n\n /**\n * Retrieve the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The value, or <code>null</code> if the object is not found.\n */\n T get(@NonNull String key);\n\n /**\n * Retrieve an optional for the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The <code>Optional</code> for the value.\n */\n default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }\n\n /**\n * Remove the value associate with the <code>key</code>.\n *\n * @param key The key to remove.\n */\n void remove(@NonNull String key);\n\n}",
"protected AccumulatorDecorator(Accumulator<V, R> decorated) {\n this.decorated = Objects.requireNonNull(decorated);\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public RewardStatisticsKeeper() {\n statistics = new RewardStatistics();\n }",
"public interface AggregationPolicy {\n\n /**\n * Method which decides how keys/values are aggregated.\n * @param key the key current the entry, must not be {@code null}.\n * @param currentValue the current value, or {@code null}.\n * @param newValue the new value, never {@code null}.\n * @return the target value to be used in the resulting property set, or null, to remove the property.\n */\n public String aggregate(String key, String currentValue, String newValue);\n\n /** Ignore overrides, only extend (additive). */\n public static final AggregationPolicy IGNORE_DUPLICATES = (k, v1, v2) -> v1 == null? v2 : v1;\n\n /** Combine multiple values into a comma separated list. */\n public static final AggregationPolicy COMBINE = (k, v1, v2) -> v1 != null && v2 != null ? v1 + ',' + v2: v2;\n\n /**\n * Interpret later keys as override (additive and override), replacing\n * the key loaded earlier/fromMap previous contained\n * {@link org.apache.tamaya.PropertyProvider}.\n */\n public static final AggregationPolicy OVERRIDE = (k, v1, v2) -> v2;\n\n /**\n * Throw an exception, when keys are not disjunctive (strictly\n * additive).\n */\n public static final AggregationPolicy EXCEPTION =\n (String key, String value, String newValue) -> {\n if(value!=null && newValue!=null && !value.equals(newValue)){\n throw new ConfigException(\"Conflicting values encountered key=\"+key+\", value=\"+value+\", newValue=\"+newValue);\n }\n return newValue;\n };\n}",
"public void setLimitTimestamp (long timestamp);",
"@Override\n public void applyDefaults(DynamicSkill skill, String prefix) { }",
"public void setDocumentCount(Integer arg0) {\n \n }",
"public GeneralizedEpisodeCounterWithExpiry()\n {\n }",
"public void setRetentionMFlag(String value) {\n setAttributeInternal(RETENTIONMFLAG, value);\n }",
"private static InternalCacheConfig defaultTimestampsCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Time.forever();\n cacheConfig.objectCount = -1;\n return cacheConfig;\n }",
"public interface IRecommender {\n\n /**\n * Generate an set of user profiles that are recommended to be followed by a user profile.\n *\n * @param profileId unique identifier of the user profile.\n * @param influencers map of influencer user profiles and those that follow them.\n * @param followers map of follower user profiles and the influencers they follow.\n * @param profiles list of all user profiles in the network.\n * @param numRecs number of user profiles to recommend.\n * @param threshold threshold for the number of followers a user profile needs to have to be\n * considered an influencer.\n * @param recs current set of recommended user profiles.\n * @return unique set of user profiles to follow.\n */\n Set<Integer> recommend(Integer profileId, Map<Integer, Set<Integer>> influencers,\n Map<Integer, Set<Integer>> followers, List<Profile> profiles, Integer numRecs,\n Integer threshold, Set<Integer> recs);\n\n}",
"public TimeBasedRollingPolicy(String fileNamePattern) {\r\n super(fileNamePattern);\r\n }",
"com.google.cloud.gkebackup.v1.BackupPlan.RetentionPolicyOrBuilder getRetentionPolicyOrBuilder();",
"public void addFileRetentionPeriod() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"file-retention-period\",\n null,\n childrenNames());\n }",
"public interface Counter {\n \n \n public int getCount();\n}",
"public interface FeedBackRepositoryCustom extends JpaRepository<FeedBack, Long> {\n\n}",
"@Override\n\tpublic void savePruneSetting(PruneSetting pruneSetting) throws Exception {\n\n\t}",
"Affectation createAffectation();",
"void setLastAccessDate();",
"public ScopeRenewalAwareWrapper (@Nullable final DATATYPE aObj)\n {\n super (aObj);\n }",
"@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneClassRetention() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneClassRetention\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }",
"@Override\npublic void retainAll(Collection<Integer> collection) {\n\t\n}",
"@Override\n public void afterPropertiesSet() throws Exception {\n GuavaCacheMetrics.monitor(\n registry,\n cache,\n \"serialLookupCache\",\n Collections.singleton(Tag.of(StoreMetrics.TAG_STORE_KEY, StoreMetrics.TAG_STORE_VALUE)));\n }",
"@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneSourceRetention() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneSourceRetention\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }",
"@Override\r\n\tpublic Long count(int age) {\n\t\treturn null;\r\n\t}",
"int getProtectedPodCount();",
"@SuppressWarnings(\"unused\")\n@Repository\n@JaversSpringDataAuditable\npublic interface ReservoirCapacityRepository extends JpaRepository<ReservoirCapacity, Long> {\n\n}",
"final boolean isDateRollEnforced() {\n return this.dateRollEnforced;\n }",
"public Saver saveWithoutBackup() {\n return new AugmentedSaver() {\n @Override\n protected void handleSave(Iterable<?> entities) {\n checkProhibitedAnnotations(entities, VirtualEntity.class);\n }\n };\n }",
"@Override\n\tpublic long getLastAccessedTime() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long getLastAccessedTime() {\n\t\treturn 0;\n\t}",
"@Override\n public void perish() {\n \n }",
"public interface BatchStatistics extends Batch {\n /**\n * <p>\n * The number of remaining batch execution jobs.\n * This does include failed batch execution jobs and\n * batch execution jobs which still have to be created by the seed job.\n * </p>\n *\n * <p>\n * See\n * {@link #getTotalJobs()} for the number of all batch execution jobs,\n * {@link #getCompletedJobs()} for the number of completed batch execution jobs and\n * {@link #getFailedJobs()} for the number of failed batch execution jobs.\n * </p>\n *\n * @return the number of remaining batch execution jobs\n */\n int getRemainingJobs();\n\n /**\n * <p>\n * The number of completed batch execution jobs.\n * This does include aborted/deleted batch execution jobs.\n * </p>\n *\n * <p>\n * See\n * {@link #getTotalJobs()} for the number of all batch execution jobs,\n * {@link #getRemainingJobs()} ()} for the number of remaining batch execution jobs and\n * {@link #getFailedJobs()} for the number of failed batch execution jobs.\n * </p>\n *\n * @return the number of completed batch execution jobs\n */\n int getCompletedJobs();\n\n /**\n * <p>\n * The number of failed batch execution jobs.\n * This does not include aborted or deleted batch execution jobs.\n * </p>\n *\n * <p>\n * See\n * {@link #getTotalJobs()} for the number of all batch execution jobs,\n * {@link #getRemainingJobs()} ()} for the number of remaining batch execution jobs and\n * {@link #getCompletedJobs()} ()} for the number of completed batch execution jobs.\n * </p>\n *\n * @return the number of failed batch execution jobs\n */\n int getFailedJobs();\n\n}",
"public LogProfileProperties withRetentionPolicy(RetentionPolicy retentionPolicy) {\n this.retentionPolicy = retentionPolicy;\n return this;\n }",
"Snapshot apply(Context context);",
"AgentPolicyBuilder setMaxCacheAgeMs(long maxCacheAgeMs);",
"public interface BaseRedisLockAspect {\n /**\n * 分布式事务成功后,需要在redis缓存当前标识\n * 用于三方系统间单据处理标记\n * @param redisKey\n * @param redisValue\n * @param timeOut\n * @param timeUnit\n */\n public default void checkedRedisLockCache(String redisKey, String redisValue,long timeOut,TimeUnit timeUnit){};\n\n\n /**\n * 设置reids 缓存过期时间\n * @param redisKey\n * @param redisLockCheckedTimeOut\n * @param milliseconds\n */\n public default void setRedisLockCache(String redisKey, long redisLockCheckedTimeOut, TimeUnit milliseconds){};\n\n /**\n * 更新reids 缓存过期时间\n * @param redisKey\n */\n public default void updatedRedisLockCache(String redisKey){};\n\n /**\n * 调用返回结果处理,如接口返回错误代码处理\n * @param result\n */\n public default void bizResultProcessor(Object result){};\n\n}",
"@Override\r\n\tpublic void visit(InstanceLimitSetterNode instanceLimitSetterNode) {\n\t\tanalyzeExpression(instanceLimitSetterNode.getInstanceLimit());\r\n\t}",
"protected AbstractDistribution(int size) {\n\t\tthis.size = size;\n\t}",
"@Override\n public boolean use(CanTakeItem o){\n return false; \n }",
"public BusinessObjectFormat updateBusinessObjectFormatRetentionInformation(BusinessObjectFormatKey businessObjectFormatKey,\n BusinessObjectFormatRetentionInformationUpdateRequest businessObjectFormatRetentionInformationUpdateRequest);",
"@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_DefaultValues() {\n // Use the default values\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }",
"@Override\n\t\t\tpublic void onTrackLimitationNotice(int arg0) {\n\n\t\t\t}",
"public interface DataManagerInterface {\n Observable saveData(List<Vacancy> vacancies);\n\n Observable overwriteData(List<Vacancy> vacancies, int totalItemCount);\n}",
"@Override\n public void onTrackLimitationNotice(int arg0) {\n }"
] | [
"0.64734757",
"0.58462393",
"0.5727814",
"0.56283355",
"0.5627045",
"0.5627045",
"0.5349921",
"0.52925223",
"0.5151037",
"0.51500726",
"0.50653285",
"0.5013327",
"0.49793172",
"0.49264416",
"0.4800356",
"0.4755118",
"0.46884927",
"0.46848577",
"0.46834266",
"0.46742728",
"0.46574396",
"0.46397156",
"0.4571966",
"0.45568097",
"0.45560357",
"0.45363334",
"0.45310104",
"0.45152354",
"0.4507001",
"0.4485537",
"0.4470479",
"0.44658762",
"0.44229314",
"0.44222075",
"0.4418102",
"0.44127944",
"0.44094586",
"0.4386299",
"0.43803808",
"0.4343151",
"0.4342489",
"0.43378484",
"0.43310577",
"0.43217576",
"0.43152246",
"0.43109322",
"0.4302793",
"0.42961776",
"0.4277667",
"0.42771962",
"0.42664507",
"0.42650905",
"0.4264192",
"0.4263615",
"0.42629522",
"0.4260731",
"0.42350638",
"0.42346403",
"0.42287624",
"0.42279392",
"0.42165232",
"0.42119303",
"0.42087188",
"0.42023724",
"0.41945893",
"0.41908836",
"0.41876826",
"0.41864932",
"0.41834247",
"0.4172029",
"0.41495225",
"0.4149045",
"0.4126997",
"0.4126623",
"0.41259402",
"0.41228804",
"0.41199693",
"0.41142717",
"0.4113454",
"0.41114244",
"0.41094452",
"0.4107936",
"0.41079146",
"0.4103869",
"0.4101145",
"0.40987128",
"0.40987128",
"0.40944067",
"0.4092113",
"0.4089381",
"0.40865052",
"0.4085222",
"0.40726715",
"0.406996",
"0.40649974",
"0.40635645",
"0.40633696",
"0.4056052",
"0.4051888",
"0.40496457",
"0.40473616"
] | 0.0 | -1 |
Overridable if retention strategy is a build deleted listener | public void onBuildDeleted(AbstractBuild build, GlobalBuildStatsPluginSaver pluginSaver) {
if(this instanceof BuildDeletedListener){
((BuildDeletedListener)this).buildDeleted(build, pluginSaver);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onDeleted(final AbstractBuild<?, ?> build) {\n\n final AbstractProject<?, ?> project = build.getProject();\n final PermalinkStorage storage = project.getProperty(PermalinkStorage.class);\n\n if (storage == null) return;\n\n storage.deleteAliases(build);\n try {\n\n project.save();\n } catch (final IOException ex) {\n\n final String msg = \"Unable to save project after deleting dangling aliases for job \" + build.getDisplayName();\n LOGGER.log(Level.SEVERE, msg, ex);\n }\n }",
"@Override\n public void onDeletionNotice(StatusDeletionNotice arg0) {\n }",
"@Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\n\r\n }",
"@Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\n\r\n }",
"@Override\n\t\tpublic void onDeletionNotice(StatusDeletionNotice arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\tpublic void onDeletionNotice(StatusDeletionNotice arg0) {\n\n\t\t\t}",
"@Override\n\t\tpublic void onDeletionNotice(long arg0, long arg1) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void onDeletionNotice(StatusDeletionNotice arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onDeletionNotice(StatusDeletionNotice arg0) \n\t{\n\t}",
"public void onDeletionNotice(StatusDeletionNotice arg0) { }",
"public void trackRetention() {\n track(\"_retention\");\n }",
"@Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }",
"@Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }",
"@Override\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }",
"@Override\n \t\t\t\tpublic boolean isDeleted() {\n \t\t\t\t\treturn false;\n \t\t\t\t}",
"@Override\r\n\tpublic void onDelete() {\n\t\tsuper.onDelete();\r\n\t}",
"public void setDeleted();",
"@Override\n protected void onDeletedMessages(Context context, int total) {\n Log.i(TAG, \"Received deleted messages notification\");\n }",
"@Override\n\t\tpublic void onDeletionNotice(\n\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t}",
"@Override\n public void delete(ClientAuditTrailHolder oldObj_) throws Exception\n {\n\n }",
"@Override\n\t\t\tpublic void onDeletionNotice(\n\t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n\t\t\t}",
"public void MarkForDeletion();",
"@Deprecated\n\t@Override\n\tpublic void onDelete()\n\t{\n\t}",
"@Deprecated\n\t@Override\n\tpublic void onDelete()\n\t{\n\t}",
"public void onDelete() {\n }",
"void onReportDeleted(Report report);",
"@Override\n public void delete() {\n }",
"@Override\n\tprotected void onDeletedMessages(Context context, int total) {\n\t}",
"@Override\n public Event delete(Ec2LaunchConfiguration oldResource) {\n return null;\n }",
"public void markFileRetentionPeriodDelete() throws JNCException {\n markLeafDelete(\"fileRetentionPeriod\");\n }",
"@Override\n public boolean prebuild(AbstractBuild<?, ?> build,\n BuildListener listener) {\n boolean success = false;\n FilePath workspace = build.getWorkspace();\n\n if (workspace == null) {\n listener.getLogger()\n .println(\"Invalid workspace. Cannot continue.\");\n return false;\n }\n\n DeleteReportsFromWorkspace deleter = new DeleteReportsFromWorkspace();\n\n try {\n success = workspace.act(deleter);\n } catch (IOException | InterruptedException ex) {\n log.log(SEVERE, \"Cleanup crew missing!\", ex);\n listener.getLogger()\n .println(ex.getMessage());\n }\n\n if (!success) {\n listener.getLogger()\n .println(\"Failed to cleanup workspace reports.\");\n build.setResult(FAILURE);\n }\n return success;\n }",
"@Override\n public boolean mightHaveBeenApplicableToDeletedSaveable(Saveable saveable, String pathRelativeToRoot, boolean wasDirectory) {\n return false;\n }",
"public Deleter deleteWithoutBackup() {\n return new AugmentedDeleter() {\n @Override\n protected void handleDeletion(Iterable<Key<?>> keys) {\n checkProhibitedAnnotations(keys, VirtualEntity.class);\n }\n };\n }",
"@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }",
"public boolean isDeleted();",
"public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n }",
"@Override\n public void deletedResource( ResourceEvent event )\n {\n\n }",
"public void onAllAnnotationsRemoved() {\n/* 441 */ if (!this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ \n/* */ try {\n/* 446 */ JSONObject jsonObj = new JSONObject();\n/* 447 */ if (this.mContext != null) {\n/* 448 */ String strRemoveAnnotations = this.mContext.getResources().getString(R.string.undo_redo_annots_remove);\n/* 449 */ jsonObj.put(\"Action\", strRemoveAnnotations);\n/* */ } \n/* 451 */ jsonObj.put(\"Action event\", \"remove_all_annotations\");\n/* */ \n/* 453 */ if (Utils.isNullOrEmpty(jsonObj.toString())) {\n/* 454 */ AnalyticsHandlerAdapter.getInstance().sendException(new Exception(\"takeUndoSnapshot with an empty string\"));\n/* */ }\n/* */ \n/* 457 */ takeUndoSnapshot(jsonObj.toString());\n/* 458 */ if (this.mToolManager.getAnnotManager() != null) {\n/* 459 */ this.mToolManager.getAnnotManager().onLocalChange(\"delete\");\n/* */ }\n/* 461 */ if (sDebug)\n/* 462 */ Log.d(TAG, \"snapshot: \" + jsonObj.toString()); \n/* 463 */ } catch (Exception e) {\n/* 464 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }",
"public void deleteListener(ConfigProperties cprop){\n\t\tears.remove(cprop.getProperty(\"PROJ.id\"));\n\t\tjlog.info(\"Delete Listener \"+cprop.getProperty(\"PROJ.id\"));\n\t}",
"@Override\n public void onDeleted(Context context, int[] appWidgetIds) {\n }",
"@Override\n\t\tpublic void delete() {\n\n\t\t}",
"private MetadataCheckpointPolicy getNoOpCheckpointPolicy() {\n DurableLogConfig dlConfig = DurableLogConfig\n .builder()\n .with(DurableLogConfig.CHECKPOINT_COMMIT_COUNT, Integer.MAX_VALUE)\n .with(DurableLogConfig.CHECKPOINT_TOTAL_COMMIT_LENGTH, Long.MAX_VALUE)\n .build();\n\n return new MetadataCheckpointPolicy(dlConfig, Runnables.doNothing(), executorService());\n }",
"void onDelete();",
"@Override\n protected void onCleared() {\n }",
"private DeleteNotification(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }",
"@Override\n\tpublic void delete() {\n\n\t}",
"@Override\n public void receive(SubscriptionDeletion event) {\n logger.info(\"###Received subscription deletion event with id:\" + event.getSubscription().getId());\n }",
"void markArgumentAsDeleted(UUID argumentId);",
"@Override\n\tpublic void delete() {\n\t\t\n\t}",
"@Override\n\tpublic void delete() {\n\t\t\n\t}",
"@Override\n public void delete()\n {\n }",
"public boolean isDeleted() {\r\n\treturn isDeleted;\r\n}",
"public void tagDeleted(TagEvent event) {\n deletedEvent = event;\n }",
"void onAggregateRestored(AggregateHistory history) {\n this.eventCountAfterLastSnapshot = history.getEventCount();\n }",
"@Override\n\tpublic boolean preDelete() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic int deleteTurnover(Turnover turnover) {\n\t\treturn 0;\n\t}",
"@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }",
"public void onDeletionNotice(\n \t\t\t\t\tStatusDeletionNotice statusDeletionNotice) {\n \t\t\t}",
"public void setDeleted(boolean deleted);",
"@Override\n\tpublic void onDeletionNotice(long directMessageId, long userId) {\n\n\t}",
"@Override\r\n\tpublic void delete() {\n\r\n\t}",
"public void delete() {\n\t\tdeleted = true;\n\t}",
"@Override\n public boolean delete()\n {\n return false;\n }",
"@DELETE\n public void delete() {\n }",
"@Override\n public void onDestroy(boolean isChangingConfiguration) {\n\n }",
"public int deleteExpiredVersions() {\n // Get session and begin transaction\n Session session = DBHelper.getSession();\n Transaction transaction = session.beginTransaction();\n\n // Query for the document\n Query query = session.getNamedQuery(Version.DELETE_WITH_DELETION_DATE_BEFORE_QUERY);\n query.setParameter(Version.DELETE_WITH_DELETION_DATE_BEFORE_QUERY_PARAM, LocalDate.now());\n int deletionCount = query.executeUpdate();\n\n // Commit and close\n transaction.commit();\n session.close();\n\n logger.info(\"Deleted \" + deletionCount + \" versions past their retention date!\");\n return deletionCount;\n }",
"@Override\n\tpublic void delete(Long arg0) {\n\n\t}",
"@Override\n\tpublic void delete(Long arg0) {\n\n\t}",
"@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"no goin\");\n\t\t\n\t}",
"private void checkDeleteable() {\n \t\tboolean oldIsDeleteable = isDeleteable;\n \t\tisDeleteable = isDeleteEnabled();\n \t\tif (oldIsDeleteable != isDeleteable) {\n \t\t\tfireEnablementChanged(DELETE);\n \t\t}\n \t}",
"@Override\n public void removeListener(InvalidationListener listener) {\n }",
"@Override\n\tpublic void delete(Long arg0) {\n\t\t\n\t}",
"@Override\n public void onTenantDelete(int i) {\n }",
"public void markForDeletion() {\n\t\tthis.mustBeDeleted = true;\n\t}",
"public final synchronized void setDeleteOnStore() {\n\t\tif ( hasDeleteOnStore() == false)\n\t\t\tsetFlag(DeleteOnStore, true);\n\t}",
"@Override\r\n\tpublic void delete(Long arg0) {\n\t\t\r\n\t}",
"@ApiModelProperty(value = \"True if campaign/flow has been archived\")\r\n public Boolean isDeleted() {\r\n return deleted;\r\n }",
"@Override\n\tpublic void removeGraphChangeListener(GraphChangeListener<N, ET> listener)\n\t{\n\t\tgcs.removeGraphChangeListener(listener);\n\t}",
"@Override\n public void validateOnDelete(Object object) {\n }",
"public void beforeDeleteNode(NodeRef deleted) {\n\t\t\n logger.debug(\"[FolderQuota] - beforeDeleteNode\");\n \n NodeRef quotaParent = usage.getParentFolderWithQuota(deleted);\n \n \tif(quotaParent != null)\n \t{\n \t\tLong size = usage.getChangeSize(deleted);\n \t\tupdateSize(quotaParent, size * -1);\n\t\t\t//queue.enqueueEvent(quotaParent, size * -1);\n \t}\t\n\t}",
"@Exclude\n public abstract void delete();",
"@Override\n\tpublic void delete(Audit entity) {\n\t\t\n\t}",
"@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }",
"@Override\r\n\tpublic void onChannelPersonalDeleteNotify(AirChannel ch)\r\n\t{\n\t\tif (ch != null)\r\n\t\t{\r\n\t\t\t// AirSessionControl.getInstance().SessionChannelOut(ch.getId());\r\n\t\t\tAirSession session = AirtalkeeSessionManager.getInstance().SessionMatch(ch.getCreator());\r\n\t\t\tif (session != null)\r\n\t\t\t{\r\n\t\t\t\tsession.setVisible(true);\r\n\r\n\t\t\t\tString tip = String.format(AirServices.getInstance().getString(R.string.talk_channel_tip_delete), ch.getDisplayName());\r\n\t\t\t\tAirtalkeeMessage.getInstance().MessageSystemGenerate(session, tip, true);\r\n\t\t\t}\r\n\t\t\tif (channelListener != null)\r\n\t\t\t{\r\n\t\t\t\tchannelListener.onChannelPersonalDeleteNotify(ch);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t\tprotected void _delete() {\n\t\t\toldValue = 0;\n\t\t\tnewValue = 0;\n\t\t}",
"@Override\n public void delete() {\n\n\n }",
"@Override\n public void markShardCopyAsStaleIfNeeded(ShardId shardId, String allocationId, long primaryTerm, ActionListener<Void> listener) {\n listener.onResponse(null);\n }",
"@Override\n\tpublic void doDelete() {\n\t\tLOG.info(\"deleting agent\");\n\t\tsuper.doDelete();\n\t}",
"public interface Deleter {\n\n public void OnDeletion(String message);\n}",
"@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}",
"public boolean getDeleted() {\n return deleted;\n }",
"public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }",
"public void onDelete(TimelineModificationEvent e) {\n\t\tevent = e.getTimelineEvent();\n\t}",
"void onTaskDeleted() {\n mNavigationProvider.finishActivity();\n }",
"@Override\n\tpublic void removeToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}",
"boolean isDeleted();",
"void visit(final Delete delete);",
"public RetentionPolicy retentionPolicy() {\n return this.retentionPolicy;\n }"
] | [
"0.6154862",
"0.5783279",
"0.5703009",
"0.5703009",
"0.566047",
"0.56584233",
"0.56526995",
"0.5646516",
"0.56319195",
"0.55683106",
"0.54626316",
"0.5415358",
"0.5415358",
"0.5350929",
"0.5252443",
"0.5232634",
"0.52243733",
"0.520412",
"0.5110609",
"0.507282",
"0.5044069",
"0.5042871",
"0.5042577",
"0.5042577",
"0.5031837",
"0.5024231",
"0.5013417",
"0.5002971",
"0.49835607",
"0.4982344",
"0.49709406",
"0.4962281",
"0.49132696",
"0.49126387",
"0.49121737",
"0.4911989",
"0.49032813",
"0.48993176",
"0.48732802",
"0.4870154",
"0.48688036",
"0.4851875",
"0.48501536",
"0.48436934",
"0.48351127",
"0.4804966",
"0.4798417",
"0.4792036",
"0.47891292",
"0.47891292",
"0.47891062",
"0.47814602",
"0.47765097",
"0.47672415",
"0.47613254",
"0.47595215",
"0.47579524",
"0.4757129",
"0.4754346",
"0.47473377",
"0.47415915",
"0.47342375",
"0.47306508",
"0.47249076",
"0.4721902",
"0.47141653",
"0.47111368",
"0.47111368",
"0.4711116",
"0.47108078",
"0.47077182",
"0.4704805",
"0.47038975",
"0.4703389",
"0.4696114",
"0.4688158",
"0.46872306",
"0.46828714",
"0.46762457",
"0.46724367",
"0.46686646",
"0.4661014",
"0.4654376",
"0.46505752",
"0.465034",
"0.46475592",
"0.46438855",
"0.4640554",
"0.4639481",
"0.4637067",
"0.4637067",
"0.4637067",
"0.46336952",
"0.4625368",
"0.4622547",
"0.46218774",
"0.4618695",
"0.46176112",
"0.4611658",
"0.46037957"
] | 0.6125566 | 1 |
Overridable if retention strategy is a build completed listener | public void onBuildCompleted(AbstractBuild build, GlobalBuildStatsPluginSaver pluginSaver) {
if(this instanceof BuildCompletedListener){
((BuildCompletedListener)this).buildCompleted(build, pluginSaver);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public final void onCompleted(final Run run, @Nonnull final TaskListener listener) {\n final String jobName = run.getParent().getDisplayName();\n\n // Process only if job in NOT in blacklist\n if ( isJobTracked(jobName) ) {\n logger.fine(\"Completed build!\");\n\n // Collect Data\n JSONObject builddata = gatherBuildMetadata(run, listener);\n\n // Add event_type to assist in roll-ups\n builddata.put(\"event_type\", \"build result\"); // string\n\n // Report Data\n event(builddata);\n gauge(\"jenkins.job.duration\", builddata, \"duration\");\n if ( \"SUCCESS\".equals(builddata.get(\"result\")) ) {\n serviceCheck(\"jenkins.job.status\", this.OK, builddata);\n } else {\n serviceCheck(\"jenkins.job.status\", this.CRITICAL, builddata);\n }\n }\n }",
"public void trackRetention() {\n track(\"_retention\");\n }",
"public void targetFinished(BuildEvent event) {\n }",
"@Override\n\tpublic boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) {\n\t\treturn perform(build, listener);\n\t}",
"public void markComplete()\n {\n setCount(getGoal());\n }",
"public void onBuildDeleted(AbstractBuild build, GlobalBuildStatsPluginSaver pluginSaver) {\n if(this instanceof BuildDeletedListener){\n ((BuildDeletedListener)this).buildDeleted(build, pluginSaver);\n }\n }",
"void onAggregateRestored(AggregateHistory history) {\n this.eventCountAfterLastSnapshot = history.getEventCount();\n }",
"@Override\n public final void onStarted(final Run run, final TaskListener listener) {\n String jobName = run.getParent().getDisplayName();\n\n // Process only if job is NOT in blacklist\n if ( isJobTracked(jobName) ) {\n logger.fine(\"Started build!\");\n\n // Grab environment variables\n EnvVars envVars = null;\n try {\n envVars = run.getEnvironment(listener);\n } catch (IOException e) {\n logger.severe(e.getMessage());\n } catch (InterruptedException e) {\n logger.severe(e.getMessage());\n }\n\n // Gather pre-build metadata\n JSONObject builddata = new JSONObject();\n builddata.put(\"hostname\", getHostname(envVars)); // string\n builddata.put(\"job\", jobName); // string\n builddata.put(\"number\", run.number); // int\n builddata.put(\"result\", null); // null\n builddata.put(\"duration\", null); // null\n builddata.put(\"buildurl\", envVars.get(\"BUILD_URL\")); // string\n long starttime = run.getStartTimeInMillis() / this.THOUSAND_LONG; // adjusted from ms to s\n builddata.put(\"timestamp\", starttime); // string\n\n // Add event_type to assist in roll-ups\n builddata.put(\"event_type\", \"build start\"); // string\n\n event(builddata);\n }\n }",
"public boolean wasBuilt() {\n \t\treturn triggerForLastBuild != -1;\n \t}",
"@Override\n\tpublic void setReleaseOnFinish(boolean isRelease) {\n\t\t\n\t}",
"public void taskFinished(BuildEvent event) {\n }",
"public void ativarBuild() {\n this.build = true;\n }",
"public void notify(DocumentSavingArgs args)\r\n {\r\n DateTime canceledAt = new Date();\r\n double ellapsedSeconds = (DateTime.subtract(canceledAt, mSavingStartedAt)).getTotalSeconds();\r\n if (ellapsedSeconds > MAX_DURATION)\r\n throw new IllegalStateException($\"EstimatedProgress = {args.EstimatedProgress}; CanceledAt = {canceledAt}\");\r\n }",
"public void buildFinished(BuildEvent event) {\n if (isEnabled()) {\n // Determine whether notification is required due to a failure\n boolean success = (event.getException() == null);\n\n if (success) {\n // Set the counter to the current changelist number\n resetCounter();\n } else {\n // Determine the list of changes that went into the build\n Changelist[] changes = getChanges();\n\n // Determine the list of users\n User[] users = getUsers(changes);\n\n // Attempt to load the body of the message from a file\n StringBuffer msg = null;\n try {\n msg = loadFile(reportFile);\n } catch (IOException ioex) {\n System.out.println(\"Failure reading report file. Defaulting to generated message body.\");\n }\n\n // Generate the body of the message\n String msgMimeType = null;\n if (P4BlameReport.HTML_FORMAT.equals(parent.getFormat())) {\n msgMimeType = \"text/html\";\n if (msg == null) { \n msg = new StringBuffer();\n msg.append(\"<html>\");\n msg.append(\"<body>\");\n msg.append(formatEventsAsHtml());\n msg.append(\"<table border=0 cellspacing=1 cellpadding=1 width=\\\"100%\\\">\\n\");\n msg.append(formatEventAsHtml(event));\n msg.append(\"</table>\\n\");\n msg.append(\"<p>\\n\");\n msg.append(formatChangesAsHtml(changes, users));\n msg.append(\"</body>\");\n msg.append(\"</html>\");\n }\n } else {\n msgMimeType = \"text/plain\";\n if (msg == null) {\n msg = new StringBuffer();\n msg.append(\"The plain text report format is not yet implemented.\");\n }\n }\n\n // Determine the unique list of users for the e-mail notification\n User[] uniqueUsers = getUniqueUsers(users);\n\n // Iterate through the list of messages that must be sent\n Vector<EmailMessage> msgList = parent.getEmailMessages();\n if (msgList.size() > 0) {\n Iterator<EmailMessage> msgIterator = msgList.iterator();\n while (msgIterator.hasNext()) {\n EmailMessage current = (EmailMessage) msgIterator.next();\n if ((uniqueUsers != null) && (uniqueUsers.length > 0)) {\n for (int idx = 0; idx < uniqueUsers.length; idx++) {\n current.addTo(new EmailAddress(uniqueUsers[idx].getEmailAddress()));\n }\n } else {\n current.addTo(new EmailAddress(parent.getDefaultTo()));\n }\n current.setMessage(msg.toString());\n current.setMessageMimeType(msgMimeType);\n try {\n current.sendMessage();\n } catch (BuildException ex) {\n StringBuffer addrStr = new StringBuffer();\n for (int idx = 0; idx < uniqueUsers.length; idx++) {\n if (idx > 0) addrStr.append(\", \");\n addrStr.append(uniqueUsers[idx].getEmailAddress());\n }\n System.out.println(\"Unable to notify the following users: \" + addrStr);\n ex.printStackTrace();\n }\n }\n } else {\n System.out.println(\"No messages found. Nothing to do.\");\n }\n\n }\n }\n }",
"public interface GetUnfinishedSummaryListener {\n void onTaskEnded(PartyDetails data);\n}",
"protected void afterJobExecution() {\n\t}",
"private void setupLogging(BuildListener listener) {\n this.listener = listener;\n }",
"public interface IAnalysisListener {\r\n /**\r\n * Notification that analysis is starting.\r\n */\r\n void analysisStarting();\r\n\r\n /**\r\n * Notification that analysis has been completed.\r\n */\r\n void analysisCompleted();\r\n\r\n /**\r\n * Notification that analysis has been postponed until compilation errors are\r\n * removed.\r\n */\r\n void analysisPostponed();\r\n \r\n /**\r\n * Notification that analysis has been cancelled\r\n */\r\n void analysisCancelled();\r\n}",
"public void projectRunnableChanged() { }",
"public void projectRunnableChanged() { }",
"public void setCompleted() {\n this.completed = true;\n }",
"@Override\n public boolean completed() {\n return false;\n }",
"@Override\n public void success(Runnable onPublicationSuccess) {\n assert getTask() instanceof ClusterStateAckListener == false // see [HISTORICAL NOTE] above\n : \"tasks that implement ClusterStateAckListener must explicitly supply themselves as the ack listener\";\n assert incomplete();\n this.onPublicationSuccess = Objects.requireNonNull(onPublicationSuccess);\n }",
"public abstract GrapesNotification newAutoInstance(AbstractBuild<?, ?> build);",
"@Override\n public boolean prebuild(AbstractBuild<?, ?> build,\n BuildListener listener) {\n boolean success = false;\n FilePath workspace = build.getWorkspace();\n\n if (workspace == null) {\n listener.getLogger()\n .println(\"Invalid workspace. Cannot continue.\");\n return false;\n }\n\n DeleteReportsFromWorkspace deleter = new DeleteReportsFromWorkspace();\n\n try {\n success = workspace.act(deleter);\n } catch (IOException | InterruptedException ex) {\n log.log(SEVERE, \"Cleanup crew missing!\", ex);\n listener.getLogger()\n .println(ex.getMessage());\n }\n\n if (!success) {\n listener.getLogger()\n .println(\"Failed to cleanup workspace reports.\");\n build.setResult(FAILURE);\n }\n return success;\n }",
"@Override\n\tpublic void onFinal(Task task) {\n\n\t}",
"public void set_completed();",
"void analysisCompleted();",
"public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }",
"public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }",
"void notifyLivelinessRestored(PublicationData writerData) {\r\n\t\tsynchronized (livelinessListeners) {\r\n\t\t\tfor (WriterLivelinessListener listener : livelinessListeners) {\r\n\t\t\t\tlistener.livelinessRestored(writerData);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public interface WorkflowExecutionListener {}",
"@Override\r\n public void updateExit() {\r\n if (((CompositeGoal) compositeGoal).allOtherGoalsComplete()) {\r\n goalCompleted = true;\r\n compositeGoal.processGoal();\r\n } else {\r\n System.out.println(\"Need to complete other goals first\");\r\n }\r\n }",
"public synchronized void addBuildListener(BuildListener listener) {\n // create a new Vector to avoid ConcurrentModificationExc when\n // the listeners get added/removed while we are in fire\n Vector newListeners = getBuildListeners();\n newListeners.addElement(listener);\n listeners = newListeners;\n }",
"public interface AppLifecycleListener {\n Topic<AppLifecycleListener> TOPIC = Topic.create(\"Application lifecycle notifications\", AppLifecycleListener.class);\n\n default void appFrameCreated(final String[] commandLineArgs, @NotNull Ref<Boolean> willOpenProject) {\n }\n\n default void appStarting(@Nullable Project projectFromCommandLine) {\n }\n\n /**\n * Called when a project frame is closed.\n */\n default void projectFrameClosed() {\n }\n\n /**\n * Called if the project opening was cancelled or failed because of an error.\n */\n default void projectOpenFailed() {\n }\n\n /**\n * Called when the welcome screen is displayed.\n */\n default void welcomeScreenDisplayed() {\n }\n\n /**\n * Fired before saving settings and before final 'can exit?' check. App may end up not closing if some of the\n * {@link com.intellij.openapi.application.ApplicationListener} listeners return false from their {@code canExitApplication}\n * method.\n */\n default void appClosing() {\n }\n\n\n /**\n * Fired after saving settings and after final 'can exit?' check.\n */\n default void appWillBeClosed(boolean isRestart) {\n }\n\n /**\n * @deprecated Please use {@link AppLifecycleListener} directly.\n */\n @Deprecated\n abstract class Adapter implements AppLifecycleListener {\n }\n}",
"Builder addReleasedEvent(PublicationEvent.Builder value);",
"public interface UpDateDownloadListener {\n void start();\n void onProgressChanged(int progress,String downloadUrl);\n void onFinished(long completeSize,String downloadUrl);\n void onFailure();\n}",
"@Override\n synchronized public void onTaskCompletionResult() {\n if (DataContainer.getInstance().pullValueBoolean(DataKeys.PLAY_REFERRER_FETCHED, context) && DataContainer.getInstance().pullValueBoolean(DataKeys.GOOGLE_AAID_FETCHED, context)) {\n deviceInformationUtils.prepareInformations();\n deviceInformationUtils.debugData();\n long lastLaunch = pullValueLong(ITrackingConstants.CONF_LAST_LAUNCH_INTERNAL, context);\n trackLaunchHandler(lastLaunch);\n }\n }",
"public void afterDownstream() {\n }",
"@Override\n\tfinal public boolean hasDoneChanges() {\n\t\treturn false;\n\t}",
"@Override\n public void outputCompletedNotification(String scriptId, OutputStats outputStats) { }",
"public interface MarkCompleteListener {\n void onMarkedComplete(int position);\n}",
"public interface OnDownloadCompleteListener{\n\t\tvoid onDownloadComplete(DownloadBean bean);\n\t}",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.288 -0400\", hash_original_method = \"41AED877D51F56AB121F4235E96580E7\", hash_generated_method = \"FAE5E8273CFAE7048C4C302C5D04574C\")\n \npublic boolean isCompleted() {\n return getInfo().getState() == PrintJobInfo.STATE_COMPLETED;\n }",
"@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }",
"public void addFinishedListener(Consumer<List<S>> listener) {\n finishedListeners.add(listener);\n }",
"public void markRefreshed() {\n tozAdCampaignRetrievalCounter = 0;\n }",
"public interface DoneListener {\n public void done();\n}",
"@Override\r\n\tpublic void documentChangeFinalized(long aTimestamp) {\n\t\t\r\n\t}",
"interface OnVerificationFinish {\n /**\n * Called when verification finishes.\n * @param withError True if there is an error in the verification.\n */\n void verificationFinish(boolean withError);\n }",
"public final void updatesComplete()\r\n\t\t{\r\n\t\t\t// get the builder to build itself\r\n\t\t\tCreate();\r\n\r\n\t\t\t// inform the parent\r\n\t\t\tsuper.updatesComplete();\r\n\t\t}",
"public void setCompleted(){\r\n\t\tisCompleted = true;\r\n\t}",
"public void onCompletedImpl() {\n }",
"@Override\n public void onDeleted(final AbstractBuild<?, ?> build) {\n\n final AbstractProject<?, ?> project = build.getProject();\n final PermalinkStorage storage = project.getProperty(PermalinkStorage.class);\n\n if (storage == null) return;\n\n storage.deleteAliases(build);\n try {\n\n project.save();\n } catch (final IOException ex) {\n\n final String msg = \"Unable to save project after deleting dangling aliases for job \" + build.getDisplayName();\n LOGGER.log(Level.SEVERE, msg, ex);\n }\n }",
"@Override\n\tpublic void changeToReleaseRefresh() {\n\n\t}",
"public void setAnnounced(Boolean newValue);",
"public void addMonoflopDoneListener(MonoflopDoneListener listener) {\n\t\tlistenerMonoflopDone.add(listener);\n\t}",
"public interface LogListener {\n void onReadLogComplete();\n}",
"public void setCompleted(boolean flag) {\r\n completed = flag;\r\n }",
"public interface IUserBudgetUpdationListener extends ApplicationListener<OnFetchCategoryTotalCompleteEvent> {\n\n public void updateAutoGeneratedUserBudget(final OnFetchCategoryTotalCompleteEvent event);\n}",
"@Override\n\t\tpublic void onCompleted() {\n\t\t}",
"protected boolean getStravaFinishOnComplete()\n {\n return true;\n }",
"public void targetStarted(BuildEvent event) {\n }",
"public void onCommitLastReInitialization(ContainerId containerId) {}",
"@Override\n\tpublic boolean isCompleted()\n\t{\n\t\treturn false;\n\t}",
"@Override\n public String markComplete() {\n if (this.isDone) {\n return Ui.getTaskAlrCompletedMessage(this);\n } else {\n this.isDone = true;\n return Ui.getMarkCompleteEventMessage(this);\n }\n }",
"@java.lang.Override\n public boolean hasBuild() {\n return instance.hasBuild();\n }",
"void projectsComplete( String key ) {\n //do nothing\n }",
"@Override\n boolean canFinish() {\n return false; //!getTask().hasUnfinishedDependencies();\n }",
"protected boolean shouldPublish(AbstractBuild<?, ?> build) {\n return isFailureOrRecovery(build);\n }",
"@Test\n void markCompleted() {\n }",
"public void markAsUpToDate() {\n\t\tlog.debug(\"No chain to catch up.\");\n\t\tupToDate = true;\n\t}",
"@Override\n public void launchCompletedNotification(String scriptId, int numJobsSucceeded) {\n\n if (workflowVersion == null) {\n log.warn(\"scriptFingerprint not set for this script - not saving stats.\" );\n } else {\n Workflow workflow = new Workflow(scriptId, workflowVersion, jobs);\n\n try {\n outputStatsData(workflow);\n } catch (IOException e) {\n log.error(\"Exception outputting workflow\", e);\n }\n }\n }",
"@Override\n\t\t\t\tpublic void deliveryComplete(MqttDeliveryToken arg0) {\n\t\t\t\t\tSystem.out.println(\"deliveryComplete---------\"\n\t\t\t\t\t\t\t+ arg0.isComplete());\n\t\t\t\t}",
"public void build()\n{\n\t_buildTime--;\n}",
"private void setFinalNotification() {\n //finished downloading all files\n // update notification\n String note = getResources().getString(R.string.update_complete);\n mBuilder.setContentTitle(note)\n .setContentText(\"\")\n .setSmallIcon(R.drawable.ic_launcher_mp)\n .setTicker(note)\n .setProgress(0, 0, false);\n nm.notify(0, mBuilder.build());\n }",
"@Override\n public void onCompleted(Flow flow) {}",
"@Override\n\tpublic void addToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}",
"@Override\n public boolean perform(AbstractBuild<?, ?> theBuild, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {\n BuildSummary lastBuild = OntrackClient.manage(new ManageClientCall<OptionalBuildSummary>() {\n @Override\n public OptionalBuildSummary onCall(ManageUIClient ui) {\n return ui.getLastBuild(project, branch);\n }\n }).getBuild();\n // Found\n if (lastBuild != null) {\n String name = lastBuild.getName();\n listener.getLogger().format(\"Found build %s for branch %s and project %s%n\", name, branch, project);\n theBuild.addAction(new ParametersAction(new StringParameterValue(variable, name)));\n }\n // Not found\n else {\n listener.getLogger().format(\"Could not find any build for branch %s and project %s%n\", branch, project);\n theBuild.setResult(Result.FAILURE);\n }\n // OK\n return true;\n }",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n listener.onDownlaoded(finalFile);\n }",
"void onCheckViewedComplete(boolean isViewed);",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n protected boolean isFinished() {\n return true;\n }",
"public interface ProjectDiagramListener {\n\n /**\n * Listener method. Whenever any publishable change occurs, this method of all listeners is invoked.\n *\n * @param change is an object holding info about the change\n *\n * @see cz.cvut.promod.services.projectService.treeProjectNode.ProjectDiagramChange\n */\n public void changePerformed(final ProjectDiagramChange change);\n}",
"@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}",
"@Override\n\tpublic void isFinish() {\n\n\t}",
"protected void notificationOnExpiration() {\n }",
"@Override\n public void onFinish() {\n }",
"void analysisPostponed();"
] | [
"0.5769018",
"0.54456455",
"0.5388309",
"0.53781503",
"0.5332176",
"0.5131163",
"0.51247233",
"0.51016766",
"0.50876796",
"0.5071182",
"0.5066076",
"0.5033003",
"0.5023366",
"0.49953353",
"0.48980466",
"0.48840803",
"0.48773628",
"0.48639998",
"0.48632494",
"0.48632494",
"0.4854151",
"0.48516455",
"0.4832633",
"0.48310322",
"0.482884",
"0.48060682",
"0.47986376",
"0.47926188",
"0.4788763",
"0.4788763",
"0.47836807",
"0.47816688",
"0.47740567",
"0.47667423",
"0.47457755",
"0.47456172",
"0.4735805",
"0.47267795",
"0.47234556",
"0.471404",
"0.47098815",
"0.47035113",
"0.4699499",
"0.46951434",
"0.4694844",
"0.46923023",
"0.46902776",
"0.46856466",
"0.46839318",
"0.46796048",
"0.46741757",
"0.4671069",
"0.4670169",
"0.4665726",
"0.46612132",
"0.46606672",
"0.46546224",
"0.46521813",
"0.46466503",
"0.4644063",
"0.46420592",
"0.46418855",
"0.4639614",
"0.46375525",
"0.46367106",
"0.46227062",
"0.4613771",
"0.46113047",
"0.46105954",
"0.46080795",
"0.46060112",
"0.4605151",
"0.46029478",
"0.45931435",
"0.4589967",
"0.45876613",
"0.45856267",
"0.45814925",
"0.4577283",
"0.45761776",
"0.45703602",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4569148",
"0.4568539",
"0.4566629",
"0.45643523",
"0.4551144",
"0.45506617",
"0.4547605",
"0.45392838"
] | 0.5661619 | 1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.credits_simulator, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
Created by DANCO on 29/03/2017. | public interface ddd {
public String dan();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public int describeContents() { return 0; }",
"public void mo38117a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\n protected void getExras() {\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}",
"private void m50366E() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void gravarBd() {\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 public void init() {\n }",
"@Override\n public void memoria() {\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n 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 protected void initialize() {\n\n \n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void init() {}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"public final void mo91715d() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n protected void init() {\n }",
"private void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"Petunia() {\r\n\t\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private TMCourse() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"public void mo12930a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"public void mo6081a() {\n }",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"Consumable() {\n\t}",
"public void mo12628c() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}"
] | [
"0.5936388",
"0.58663046",
"0.5795119",
"0.5693191",
"0.56316614",
"0.56064814",
"0.56037015",
"0.56037015",
"0.56014633",
"0.5578554",
"0.55616325",
"0.55478483",
"0.55395216",
"0.55058694",
"0.5490745",
"0.5482945",
"0.5481928",
"0.54698455",
"0.54658496",
"0.54556334",
"0.54554117",
"0.54381883",
"0.54381883",
"0.54381883",
"0.54381883",
"0.54381883",
"0.5435723",
"0.5427271",
"0.5422156",
"0.5418353",
"0.5418353",
"0.5418353",
"0.5418353",
"0.5418353",
"0.5418353",
"0.5414244",
"0.5405662",
"0.540205",
"0.54002756",
"0.53851074",
"0.5385001",
"0.5383241",
"0.5383241",
"0.53806674",
"0.53795564",
"0.5366401",
"0.53648233",
"0.536361",
"0.53618",
"0.53504336",
"0.53500444",
"0.5346008",
"0.5343386",
"0.5342357",
"0.5341434",
"0.5335518",
"0.5335518",
"0.5335518",
"0.53340036",
"0.5333358",
"0.5330067",
"0.5325567",
"0.5325567",
"0.5325567",
"0.5325567",
"0.5325567",
"0.5325567",
"0.5325567",
"0.53207654",
"0.53207654",
"0.53207654",
"0.5316053",
"0.53149146",
"0.5314522",
"0.5304681",
"0.5297707",
"0.5297707",
"0.5295508",
"0.52833235",
"0.52804714",
"0.5280003",
"0.5277987",
"0.5277987",
"0.5277987",
"0.5276592",
"0.5276592",
"0.5268131",
"0.52647585",
"0.52641994",
"0.52476054",
"0.5247287",
"0.52414465",
"0.5238077",
"0.52374446",
"0.52338356",
"0.52329",
"0.5232219",
"0.5228414",
"0.5227946",
"0.5227031",
"0.52142996"
] | 0.0 | -1 |
Creates new form VistaDenunciaActualizar | public VistaDenunciaA() {
initComponents();
listaDenuncias=new LinkedList<>();
mostrarDenuncias1();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void actualizar(int id_evento_vista, Object datos) {\r\n\t\t//Borra lo anterior\r\n \t\r\n \t jFormattedTextFieldPiso.setText(\"\");\r\n jFormattedTextFieldNumero.setText(\"\");\r\n jFormattedTextFieldTipo.setText(\"\");\r\n \r\n\t\t\r\n\t\tif(id_evento_vista == EventoVista.ALTA_HABITACION_EXITO){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Se ha creado la Habitacion con exito\", \"Nuevo Habitacion\", JOptionPane.INFORMATION_MESSAGE);\t\t\r\n\t\t}\t\r\n\t\r\n\t\telse if (id_evento_vista == EventoVista.ALTA_HABITACION_FALLO){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"ERROR!! Ha ocurrido un error con la BD\", \"Nuevo Habitacion\", JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t}",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }",
"private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }",
"public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }",
"public void actualizar() {\n\n try {\n\n servtpDocumento.actualizarTipoDocumento(tipoDocumento);\n req = RequestContext.getCurrentInstance();\n req.execute(\"PF('dialogoTpDocuActualizar').hide();\");//Cierra el dialogo para actualizar\n req = null;\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Actualizado\", \"Exitoso\");\n\n } catch (Exception e) {\n MensajesFaces.error(\"Error\", \"detalle\" + e);\n\n }\n\n }",
"@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText());\n\t\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\t\tPedidoCompra.setSaldoinicial(saldoinicial.getText());\n\t\t\tPedidoCompra.setData(new Date());\n\t\t\tPedidoCompra.setIspago(false);\n\t\t\tPedidoCompra.setData_criacao(new Date());\n//\t\t\tPedidoCompra.setFornecedor(fornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\t\n\t\t\t\n\t\t\tgetservice().edit(PedidoCompra);\n\t\t\tupdateAlert(PedidoCompra);\n\t\t\tclearFields();\n\t\t\tdesligarLuz();\n\t\t\tloadEntityDetails();\n\t\t\tatualizar.setDisable(true);\n\t\t\tsalvar.setDisable(false);\n\t\t\t\n\t\t \n\t\t \n\t\tsuper.atualizar();\n\t}",
"public ModificarVenta() {\n initComponents();\n txt_boletas.setValue((long)0);\n txt_transbank.setValue((long)0);\n txt_total.setValue((long)0);\n \n }",
"public void actualizar_registro() {\n try {\n iC.nombre = fecha;\n\n String [] data = txtidReg.getText().toString().split(\":\");\n Long id = Long.parseLong(data[1].trim());\n\n int conteo1 = Integer.parseInt(cap_1.getText().toString());\n int conteo2 = Integer.parseInt(cap_2.getText().toString());\n int conteoT = Integer.parseInt(cap_ct.getText().toString());\n\n conteoTab cl = iC.oneId(id);\n\n conteoTab c = new conteoTab();\n\n c.setFecha(cl.getFecha());\n c.setEstado(cl.getEstado());\n c.setIdConteo(cl.getIdConteo());\n c.setIdSiembra(cl.getIdSiembra());\n c.setCama(cl.getCama());\n c.setIdBloque(cl.getIdBloque());\n c.setBloque(cl.getBloque());\n c.setIdVariedad(cl.getIdVariedad());\n c.setVariedad(cl.getVariedad());\n c.setCuadro(cl.getCuadro());\n c.setConteo1(conteo1);\n c.setConteo4(conteo2);\n c.setTotal(conteoT);\n c.setPlantas(cl.getPlantas());\n c.setArea(cl.getArea());\n c.setCuadros(cl.getCuadros());\n c.setIdUsuario(cl.getIdUsuario());\n if(cl.getEstado().equals(\"0\")) {\n iC.update(id, c);\n }else{\n Toast.makeText(this, \"El registro no se puede actualizar por que ya ha sido enviado\", Toast.LENGTH_LONG).show();\n }\n\n Intent i = new Intent(this,ActivityDetalles.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }catch (Exception ex){\n Toast.makeText(this, \"exception al actualizar el registro \\n \\n\"+ex.toString(), Toast.LENGTH_SHORT).show();\n }\n }",
"public EditarDados(Produto dados) {\n \tthis.dados = dados;\n initComponents();\n setLocationRelativeTo(null);\n }",
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"public frm_tutor_subida_prueba() {\n }",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"public void btn_actualizar(View v) {\n String conteo1 = cap_1.getText().toString();\n String conteo2 = cap_2.getText().toString();\n\n if (conteo1.isEmpty()) {\n tostada(\"No haz seleccionado un registro para actualizar\").show();\n } else if (conteo2.isEmpty()) {\n tostada(\"No haz seleccionado un registro para actualizar\").show();\n } else {\n String msj = \"Seguro que deseas actualizar este registro\";\n String tipo = \"btn_actualizar\";\n DialogConfirm(msj, tipo);\n }\n }",
"private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\tif (e.getSource() == barra.btnuevo\r\n\t\t\t\t\t|| e.getSource() == barra.btmodifi) {\r\n\t\t\t\tif (e.getSource() == barra.btnuevo) {\r\n\t\t\t\t\ttfrif.setText(\"\");\r\n\t\t\t\t\ttfrazon.setText(\"\");\r\n\t\t\t\t\ttfdireccion.setText(\"\");\r\n\t\t\t\t\ttftelefono.setText(\"\");\r\n\t\t\t\t\ttfcorreo.setText(\"\");\r\n\t\t\t\t\tcbCiudad.setSelectedItem(-1);\r\n\t\t\t\t\tultimo = actual;\r\n\t\t\t\t\tactual = new Facturacion();\r\n\t\t\t\t}\r\n\t\t\t\tbarra.Edicion();\r\n\t\t\t\ttfrif.grabFocus();\r\n\r\n\t\t\t\ttfrif.setEditable(true);\r\n\t\t\t\ttfrazon.setEditable(true);\r\n\t\t\t\ttfdireccion.setEditable(true);\r\n\t\t\t\ttftelefono.setEditable(true);\r\n\t\t\t\ttfcorreo.setEditable(true);\r\n\t\t\t\tcbCiudad.setEditable(true);\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btgrabar) {\r\n\t\t\t\tif (tfrif.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfrazon.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfdireccion.getText().trim().equals(\"\")) {\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\t\"Debe completar todos los Datos del Persona\\nIngreso de Nuevo Persona\");\r\n\t\t\t\t\ttfrif.grabFocus();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tactual.setRif(tfrif.getText().trim());\r\n\t\t\t\t\tactual.setRazon(tfrazon.getText().trim());\r\n\t\t\t\t\tactual.setDireccion(tfdireccion.getText().trim());\r\n\t\t\t\t\tactual.setTelefono(tftelefono.getText().trim());\r\n\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setFacOficina(principal.ofic);\r\n\t\t\t\t\tif (cbCiudad.getSelectedIndex()>-1)\r\n\t\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setCorreo(tfcorreo.getText().trim());\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tsesion.saveOrUpdate(actual);\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btGrabar!!!Errores de Base de Datos!!!\\n\" + e2\r\n\t\t\t\t\t\t\t\t\t\t+ \" \", \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if (pac!=null) { JOptionPane.showMessageDialog(new\r\n\t\t\t\t\t * JFrame(),\r\n\t\t\t\t\t * \"Número de Cédula ya existe!!!\",\"Database Error!\"\r\n\t\t\t\t\t * ,JOptionPane.ERROR_MESSAGE); tfcedula.grabFocus(); }\r\n\t\t\t\t\t */\r\n\t\t\t\t\tbarra.Consulta();\r\n\t\t\t\t\tif (cierra)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tAdminFactura.setFacturacion(actual);\r\n\t\t\t\t\t\tcerrarventana();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// refreshPersona();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btcancel) {\r\n\t\t\t\tif (cierra)\r\n\t\t\t\t{\r\n//\t\t\t\t\tAdminFactura.setFacturacion(actual); corregido el 12/01/2012 estaba dando error, ya que si cancela la ventana no debe grabar nada en AdminFactura.setFacturacion()\r\n\t\t\t\t\tcerrarventana();\r\n\t\t\t\t}\r\n\t\t\t\tif (buscando) {\r\n\t\t\t \tlbbuscando.setText(\"\");\r\n\t\t\t\t\tbuscando = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (actual.equals(new Persona())) actual = ultimo;\r\n\t\t\t\tbarra.Consulta();\r\n\t\t\t\trefreshFacturacion();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btbuscar) {\r\n\t\t\t\tbarrabusca();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btanteri) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero>0?--puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo < :text order by codigo desc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btAnterior!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsiguie) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero<busqueda.size()-1?++puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo > :text order by codigo asc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btsiguie!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (e.getSource() == barra.btultimo) {\r\n\t\t\t\tif (buscando)\r\n\t\t\t\t{\r\n\t\t\t\t\tpuntero = busqueda.size()-1;\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tactual = obtenerUltimo();\r\n\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsalir) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t}",
"public de_gestionar_contrato_añadir() {\n initComponents();\n lbl_error_nombre_cliente.setVisible(false);\n lbl_error_numero_contrato.setVisible(false);\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n\n // detectar cambio en jdateChoser (fecha de inicio en agregar contrato)\n fecha_inicio_contrato.getDateEditor().addPropertyChangeListener(\n new PropertyChangeListener() {\n @Override\n public void propertyChange(PropertyChangeEvent e) {\n if (\"date\".equals(e.getPropertyName())) {\n System.out.println(e.getPropertyName()\n + \": \" + (Date) e.getNewValue());\n if(fecha_inicio_contrato.getDate()!=null){\n lbl_fecha_expira_contrato.setText(toma_fecha(fecha_inicio_contrato).substring(0,6)+String.valueOf(Integer.parseInt(toma_fecha(fecha_inicio_contrato).substring(6))+1));\n lbl.setVisible(true);\n lbl_fecha_expira_contrato.setVisible(true);\n }\n }else{\n lbl_fecha_expira_contrato.setText(\"\");\n lbl_error_fecha_inicio.setVisible(false);\n lbl.setVisible(false);\n lbl_fecha_expira_contrato.setVisible(false);\n }\n }\n });\n this.add(fecha_inicio_contrato);\n \n deshabilitarPegar();\n }",
"public void modificar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puede dejar cuadros en blanco\");//C.P.M Verificamos que todas las casillas esten llenas de lo contrario lo notificamos a el usuario\r\n } else {//C.P.M de lo contrario todo esta bien y prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos al modelo la informacion\r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.modificar();//C.P.M ejecutamos la funcion modificar del modelo y esperamos algun error\r\n if (Error.equals(\"\")) {//C.P.M si el error viene vacio es que no ocurrio algun error \r\n JOptionPane.showMessageDialog(null, \"La configuracion se modifico correctamente\");\r\n } else {//C.P.M de lo contrario lo notificamos a el usuario\r\n JOptionPane.showMessageDialog(null, Error);\r\n }\r\n }\r\n }",
"public void SalvarNovaArtista() {\n\n\t\tartistaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\n\n\t\tartistaRepository.SalvarNovoRegistro(this.artistaModel);\n\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\n\n\t\tartistaModel = null;\n\t}",
"private void iniFormEditar()\r\n\t{\r\n\t\tthis.operacion = Variables.OPERACION_EDITAR;\r\n\t\t\r\n\t\t/*Verificamos que tenga permisos*/\r\n\t\tboolean permisoNuevoEditar = this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_CONCILIACION, VariablesPermisos.OPERACION_NUEVO_EDITAR);\r\n\t\t\r\n\t\tif(permisoNuevoEditar){\r\n\t\t\t\r\n\t\t\tthis.btnEditar.setVisible(false);\r\n\t\t\tthis.conciliar.setVisible(true);\r\n\t\t\tthis.btnEliminar.setVisible(false);\r\n\t\t\tthis.conciliar.setCaption(\"Guardar\");\r\n\t\t\t\r\n\t\t\tthis.nroDocum.setEnabled(false);\r\n\t\t\tthis.fecDoc.setEnabled(true);\r\n\t\t\tthis.observaciones.setEnabled(true);\r\n\t\t\t\r\n\t\t\tthis.botones.setWidth(\"187\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\t/*Mostramos mensaje Sin permisos para operacion*/\r\n\t\t\tMensajes.mostrarMensajeError(Variables.USUSARIO_SIN_PERMISOS);\r\n\t\t}\r\n\t}",
"private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }",
"private void actualizarMedicamentoExistente() {\n medicamentoSeleccionado.setCodigoMedicamento(codigoMedicamento);\r\n medicamentoSeleccionado.setCodigoCums(codigoCums);\r\n medicamentoSeleccionado.setCodigoCups(codigoCups);\r\n medicamentoSeleccionado.setNombreMedicamento(nombreMedicamento);\r\n medicamentoSeleccionado.setNombreGenerico(nombreGenerico);\r\n medicamentoSeleccionado.setNombreComercial(nombreComercial);\r\n medicamentoSeleccionado.setFormaMedicamento(formaMedicamento);\r\n medicamentoSeleccionado.setPos(pos);\r\n medicamentoSeleccionado.setConcentracion(concentracion);\r\n medicamentoSeleccionado.setUnidadMedida(unidadMedida);\r\n medicamentoSeleccionado.setControlMedico(controlMedico);\r\n medicamentoSeleccionado.setRegistroSanitario(registroSanitario);\r\n medicamentoSeleccionado.setModAdmin(modAdmin);\r\n medicamentoSeleccionado.setValor(valor);\r\n medicamentoFacade.edit(medicamentoSeleccionado);\r\n limpiarFormularioMedicamentos();\r\n RequestContext.getCurrentInstance().update(\"IdFormMedicamentos\");\r\n imprimirMensaje(\"Correcto\", \"El medicamento ha sido actualizado.\", FacesMessage.SEVERITY_INFO);\r\n }",
"private void iniciarVentana()\n {\n this.setVisible(true);\n //Centramos la ventana\n this.setLocationRelativeTo(null);\n //Colocamos icono a la ventana\n this.setIconImage(Principal.getLogo());\n //Agregamos Hint al campo de texto\n txt_Nombre.setUI(new Hint(\"Nombre del Archivo\"));\n //ocultamos los componentes de la barra de progreso general\n lblGeneral.setVisible(false);\n barraGeneral.setVisible(false);\n //ocultamos la barra de progreso de archivo\n barra.setVisible(false);\n //deshabiltamos el boton de ElimianrArchivo\n btnEliminarArchivo.setEnabled(false);\n //deshabilitamos el boton de enviar\n btnaceptar.setEnabled(false);\n //Creamos el modelo para la tabla\n modelo=new DefaultTableModel(new Object[][]{},new Object[]{\"nombre\",\"tipo\",\"peso\"})\n {\n //sobreescribimos metodo para prohibir la edicion de celdas\n @Override\n public boolean isCellEditable(int i, int i1) {\n return false;\n }\n \n };\n //Agregamos el modelo a la tabla\n tablaArchivos.setModel(modelo);\n //Quitamos el reordenamiento en la cabecera de la tabla\n tablaArchivos.getTableHeader().setReorderingAllowed(false);\n }",
"@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\n\tpublic String saveEntity(@Valid ENTITY tipoConsumo, BindingResult result, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\ttry{\n\t\n\t\t\tif (result.hasErrors()) {\n\t\t\t\treturn viewBaseLocation + \"/form\";\n\t\t\t}\n\t\n\t\t\tabm.guardar(tipoConsumo);\n\t\n\t\t\tif(idEstadia != null){\n\t\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t\t}\n\t\n\t\t\tmodel.addAttribute(\"success\", \"La creación se realizó correctamente.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tmodel.addAttribute(\"success\", \"La creación no pudo realizarse.\");\n\t\t}\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn \"redirect:list\";\n\t}",
"public void modificar() {\n try {\n if(!fecha.equals(null)){\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n calendar.setTime((Date) this.fecha);\n this.Selected.setApel_fecha_sesion(calendar.getTime());\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(2, Selected); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"1\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue modificada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.Selected = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n }else\n {\n addMessage(\"Es requerida la fecha\",1 );\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }",
"public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}",
"public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }",
"public EditarVenda() {\n initComponents();\n URL caminhoIcone = getClass().getResource(\"/mklivre/icone/icone2.png\");\n Image iconeTitulo = Toolkit.getDefaultToolkit().getImage(caminhoIcone);\n this.setIconImage(iconeTitulo);\n conexao = ModuloConexao.conector();\n codigoCliente.setEnabled(false);\n lucro.setEnabled(false);\n valorLiquidoML.setEnabled(false);\n }",
"public VistaCrearPedidoAbonado() {\n initComponents();\n errorLabel.setVisible(false);\n controlador = new CtrlVistaCrearPedidoAbonado(this);\n }",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}",
"public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public static void actualizarRegistro(){\n int idActulizar = Integer.parseInt(JOptionPane.showInputDialog(\"Ingrese el ID a Actualizar\"));\n Scanner teclado = new Scanner(System.in); \n \n System.out.println(\"Actualizando.... \");\n //String anombre = teclado.nextLine();\n persona pa = new persona();\n pa.setNombre(teclado.nextLine());\n pa.setAp_paterno(teclado.nextLine());\n pa.setAp_materno(teclado.nextLine());\n pa.setDireccion(teclado.nextLine());\n pa.setSexo(teclado.nextLine());\n \n pd.actualizarPerosna(idActulizar, pa);\n // mostras los actualizados\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno());\n }\n }",
"public void nuevo(){\n switch(tipoDeOperaciones){\n case NINGUNO:\n activarControles();\n btnNuevo.setText(\"Guardar\");\n btnEliminar.setDisable(false);\n btnEliminar.setText(\"Cancelar\");\n btnEditar.setDisable(true);\n btnReporte.setDisable(true);\n tipoDeOperaciones = operaciones.GUARDAR;\n break;\n case GUARDAR:\n guardar();\n \n desactivarControles();\n limpiarControles();\n btnNuevo.setText(\"Nuevo\");\n btnEliminar.setText(\"Eliminar\");\n btnEliminar.setDisable(true);\n btnEditar.setDisable(true);\n btnReporte.setDisable(true);\n tipoDeOperaciones = operaciones.NINGUNO;\n break;\n } \n \n }",
"private void actualizaUsuario() {\n\t\t\n\t\tInteger edad=miCoordinador.validarEdad(campoEdad.getText().trim());\n\t\t\n\t\tif (edad!=null) {\n\t\t\t\n\t\t\tUsuarioVo miUsuarioVo=new UsuarioVo();\n\t\t\t//se asigna cada dato... el metodo trim() del final, permite eliminar espacios al inicio y al final, en caso de que se ingresen datos con espacio\n\t\t\tmiUsuarioVo.setDocumento(campoDocumento.getText().trim());\n\t\t\tmiUsuarioVo.setNombre(campoNombre.getText().trim());\n\t\t\tmiUsuarioVo.setEdad(Integer.parseInt(campoEdad.getText().trim()));\n\t\t\tmiUsuarioVo.setProfesion(campoProfesion.getText().trim());\n\t\t\tmiUsuarioVo.setTelefono(campoTelefono.getText().trim());\n\t\t\tmiUsuarioVo.setDireccion(campoDireccion.getText().trim());\n\t\t\t\n\t\t\tString actualiza=\"\";\n\t\t\t//se llama al metodo validarCampos(), este retorna true o false, dependiendo de eso ingresa a una de las opciones\n\t\t\tif (miCoordinador.validarCampos(miUsuarioVo)) {\n\t\t\t\t//si se retornó true es porque todo está correcto y se llama a actualizar\n\t\t\t\tactualiza=miCoordinador.actualizaUsuario(miUsuarioVo);//en registro se almacena ok o error, dependiendo de lo que retorne el metodo\n\t\t\t}else{\n\t\t\t\tactualiza=\"mas_datos\";//si validarCampos() retorna false, entonces se guarda la palabra mas_datos para indicar que hace falta diligenciar los campos obligatorios\n\t\t\t}\n\t\t\t\n\t\t\t//si el registro es exitoso muestra un mensaje en pantalla, sino, se valida si necesita mas datos o hay algun error\n\t\t\tif (actualiza.equals(\"ok\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Se ha Modificado Correctamente \",\"Confirmación\",JOptionPane.INFORMATION_MESSAGE);\t\t\t\n\t\t\t}else{\n\t\t\t\tif (actualiza.equals(\"mas_datos\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe Ingresar los campos obligatorios\",\"Faltan Datos\",JOptionPane.WARNING_MESSAGE);\t\t\t\n\t\t\t\t}else{\n\t\t JOptionPane.showMessageDialog(null, \"Error al Modificar\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar una edad Valida!!!\",\"Advertencia\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\t\t\t\n\t}",
"@Override\n\tpublic MensajeBean actualiza(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.actualiza(nuevo);\n\t}",
"private void registrarDetallesVenta() {\r\n\t\tdetalleEJB.registrarDetalleVenta(productosCompra, factura);\r\n\r\n\t\ttry {\r\n\r\n\t\t\taccion = \"Crear DetalleVenta\";\r\n\t\t\tString browserDetail = Faces.getRequest().getHeader(\"User-Agent\");\r\n\t\t\tauditoriaEJB.crearAuditoria(\"AuditoriaDetalleVenta\", accion, \"DT creada: \" + factura.getId(),\r\n\t\t\t\t\tsesion.getUser().getCedula(), browserDetail);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"private void btnActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarActionPerformed\n boolean respuesta = false;\n int id =Integer.parseInt(this.txtCodigoPlatDia.getText());\n String valor = this.txtValueModified.getText();\n String atributo = \"\";\n switch (this.cbxTypeModified.getSelectedIndex()) {\n case 1: atributo = \"PDIA_NOMBRE\"; break;\n case 2: atributo = \"PDIA_DESCRIPCION\"; break;\n case 3: atributo = \"PDIA_ENTRADA\"; break;\n case 4: atributo = \"PDIA_PRINCIPIO\"; break;\n case 5: atributo = \"PDIA_BEBIDA\"; break;\n case 6: atributo = \"PDIA_CARNE\"; break;\n case 7: atributo = \"PDIA_PRECIO\"; break;\n default: break;\n }\n if(atributo.equals(\"PDIA_PRECIO\")){\n if(!Utilities.isNumeric(valor)){\n JOptionPane.showMessageDialog(null, \"el precio debe contener valores numericos, VERIFIQUE\");\n return;\n }\n }\n try {\n respuesta = this.servicioRestaurante.updatePlatoDia(id, atributo, valor);\n if(!respuesta){\n JOptionPane.showMessageDialog(null, \"verifique los datos, ITEM NO ENCONTRADO\");\n }else{\n this.listar();\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"ha fallado el servicio, intentelo de nuevo\");\n }\n this.txtCodigoPlatDia.setText(null);\n this.cbxTypeModified.setSelectedIndex(0);\n this.txtValueModified.setText(null);\n this.btnActualizar.setEnabled(false);\n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"private void actualizarConsecutivoExistente() {\n consecutivoSeleccionado.setTipoDocumento(clasificacionesFacade.find(Integer.parseInt(tipoDocumento)));\r\n consecutivoSeleccionado.setResolucionDian(resolucion);\r\n consecutivoSeleccionado.setInicio(inicio);\r\n consecutivoSeleccionado.setFin(fin);\r\n consecutivoSeleccionado.setActual(actual);\r\n consecutivoSeleccionado.setPrefijo(prefijo);\r\n consecutivoSeleccionado.setTexto(texto);\r\n consecutivoFacade.edit(consecutivoSeleccionado);\r\n limpiarFormularioConsecutivos();\r\n RequestContext.getCurrentInstance().update(\"IdFormConsecutivos\");\r\n mostrarTabView=false;\r\n imprimirMensaje(\"Correcto\", \"El consecutivo ha sido actualizado.\", FacesMessage.SEVERITY_INFO);\r\n }",
"@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void guardarVenta(){\n //a partir de la propiedad 'usuario' del ManagedBean 'LoginController' recuperamos\n //el codigo del vendedor y se lo seteamos al objeto Vendedor local\n this.vendedor.setCodVendedor(loginController.getUsuario().getCodVendedor().getCodVendedor());\n try{\n FacturaDao facturaDao = new FacturaDaoImp();\n DetalleFacturaDao detfacturaDao = new DetalleFacturaDaoImp();\n //Seteando datos a la factura\n factura.setCodVendedor(vendedor);\n factura.setCodCliente(cliente);\n factura.setFechaRegistro(new Date());\n \n //Seteamos a cada Item del Detalle la factura\n for(int i=0;i<listDetalle.size();i++){\n listDetalle.get(i).setCodFactura(factura);\n }\n \n //Seteamos a la Factura la Lista de Detalel\n factura.setDetallefacturaList(listDetalle);\n \n //Guardamos la factura y su detalle\n facturaDao.guardarFactura(factura);\n //Guardamos la factura y el cliente en objetos Temporales\n //para poder luego usarlos en la impresion de la factura\n facturaTMP = factura;\n clienteTMP = cliente;\n \n cancelarFactura(); //para limpiar las variables\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Correcto: \", \"Factura Registrada\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Error: \", \"Factura no pudo ser Registrada\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }\n }",
"protected void regenerarVista() {\r\n if (this.partida != null) {\r\n\r\n Configuracion config = this.partida.getConfiguracion(); \r\n \r\n /* Tablero y Piezas en el Tablero */\r\n PanelTablero panel = this.fabricaDePanelesTablero.crearTablero(config);\r\n\r\n this.vista.setPanelTablero(panel);\r\n \r\n /* Piezas que no están en el Tablero */\r\n List<BaseEspacial> bases = this.partida.getBases();\r\n\r\n for (BaseEspacial base : bases) {\r\n\r\n this.vista.addInforme(base, INFORMES_BASE);\r\n \r\n /* Naves que están en la Base */\r\n for (Nave nave : base.getNaves()) {\r\n \r\n this.fabricaDePanelesTablero.crearPieza(nave, panel, config);\r\n \r\n this.vista.addInforme(nave, INFORMES_NAVE);\r\n }\r\n }\r\n \r\n // TODO refactorizar\r\n for (Pieza pieza : this.partida.getTablero()) {\r\n\r\n if (pieza instanceof Contenedor) {\r\n \r\n this.vista.addInforme(pieza, INFORMES_CONTENEDOR);\r\n }\r\n }\r\n \r\n } else {\r\n \r\n this.vista.setPanelTablero(this.presentacion);\r\n }\r\n \r\n this.vista.revalidate();\r\n }",
"@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}",
"public TelaRegistroVendas() {\n initComponents();\n }",
"private void iniciarDatos(Cliente pCliente, int pOpcionForm, FrmClienteLec pFrmPadre) {\n frmPadre = pFrmPadre;\n clienteActual = new Cliente();\n opcionForm = pOpcionForm;\n this.txtNombre.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtApellido.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtDui.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtNumero.setEditable(true); // colocar txtNombre que se pueda editar \n switch (pOpcionForm) {\n case FormEscOpcion.CREAR:\n btnOk.setText(\"Nuevo\"); // modificar el texto del boton btnOk a \"Nuevo\" cuando la pOpcionForm sea CREAR\n this.btnOk.setMnemonic('N'); // modificar la tecla de atajo del boton btnOk a la letra N\n this.setTitle(\"Crear un nuevo Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n break;\n case FormEscOpcion.MODIFICAR:\n btnOk.setText(\"Modificar\"); // modificar el texto del boton btnOk a \"Modificar\" cuando la pOpcionForm sea MODIFICAR\n this.btnOk.setMnemonic('M'); // modificar la tecla de atajo del boton btnOk a la letra M\n this.setTitle(\"Modificar el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n llenarControles(pCliente);\n break;\n case FormEscOpcion.ELIMINAR:\n btnOk.setText(\"Eliminar\");// modificar el texto del boton btnOk a \"Eliminar\" cuando la pOpcionForm sea ELIMINAR\n this.btnOk.setMnemonic('E'); // modificar la tecla de atajo del boton btnOk a la letra E\n this.setTitle(\"Eliminar el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n this.txtNombre.setEditable(false); // deshabilitar la caja de texto txtNombre\n this.txtApellido.setEditable(false);\n this.txtDui.setEditable(false);\n this.txtNumero.setEditable(false);\n llenarControles(pCliente);\n break;\n case FormEscOpcion.VER:\n btnOk.setText(\"Ver\"); // modificar el texto del boton btnOk a \"Ver\" cuando la pOpcionForm sea VER\n btnOk.setVisible(false); // ocultar el boton btnOk cuando pOpcionForm sea opcion VER\n this.setTitle(\"Ver el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n this.txtNombre.setEditable(false); // deshabilitar la caja de texto txtNombre\n this.txtApellido.setEditable(false);\n this.txtDui.setEditable(false);\n this.txtNumero.setEditable(false);\n llenarControles(pCliente);\n break;\n default:\n break;\n }\n }",
"public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }",
"private void tiendasButtonActionPerformed(java.awt.event.ActionEvent evt) {\n actualizarTiendas();\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 etiquetaTitulo = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tablaCuentas = new javax.swing.JTable();\n etiquetaLeyenda = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n etiquetaCodigo = new javax.swing.JLabel();\n campoCodigo = new javax.swing.JTextField();\n etiquetaDescripcion = new javax.swing.JLabel();\n campoDescripcion = new javax.swing.JTextField();\n comboCuentaTitulo = new javax.swing.JComboBox<>();\n etiquetaCuentaTitulo = new javax.swing.JLabel();\n botonAceptar = new javax.swing.JButton();\n etiquetaNivel = new javax.swing.JLabel();\n campoNivel = new javax.swing.JTextField();\n etiquetaTitulo2 = new javax.swing.JLabel();\n botonVolver = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n etiquetaTitulo.setFont(new java.awt.Font(\"Tahoma\", 1, 13)); // NOI18N\n etiquetaTitulo.setText(\"Crear una nueva Cuenta o Titulo\");\n\n tablaCuentas = new javax.swing.JTable() {\n public boolean isCellEditable(int rowIndex, int colIndex){\n return false;\n }\n };\n tablaCuentas.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 \"Codigo\", \"Descripcion\", \"Tipo\", \"Nro Cuenta\"\n }\n ));\n jScrollPane1.setViewportView(tablaCuentas);\n\n etiquetaLeyenda.setText(\"Seleccione bajo que titulo se crea la nueva cuenta o titulo\");\n\n etiquetaCodigo.setText(\"Codigo:\");\n\n etiquetaDescripcion.setText(\"Descripcion:\");\n\n comboCuentaTitulo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Titulo\", \"Cuenta\" }));\n\n etiquetaCuentaTitulo.setText(\"Cuenta o Titulo:\");\n\n botonAceptar.setText(\"Aceptar\");\n\n etiquetaNivel.setText(\"Nivel:\");\n\n campoNivel.setEnabled(false);\n\n etiquetaTitulo2.setText(\"Datos de la nueva Cuenta\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(botonAceptar)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(etiquetaCodigo)\n .addComponent(etiquetaDescripcion)\n .addComponent(etiquetaCuentaTitulo))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(comboCuentaTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34)\n .addComponent(etiquetaNivel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(campoNivel, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(campoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(etiquetaTitulo2)))\n .addContainerGap(38, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(etiquetaTitulo2)\n .addGap(33, 33, 33)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaCodigo))\n .addGap(40, 40, 40)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(etiquetaDescripcion)\n .addComponent(campoDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(59, 59, 59)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboCuentaTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaCuentaTitulo)\n .addComponent(etiquetaNivel)\n .addComponent(campoNivel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(61, 61, 61)\n .addComponent(botonAceptar)\n .addContainerGap(52, Short.MAX_VALUE))\n );\n\n botonVolver.setText(\"Volver\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(etiquetaLeyenda)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(87, 87, 87)\n .addComponent(botonVolver))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(317, 317, 317)\n .addComponent(etiquetaTitulo)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(etiquetaTitulo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)\n .addComponent(etiquetaLeyenda)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 531, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(botonVolver)\n .addGap(67, 67, 67))))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public void salir() {\n if (bandera == 1) {\n altoTabla = \"310\";\n formulaProceso = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaProceso\");\n formulaProceso.setFilterStyle(\"display: none; visibility: hidden;\");\n\n formulaPeriodicidad = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaPeriodicidad\");\n formulaPeriodicidad.setFilterStyle(\"display: none; visibility: hidden;\");\n\n RequestContext.getCurrentInstance().update(\"form:datosFormulaProceso\");\n bandera = 0;\n filtrarListFormulasProcesos = null;\n tipoLista = 0;\n }\n listFormulasProcesosBorrar.clear();\n listFormulasProcesosCrear.clear();\n listFormulasProcesosModificar.clear();\n index = -1;\n secRegistro = null;\n k = 0;\n listFormulasProcesos = null;\n guardado = true;\n RequestContext.getCurrentInstance().update(\"form:ACEPTAR\");\n formulaActual = null;\n lovProcesos = null;\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n a = crear.guardarAlumno();\n //en la base de datos envio un alumno a guardar\n basealumno.guardarAlumnoBD(a);\n //envio en la venta a limpiar los campos\n crear.limpiarCampos();\n crear.bloquearCampos();\n \n// System.out.println(\"objeto: \"+vca.getName());\n\n }",
"public void limpiarDatos() {\r\n FormularioUtil.limpiarComponentes(groupboxEditar, idsExcluyentes);\r\n tbxNro_identificacion.setValue(\"\");\r\n tbxNro_identificacion.setDisabled(false);\r\n deshabilitarCampos(true);\r\n\r\n }",
"public DCrearDisco( InterfazDiscotienda id ){\r\n super( id, true );\r\n principal = id;\r\n\r\n panelDatos = new PanelCrearDisco( );\r\n panelBotones = new PanelBotonesDisco( this );\r\n\r\n getContentPane( ).add( panelDatos, BorderLayout.CENTER );\r\n getContentPane( ).add( panelBotones, BorderLayout.SOUTH );\r\n\r\n setTitle( \"Crear Disco\" );\r\n pack();\r\n }",
"private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}",
"public MENU_ADMINISTRADOR() {\n this.setContentPane(fondo);\n initComponents();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n this.textField1.setText(dateFormat.format(date));\n System.out.println(\"almacenado DPI:\" + datos_solicitud_seguro.getA()[0]);\n }",
"@OnClick(R.id.buttonSalvarN)\n public void salvar() {\n if (fernaoPai == null)\n fernaoPai = new Gaivotas();\n if (!TextUtils.isEmpty(NomeNovo.getText()))\n fernaoPai.setNomeAtual(NomeNovo.getText().toString());\n //inseri a linha abaixo\n PergaminhoNovo.setFilters(new InputFilter[]{new InputFilterMinMax(\"1\", \"10\")});\n\n // aqui implantei o codigo do Cesar , era assim o antigo\n//if (!TextUtils.isEmpty(PergaminhoNovo.getText()))\n//fernaoPai.setPergaminhoAtual(PergaminhoNovo.getText().toString())\n\n if (!TextUtils.isEmpty(PergaminhoNovo.getText()))\n //PergaminhoNovo.setFilters(new InputFilter[]{new InputFilterMinMax(\"1\", \"10\")});\n fernaoPai.setPergaminhoAtual(PergaminhoNovo.getText().toString());\n// terminei aqui\n if (!TextUtils.isEmpty(DataNovo.getText()))\n fernaoPai.setDataAtual(DataNovo.getText().toString());\n\n if (!TextUtils.isEmpty(InicioNovo.getText()))\n fernaoPai.setInicio(InicioNovo.getText().toString());\n\n //Sprinkles vai salvar o usuario editado como esta\n fernaoPai.save();\n /* Aqui, a ideia é fazer com que esse intent seja fechada e enviar um extra para\n * a activity que tem a lista de usuário dizendo que o usuário foi salvo com sucesso! */\n Intent i = new Intent(config.this, Principal.class);\n Toast.makeText(config.this, \"Cadastro Feito no BD!\", Toast.LENGTH_SHORT).show();\n startActivity(i);\n finish();\n }",
"public void cancelarRegistro() {\n this.departamento = new Departamento();\n this.materia = new Materia();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDlg').hide()\");\n }",
"public void actualizar();",
"public void modificar() {\r\n\r\n ModificaProducto modprodu = new ModificaProducto(vista, true);//C.P.M instanciamos la forma de modificar producto en modo modal y le mandamos al vista \r\n int Opcion = vista.jTbuscar.getSelectedRow();//C.P.M obtenemos los datos de la fila la cual este seleccionada\r\n modprodu.id = vista.jTbuscar.getValueAt(Opcion, 0).toString();//C.P.M se los mandamos a la forma dentro de sus campos\r\n modprodu.jTbcodigobarras.setText(vista.jTbuscar.getValueAt(Opcion, 1).toString());\r\n modprodu.jTproducto.setText(vista.jTbuscar.getValueAt(Opcion, 2).toString());\r\n modprodu.jTbprecio.setText(vista.jTbuscar.getValueAt(Opcion, 3).toString());\r\n modprodu.jTbcaducidad.setText(vista.jTbuscar.getValueAt(Opcion, 4).toString());\r\n modprodu.jTbexistencia.setText(vista.jTbuscar.getValueAt(Opcion, 5).toString());\r\n modprodu.jTbdescripcion2.setText(vista.jTbuscar.getValueAt(Opcion, 6).toString());\r\n modprodu.jTbespecificaciones.setText(vista.jTbuscar.getValueAt(Opcion, 7).toString());\r\n modprodu.setLocationRelativeTo(vista);//C.P.M centramos la forma a la vista\r\n modprodu.setVisible(true);//C.P.M y la asemos visible\r\n }",
"public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}",
"public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"public void salvarFornecedor()\r\n {\r\n /*\r\n * Implementação da lógica de salvar um fornecedor. Tratando as\r\n * mensagens conforme solicitado no desafio 1\r\n */\r\n try\r\n {\r\n fornecedorBusiness.salvarFornecedor(fornecedorResource);\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_INFO, \"Fornecedor Adicionado com Sucesso!\", \"\"));\r\n } catch (RuntimeException e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), \"\"));\r\n }\r\n }",
"private void cargarFalta(FaltaDisciplinariaModal vista) {\r\n\t\ttxtCodOficina.setText(\"\");\r\n\t\ttxtOficina.setText(\"\");\r\n\t\ttry {\r\n\t\t\tif (vista.getCedula().equals(\"\") || vista.getPersonal().equals(\"\")) {\r\n\t\t\t\ttxtCedula.setText(\"\");\r\n\t\t\t\ttxtFuncionario.setText(\"\");\r\n\t\t\t} else {\r\n\t\t\t\ttxtCedula.setText(vista.getCedula());\r\n\t\t\t\ttxtFuncionario.setText(vista.getPersonal());\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\ttxtCedula.setText(\"\");\r\n\t\t\ttxtFuncionario.setText(\"\");\r\n\t\t}\r\n\t\tif (vista.getFecha() == null) {\r\n\t\t\tdcDesde.setDate(new Date());\r\n\t\t\tdcHasta.setDate(new Date());\r\n\t\t} else {\r\n\t\t\tdcDesde.setDate(vista.getFecha());\r\n\t\t\tdcHasta.setDate(vista.getFecha());\r\n\t\t}\r\n\t}",
"public void editarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.edit(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaEditDialog').hide()\");\n ejbFacade.limpiarCache();\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n// FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\"));\n// requestContext.execute(\"PF('mensajeRegistroExitoso').show()\");\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n\n }",
"public frmOrdenacao() {\n initComponents();\n setResizable(false);\n ordenacaoControle = new OrdenacaoControle();\n }",
"public FormularioPregunta() {\n initComponents();\n \n setLocationRelativeTo(this);\n }",
"public frmTaquilla() {\n initComponents();\n \n objSalaSecundaria.setCapacidad(250);\n objSalaSecundaria.setPrecioEntrada(180.0);//esto equivale a asignar los valores a través de de los metodos set\n libres1.setText(\"LIBRES \" + objSalaCentral.getCapacidad());\n }",
"VentanaPrincipal(InterfazGestorFF principal, InterfazEsquema estructura) {\n initComponents();\n setTitle(BufferDeRegistro.titulo);\n this.principal=principal;\n this.estructura=estructura;\n cargar_campos(); \n cargar_menu_listados();\n \n botones=new javax.swing.JButton[]{\n jBAbrirSGFF,jBActualizarRegistro,jBAyuda,jBBorrarRegistro,\n jBComenzarConsulta,jBGuardarSGFF,jBGuardarSGFF,jBImportarSGFF,\n jBInsertarRegistro,jBIrAlHV,jBIrAlHijo,\n jBIrAlPV,jBIrAlPadre,jBNuevaFicha,jBRegistroAnterior,jBRegistroSiguiente,jBSSGFF,jBCaracteres, jBAccInv, jBListar\n };\n combos=new javax.swing.JComboBox[]{\n jCBArchivos, jCBHijos, jCBPadresV, jCBHijosV\n };\n abrir(false);//Pongo en orden la barra de herramientas\n \n }",
"public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }",
"@Override\n public void onClick(View v) {\n etProducto.setError(null);\n etCantidad.setError(null);\n etDescripcion.setError(null);\n String producto = etProducto.getText().toString(),\n CantidadComoCadena = etCantidad.getText().toString(),\n descripcion = etDescripcion.getText().toString();\n if (\"\".equals(producto)) {\n etProducto.setError(\"Escribe el producto a comprar\");\n etProducto.requestFocus();\n return;\n }\n if (\"\".equals(CantidadComoCadena)) {\n etCantidad.setError(\"Escribe la cantidad de la venta\");\n etCantidad.requestFocus();\n return;\n }\n if (\"\".equals(descripcion)) {\n etDescripcion.setError(\"Escribe la descripción de la venta\");\n etDescripcion.requestFocus();\n return;\n }\n\n // Ver si es un entero\n int cantidad;\n try {\n cantidad = Integer.parseInt(etCantidad.getText().toString());\n } catch (NumberFormatException e) {\n etCantidad.setError(\"Escribe la cantidad\");\n etCantidad.requestFocus();\n return;\n }\n // Ya pasó la validación\n Venta nuevaVenta = new Venta(producto,cantidad,descripcion);\n long id = ventasController.nuevaVenta(nuevaVenta);\n if (id == -1) {\n // De alguna manera ocurrió un error\n Toast.makeText(AgregarMascotaActivity.this, \"Error al guardar. Intenta de nuevo\", Toast.LENGTH_SHORT).show();\n } else {\n // Terminar\n finish();\n }\n }",
"void actualizar(Prestamo prestamo);",
"@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 jLabel6 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n direccion_vivienda = new javax.swing.JTextField();\n codigo_vivienda = new javax.swing.JTextField();\n consumo_mes = new javax.swing.JTextField();\n lectura_anterior = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n Actualizar = new javax.swing.JButton();\n consumo_capturado = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(0, 153, 255));\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Registros de Consumos\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Segoe UI\", 0, 14))); // NOI18N\n jPanel1.setFont(new java.awt.Font(\"Segoe UI Symbol\", 0, 18)); // NOI18N\n\n jLabel6.setText(\"Consumo Actual Medidor\");\n\n jPanel2.setBackground(new java.awt.Color(51, 204, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Informacion Vivienda\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Segoe UI\", 0, 18))); // NOI18N\n jPanel2.setFont(new java.awt.Font(\"Segoe UI Symbol\", 0, 12)); // NOI18N\n\n jLabel4.setText(\"Direccion\");\n\n jLabel7.setText(\"Consumo Mes\");\n\n jLabel5.setText(\"Lectura Anterior\");\n\n jLabel1.setForeground(new java.awt.Color(255, 0, 51));\n jLabel1.setText(\"Codigo Vivienda\");\n\n direccion_vivienda.setEditable(false);\n direccion_vivienda.setFont(new java.awt.Font(\"Segoe UI Symbol\", 0, 12)); // NOI18N\n direccion_vivienda.setName(\"direccion_vivienda\"); // NOI18N\n direccion_vivienda.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n direccion_viviendaActionPerformed(evt);\n }\n });\n\n codigo_vivienda.setName(\"codigo_vivienda\"); // NOI18N\n codigo_vivienda.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n codigo_viviendaKeyPressed(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n codigo_viviendaKeyTyped(evt);\n }\n });\n\n consumo_mes.setEditable(false);\n consumo_mes.setFont(new java.awt.Font(\"Segoe UI Symbol\", 0, 12)); // NOI18N\n consumo_mes.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n consumo_mesActionPerformed(evt);\n }\n });\n\n lectura_anterior.setEditable(false);\n lectura_anterior.setFont(new java.awt.Font(\"Segoe UI Symbol\", 0, 12)); // NOI18N\n\n jButton2.setFont(new java.awt.Font(\"Segoe UI Symbol\", 1, 12)); // NOI18N\n jButton2.setText(\"Buscar\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(codigo_vivienda, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(53, 53, 53)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(lectura_anterior, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)\n .addComponent(consumo_mes)\n .addComponent(direccion_vivienda))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(codigo_vivienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(direccion_vivienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(7, 7, 7)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lectura_anterior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(consumo_mes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))))\n );\n\n Actualizar.setFont(new java.awt.Font(\"Segoe UI Symbol\", 1, 12)); // NOI18N\n Actualizar.setText(\"Actualizar\");\n Actualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ActualizarActionPerformed(evt);\n }\n });\n\n consumo_capturado.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n consumo_capturadoKeyTyped(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(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(jLabel6)\n .addGap(28, 28, 28)\n .addComponent(consumo_capturado, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)\n .addGap(74, 74, 74)\n .addComponent(Actualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(21, 21, 21))\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 .addComponent(jPanel2, 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(consumo_capturado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Actualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@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 jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n txtMora = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtCliente = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jfecha = new com.toedter.calendar.JDateChooser();\n jLabel5 = new javax.swing.JLabel();\n txtFact = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n btnGuardar = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n txtCuota = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n spAbono = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n lblPending = new javax.swing.JLabel();\n txtPpago = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n txtProxP = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n txtProducto = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n spAbonoRec = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jLabel13 = new javax.swing.JLabel();\n lblCambio = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel2.setBackground(new java.awt.Color(102, 102, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 0, 24)); // NOI18N\n jLabel1.setText(\"Abono a Cuenta\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(148, 148, 148)\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\n jLabel2.setText(\"Mora $\");\n\n txtMora.setEditable(false);\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\n jLabel3.setText(\"Cliente\");\n\n txtCliente.setEditable(false);\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\n jLabel4.setText(\"Fecha\");\n\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\n jLabel5.setText(\"N° Factura\");\n\n txtFact.setEditable(false);\n\n jLabel6.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n jLabel6.setText(\"Monto a abonar\");\n\n btnGuardar.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n btnGuardar.setText(\"Guardar\");\n btnGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGuardarActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Cuota $\");\n\n txtCuota.setEditable(false);\n\n spAbono.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n spAbono.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n spAbonoFocusLost(evt);\n }\n });\n spAbono.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n spAbonoActionPerformed(evt);\n }\n });\n spAbono.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n spAbonoKeyTyped(evt);\n }\n });\n\n jLabel8.setText(\"Saldo Pendiente Actual:\");\n\n lblPending.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n lblPending.setText(\"aaaa\");\n\n txtPpago.setEditable(false);\n txtPpago.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtPpagoActionPerformed(evt);\n }\n });\n\n jLabel10.setText(\"Fecha maxima de pago\");\n\n jLabel11.setText(\"Sig. Fecha de pago\");\n\n txtProxP.setEditable(false);\n txtProxP.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtProxPActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Producto\");\n\n txtProducto.setEditable(false);\n\n jLabel12.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n jLabel12.setText(\"Monto recibido\");\n\n spAbonoRec.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n spAbonoRec.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n spAbonoRecFocusLost(evt);\n }\n });\n spAbonoRec.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n spAbonoRecActionPerformed(evt);\n }\n });\n spAbonoRec.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n spAbonoRecKeyTyped(evt);\n }\n });\n\n jButton1.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n jButton1.setText(\"Calcular Cambio\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel13.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n jLabel13.setText(\"Cambio $\");\n\n lblCambio.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n lblCambio.setText(\"0.00\");\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(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtFact, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jfecha, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(txtCuota, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtMora, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(spAbono, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel12))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel13)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lblCambio, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnGuardar)\n .addComponent(spAbonoRec, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblPending)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(txtPpago, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtProxP, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)\n .addComponent(jLabel10)))\n .addGap(58, 58, 58)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(txtFact, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jfecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtCuota, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtMora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txtProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtPpago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(lblPending)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtProxP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(jSeparator1, 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(spAbono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(spAbonoRec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12))\n .addGap(14, 14, 14)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnGuardar)\n .addComponent(jButton1)\n .addComponent(jLabel13)\n .addComponent(lblCambio))\n .addContainerGap())\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 .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"public CrearPedidos() {\n initComponents();\n }",
"public FRMPrestarComputador() {\n initComponents();\n // idb.setText(idloguin);\n this.TXTFechaDePrestamo.setText(fechaActual());\n }",
"public JfrmAlterarFornecedor() {\n initComponents();\n jtxtBuscado.setDocument(new ApenasNumeros());\n carregaTabela();\n }",
"private void RealizarAccion() {\n if (ValidarCampos()) {\n\n persona.setPrimerNombre(txtPrimerNombre.getText());\n persona.setSegundoNombre(txtSegundoNombre.getText());\n persona.setPrimerApellido(txtPrimerApellido.getText());\n persona.setSegundoApellido(txtSegundoApellido.getText());\n persona.setTelefono(txtTelefono.getText());\n persona.setCedula(txtCedula.getText());\n persona.setCorreo(txtCorreo.getText());\n persona.setDireccion(txtDireccion.getText());\n\n empleado.setFechaInicio(dcFechaInicio.getDate());\n empleado.setSalario(Double.parseDouble(txtSalario.getText()));\n empleado.setCargo(txtCargo.getText());\n empleado.setUsuarioByUserModificacion(SessionHelper.usuario);\n empleado.setFechaModificacion(new Date());\n empleado.setRegAnulado(false);\n\n switch (btnAction.getText()) {\n case \"Guardar\":\n int maxid = personaBean.MaxId() + 1;\n persona.setIdPersona(maxid);\n\n Dbcontext.guardar(persona);\n\n empleado.setIdEmpleado(maxid);\n empleado.setPersona(persona);\n empleado.setUsuarioByUserCreacion(SessionHelper.usuario);\n empleado.setFechaCreacion(new Date());\n\n Dbcontext.guardar(empleado);\n break;\n\n case \"Actualizar\":\n\n Dbcontext.actualizar(persona);\n\n Dbcontext.actualizar(empleado);\n break;\n }\n if (ifrRegistroEmpleados.isActive) {\n ifrRegistroEmpleados.CargarTabla();\n }\n\n Mensajes.OperacionExitosa(this);\n dispose();\n } else {\n Mensajes.InformacionIncompleta(this);\n }\n }",
"public VCrearGerente(JFrame vAnterior, Administrador admin) {\n this.vAnterior = vAnterior; \n this.admin = admin;\n initComponents();\n }",
"public String modificarTema() {\n\t\ttemaEJB.editarTema(temaSeleccionado);\n\t\treturn \"CrearTema\";\n\t}",
"public ActualizarProducto() {\n initComponents();\n }",
"public modVentaServicio(cleanCompany principalOrigen, regVentaServicio actual, String nombreCliente, String nombreServicio, JTable tabla) {\n this.principal = principalOrigen;\n this.actual = actual;\n this.nombreCliente = nombreCliente;\n this.nombreServicio = nombreServicio;\n this.tabla = tabla;\n initComponents();\n this.getContentPane().setBackground(Color.BLACK);\n this.setLocationRelativeTo(null);\n this.setTitle(\"Modificacion de Venta\");\n this.setIconImage(new ImageIcon(getClass().getResource(\"/Img/LogoApp.png\")).getImage());\n llenarCombos();\n// try {\n// mts.visualizarTabla(this.jtblRegistros, principal);\n// } catch (Exception ex) {\n// Logger.getLogger(registroServicio.class.getName()).log(Level.SEVERE, null, ex);\n// }\n\n texts();\n// this.jFormattedTextField3.setFormatterFactory(new JFormattedTextField.AbstractFormatterFactory() {\n//\n// @Override\n// public JFormattedTextField.AbstractFormatter getFormatter(JFormattedTextField tf) {\n// \n// DecimalFormat format = new DecimalFormat(\"#.00\");\n// format.setMinimumFractionDigits(2);\n// format.setMaximumFractionDigits(2);\n// format.setRoundingMode(RoundingMode.HALF_UP);\n// InternationalFormatter formatter = new InternationalFormatter(format);\n// formatter.setAllowsInvalid(false);\n// formatter.setMinimum(0.0);\n// formatter.setMaximum(1000.00);\n// return formatter;\n// }\n// });\n this.addWindowListener(new WindowAdapter() {\n public void windowClosing(WindowEvent evt) {\n visiblePrincipal();\n }\n });\n }",
"public Editar_Entrada() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n this.setTitle(\"CPU System Service S.A.S - FACTURAS DE ENTRADA\");\n //CargarCmbCliente();\n txtSec.setEnabled(false);\n txtIdCli.setEnabled(false);\n traerDatos();\n txtEstado.setEnabled(false);\n txtGarantia.setEnabled(false);\n }",
"@GetMapping(path = \"/realizar\")\n public ModelAndView getForm(){\n\n return new ModelAndView(ViewConstant.MANTCOMPRASMINO).addObject(\"compraMinorista\", new CompraMinorista());\n }",
"public FrmUnosVezbe(Vezbe vezba) {\n initComponents();\n srediFormuPremaSK();\n }",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"public FormCadastroAutomovel() {\n initComponents();\n }",
"private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }",
"public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }",
"public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }",
"private static void CrearVenda (BaseDades bd, int idproducte, int quantitat) {\n Producte prod = bd.consultarUnProducte(idproducte);\n java.sql.Date dataActual = getCurrentDate();//Data SQL\n if (prod != null) {\n if (bd.actualitzarStock(prod, quantitat, dataActual)>0) {//Hi ha estoc\n String taula = \"VENDES\";\n int idvenda = bd.obtenirUltimID(taula);\n Venda ven = new Venda(idvenda, prod.getIdproducte(), dataActual, quantitat);\n \n if (bd.inserirVenda(ven)>0)\n System.out.println(\"VENDA INSERIDA...\");\n } else\n System.out.println(\"NO ES POT FER LA VENDA, NO HI HA ESTOC...\");\n \n } else {\n System.out.println(\"NO HI HA EL PRODUCTE\");\n }\n }",
"@Command\n public void nuevaMateria() {\n\t\t\n\t\tWindow window = (Window)Executions.createComponents(\n \"/WEB-INF/include/Mantenimiento/Materias/vtnMaterias.zul\", null, null);\n window.doModal();\n }",
"public VistaArticulosModif2() {\r\n\t\tsetTitle(\"Modificar_Art\\u00EDculos\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 403, 204);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\t// Definir el Diálogo Confirmar Modificaciones Artículo\r\n\t\tdlgConfModif.setLayout(new FlowLayout());\r\n\t\tdlgConfModif.add(lblConfModif);\r\n\t\tdlgConfModif.add(btnConfModifSi);\r\n\t\tdlgConfModif.add(btnConfModifNo);\r\n\t\tdlgConfModif.setSize(280, 150);\r\n\t\tdlgConfModif.setLocationRelativeTo(null);\r\n\t\tdlgConfModif.addWindowListener(this);\r\n\t\tbtnConfModifSi.addActionListener(this);\r\n\t\tbtnConfModifNo.addActionListener(this);\r\n\r\n\t\tJLabel lblDescripModif2 = new JLabel(\"Descripci\\u00F3n\");\r\n\t\tlblDescripModif2.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblDescripModif2.setBounds(10, 22, 100, 25);\r\n\t\tcontentPane.add(lblDescripModif2);\r\n\r\n\t\tJLabel lblPrecioModif2 = new JLabel(\"Precio\");\r\n\t\tlblPrecioModif2.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblPrecioModif2.setBounds(10, 54, 100, 19);\r\n\t\tcontentPane.add(lblPrecioModif2);\r\n\r\n\t\tJLabel lblCantModif2 = new JLabel(\"Cantidad\");\r\n\t\tlblCantModif2.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblCantModif2.setBounds(10, 84, 100, 25);\r\n\t\tcontentPane.add(lblCantModif2);\r\n\r\n\t\tsetTxtDescripModif2(new JTextField());\r\n\t\tgetTxtDescripModif2().setColumns(10);\r\n\t\tgetTxtDescripModif2().setBounds(103, 26, 274, 20);\r\n\t\tcontentPane.add(getTxtDescripModif2());\r\n\r\n\t\tsetTxtPrecioModif2(new JTextField());\r\n\t\tgetTxtPrecioModif2().setColumns(10);\r\n\t\tgetTxtPrecioModif2().setBounds(103, 53, 86, 20);\r\n\t\tcontentPane.add(getTxtPrecioModif2());\r\n\r\n\t\tsetTxtCantModif2(new JTextField());\r\n\t\tgetTxtCantModif2().setColumns(10);\r\n\t\tgetTxtCantModif2().setBounds(103, 84, 86, 20);\r\n\t\tcontentPane.add(getTxtCantModif2());\r\n\r\n\t\t// Botón Aceptar. Acción --> abre la ventana Confirmar_Modificaciones\r\n\t\tJButton btnAceptarModif2 = new JButton(\"ACEPTAR\");\r\n\t\tbtnAceptarModif2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdlgConfModif.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAceptarModif2.setBounds(21, 130, 89, 23);\r\n\t\tcontentPane.add(btnAceptarModif2);\r\n\r\n\t\t// Botón Limpiar. Acción --> limpia los TextField de la ventana VistaArticulosModif2\r\n\t\tJButton btnLimpiarModif2 = new JButton(\"LIMPIAR\");\r\n\t\tbtnLimpiarModif2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tgetTxtDescripModif2().selectAll();\r\n\t\t\t\tgetTxtDescripModif2().setText(\"\");\r\n\t\t\t\tgetTxtPrecioModif2().selectAll();\r\n\t\t\t\tgetTxtPrecioModif2().setText(\"\");\r\n\t\t\t\tgetTxtCantModif2().selectAll();\r\n\t\t\t\tgetTxtCantModif2().setText(\"\");\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnLimpiarModif2.setBounds(145, 130, 89, 23);\r\n\t\tcontentPane.add(btnLimpiarModif2);\r\n\r\n\t\t// Botón Volver. Acción --> cierra la ventana VistaArticulosModif2\r\n\t\tJButton btnVolverModif2 = new JButton(\"VOLVER\");\r\n\t\tbtnVolverModif2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVolverModif2.setBounds(275, 130, 89, 23);\r\n\t\tcontentPane.add(btnVolverModif2);\r\n\t\tidArticulosModif1.setVisible(false);\r\n\t\tidArticulosModif1.setEnabled(false);\r\n\t\tidArticulosModif1.setBounds(10, 0, 46, 14);\r\n\t\tcontentPane.add(idArticulosModif1);\r\n\t}",
"public void btnActualizarSecuencia()\r\n/* 653: */ {\r\n/* 654:727 */ AutorizacionDocumentoSRI autorizacionDocumentoSRI = null;\r\n/* 655:728 */ PuntoDeVenta puntoDeVenta = AppUtil.getPuntoDeVenta();\r\n/* 656: */ try\r\n/* 657: */ {\r\n/* 658:731 */ if (puntoDeVenta != null) {\r\n/* 659:732 */ autorizacionDocumentoSRI = this.servicioDocumento.cargarDocumentoConAutorizacion(getFacturaProveedorSRI().getDocumento(), puntoDeVenta, this.facturaProveedorSRI\r\n/* 660:733 */ .getFechaEmisionRetencion());\r\n/* 661: */ }\r\n/* 662:735 */ String numero = this.servicioSecuencia.obtenerSecuencia(getFacturaProveedorSRI().getDocumento().getSecuencia(), this.facturaProveedorSRI\r\n/* 663:736 */ .getFechaEmisionRetencion());\r\n/* 664: */ \r\n/* 665:738 */ this.facturaProveedorSRI.setNumeroRetencion(numero);\r\n/* 666:739 */ this.facturaProveedorSRI.setAutorizacionRetencion(autorizacionDocumentoSRI.getAutorizacion());\r\n/* 667: */ }\r\n/* 668: */ catch (ExcepcionAS2 e)\r\n/* 669: */ {\r\n/* 670:741 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 671: */ }\r\n/* 672: */ }",
"@SuppressWarnings(\"static-access\")\r\n\tprivate void abrirTelaNovoArtista() {\r\n\t\t\r\n\t\tFrmArtistaCad newArtista = new FrmArtistaCad();\r\n\t\tnewArtista.setVisible(true);\r\n\t\tnewArtista.setDefaultCloseOperation(newArtista.DISPOSE_ON_CLOSE);\r\n\t\tnewArtista.setResizable(false);\r\n\t}",
"public void guardarDatos() throws Exception {\r\n try {\r\n FormularioUtil.setUpperCase(groupboxEditar);\r\n if (validarForm()) {\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso\r\n .getSelectedItem().getValue());\r\n\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n hospitalizacion = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n if (hospitalizacion == null) {\r\n hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa\r\n .getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n }\r\n hospitalizacion.setTipo_identificacion((String) datos_seleccion\r\n .get(\"tipo_identificacion\"));\r\n hospitalizacion.setNro_identificacion(tbxNro_identificacion\r\n .getValue());\r\n hospitalizacion\r\n .setCodigo_administradora((String) datos_seleccion\r\n .get(\"codigo_administradora\"));\r\n hospitalizacion.setId_plan((String) datos_seleccion\r\n .get(\"id_plan\"));\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n hospitalizacion.setCodigo_prestador(tbxCodigo_prestador\r\n .getValue());\r\n hospitalizacion.setVia_ingreso(lbxVia_ingreso.getSelectedItem()\r\n .getValue().toString());\r\n hospitalizacion.setFecha_ingreso(new Timestamp(\r\n dtbxFecha_ingreso.getValue().getTime()));\r\n hospitalizacion.setNumero_autorizacion(tbxNumero_autorizacion\r\n .getValue());\r\n hospitalizacion.setCausa_externa((String) lbxCausa_externa\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setEstado_salida((String) lbxEstado_salida\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setFecha_egreso(new Timestamp(dtbxFecha_egreso\r\n .getValue().getTime()));\r\n hospitalizacion\r\n .setCodigo_diagnostico_principal(tbxCodigo_diagnostico_principal\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico1(tbxCodigo_diagnostico1\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico2(tbxCodigo_diagnostico2\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico3(tbxCodigo_diagnostico3\r\n .getValue());\r\n hospitalizacion.setComplicacion(tbxComplicacion.getValue());\r\n hospitalizacion.setCausa_muerte(tbxCausa_muerte.getValue());\r\n\r\n hospitalizacion.setCreacion_date(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setUltimo_update(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setCreacion_user(usuarios.getCodigo()\r\n .toString());\r\n hospitalizacion.setUltimo_user(usuarios.getCodigo().toString());\r\n\r\n String complemento = \"\";\r\n\r\n if (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n getServiceLocator().getHospitalizacionService().crear(\r\n hospitalizacion);\r\n if (FACTURACION_RIPS != null) {\r\n this.detach();\r\n } else {\r\n accionForm(true, \"registrar\");\r\n }\r\n } else {\r\n int result = getServiceLocator()\r\n .getHospitalizacionService().actualizar(\r\n hospitalizacion);\r\n if (result == 0) {\r\n throw new Exception(\r\n \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\");\r\n }\r\n }\r\n\r\n if (ionGuardar != null) {\r\n ionGuardar.guardar();\r\n } else {\r\n Messagebox.show(\r\n \"Los datos se guardaron satisfactoriamente.\"\r\n + complemento, \"Informacion? ..\",\r\n Messagebox.OK, Messagebox.INFORMATION);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n tbxAccion.setValue(\"modificar\");\r\n }\r\n\r\n if (this.getParent() instanceof Facturacion_ripsAction) {\r\n this.detach();\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}",
"private void inicializarVista() {\n this.vista.jtfNombreRol.setText(this.modelo.getRol().getDescripcion());\n this.vista.jbAgregar.setEnabled(false);\n this.vista.jbQuitar.setEnabled(false);\n this.vista.jtPermisosDisponibles.setModel(modelo.obtenerAccesosDispon());\n this.vista.jtPermisosSeleccionados.setModel(modelo.obtenerAccesoSelecc());\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosDisponibles, 1);\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosSeleccionados, 1);\n }",
"public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }"
] | [
"0.6667095",
"0.66258216",
"0.6575771",
"0.6489927",
"0.64610445",
"0.6426287",
"0.63288975",
"0.6324128",
"0.6306889",
"0.62444836",
"0.62107867",
"0.6204141",
"0.62033904",
"0.6183825",
"0.6172163",
"0.61620784",
"0.6152925",
"0.6149529",
"0.61264455",
"0.61238945",
"0.61185443",
"0.6117892",
"0.6099574",
"0.60612905",
"0.60535157",
"0.6018442",
"0.6008556",
"0.60082877",
"0.60019696",
"0.5999133",
"0.59664625",
"0.5965032",
"0.5951229",
"0.59363765",
"0.592941",
"0.5922642",
"0.5920159",
"0.5919533",
"0.5909877",
"0.58980715",
"0.58977044",
"0.5887807",
"0.5884304",
"0.5872743",
"0.587255",
"0.58701825",
"0.58659375",
"0.5865824",
"0.5864584",
"0.58585906",
"0.5857561",
"0.5846972",
"0.5839081",
"0.58382744",
"0.5832008",
"0.58290124",
"0.58129096",
"0.58061755",
"0.58014673",
"0.5800326",
"0.58000875",
"0.5793789",
"0.5789444",
"0.5784673",
"0.5779609",
"0.5776732",
"0.57748383",
"0.5774528",
"0.57683307",
"0.5766107",
"0.57552433",
"0.57515883",
"0.57464355",
"0.5740279",
"0.5729462",
"0.5729045",
"0.5727908",
"0.572557",
"0.5722577",
"0.57187915",
"0.570208",
"0.5698097",
"0.5695625",
"0.5692884",
"0.5690988",
"0.5690678",
"0.56869245",
"0.56835794",
"0.56827086",
"0.5681981",
"0.5681068",
"0.56799954",
"0.5667856",
"0.5667678",
"0.5666249",
"0.56645083",
"0.5663271",
"0.56609434",
"0.56607294",
"0.5658625",
"0.56566626"
] | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
modificar = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
descripcion = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jTable1MouseClicked(evt);
}
});
jScrollPane1.setViewportView(jTable1);
modificar.setText("Modificar");
modificar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
modificarActionPerformed(evt);
}
});
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel2.setText("Actualizar Denuncias");
jLabel3.setText("Selecciona la denuncia que deseas midificar y pulsa el boton.");
jLabel4.setText("descripcion:");
descripcion.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
descripcionActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addGap(310, 310, 310)
.addComponent(modificar))
.addGroup(layout.createSequentialGroup()
.addGap(124, 124, 124)
.addComponent(jLabel2))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(descripcion)))
.addContainerGap(21, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2)
.addGap(32, 32, 32)
.addComponent(jLabel3)
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(57, 57, 57)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(descripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)
.addComponent(modificar)
.addContainerGap())
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Oddeven() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public kunde() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\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 .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public FrmMenu() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\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 .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\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.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\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.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\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 .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.73195875",
"0.7291065",
"0.7291065",
"0.7291065",
"0.7286258",
"0.7248489",
"0.7213822",
"0.7208757",
"0.7195916",
"0.7190243",
"0.7184025",
"0.71591616",
"0.7148041",
"0.70930153",
"0.7080625",
"0.7056986",
"0.6987694",
"0.69770867",
"0.6955136",
"0.69538426",
"0.69452894",
"0.6942365",
"0.6935255",
"0.69317245",
"0.6928022",
"0.6924961",
"0.6924691",
"0.6911908",
"0.6911051",
"0.6892464",
"0.6892285",
"0.6890819",
"0.6890592",
"0.688895",
"0.6882979",
"0.68822217",
"0.688142",
"0.68779635",
"0.68758005",
"0.6873809",
"0.6871587",
"0.68597937",
"0.6855975",
"0.68553025",
"0.685517",
"0.68546903",
"0.6853679",
"0.6852941",
"0.6852941",
"0.68433666",
"0.6837067",
"0.68358743",
"0.6828493",
"0.68284714",
"0.6826015",
"0.6824099",
"0.68229824",
"0.68168867",
"0.6816564",
"0.6810073",
"0.68090576",
"0.6808398",
"0.68083",
"0.68070155",
"0.6803015",
"0.6794736",
"0.67938805",
"0.6792195",
"0.6790488",
"0.67894924",
"0.67889225",
"0.6787931",
"0.67813647",
"0.6766285",
"0.676601",
"0.6765171",
"0.67574227",
"0.6755563",
"0.6752438",
"0.6752084",
"0.6742885",
"0.67392796",
"0.6737635",
"0.6736323",
"0.67334515",
"0.67276573",
"0.67266935",
"0.6719731",
"0.6715714",
"0.6715036",
"0.67141175",
"0.6708368",
"0.6707287",
"0.6703903",
"0.67010856",
"0.6700051",
"0.6698535",
"0.66982317",
"0.66940516",
"0.6691627",
"0.6689702"
] | 0.0 | -1 |
Use the current date as the default date in the picker | @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
int year;
int month;
int day;
if (!this.getArguments().containsKey("date")) {
final Calendar c = Calendar.getInstance();
year = c.get(Calendar.YEAR);
month = c.get(Calendar.MONTH);
day = c.get(Calendar.DAY_OF_MONTH);
} else {
final Calendar c = Calendar.getInstance();
c.setTimeInMillis(getArguments().getLong("date"));
year = c.get(Calendar.YEAR);
month = c.get(Calendar.MONTH);
day = c.get(Calendar.DAY_OF_MONTH);
}
// Create a new instance of DatePickerDialog and return it
return new DatePickerDialog(getActivity(), this, year, month, day);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}",
"public void set_value_to_default() {\n this.selectionListStrike.setText(\"\");\n this.selectionListCal_iv.setText(\"\");\n this.selectionListUlast.setText(\"\");\n String format = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date());\n int parseInt = Integer.parseInt(format.substring(6, 10));\n int parseInt2 = Integer.parseInt(format.substring(3, 5));\n int parseInt3 = Integer.parseInt(format.substring(0, 2));\n this.selectedDate = parseInt + \"-\" + parseInt2 + \"-\" + parseInt3;\n this.selectionListExpiry.setSelectedText(format);\n this.selectionListExpiry.initItems(R.string.set_date, SelectionList.PopTypes.DATE, parseInt, parseInt2, parseInt3);\n if (!this.wtype.equals(\"C\")) {\n this.callputbutton.callOnClick();\n }\n }",
"public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }",
"public Date getSelectedDate();",
"public void setSysDate()\r\n\t{\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n txtPDate.setText(sdf.format(new java.util.Date()));\r\n\t}",
"private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}",
"private void initDatePicker() {\n pickDateBox.setDayCellFactory(picker -> new DateCell() {\n public void updateItem(LocalDate date, boolean empty) {\n super.updateItem(date, empty);\n LocalDate today = LocalDate.now();\n\n setDisable(empty || date.compareTo(today) < 0 );\n }\n });\n }",
"public void initializeDate() {\n //Get current date elements from Calendar object\n day = cal.get(Calendar.DAY_OF_MONTH);\n month = cal.get(Calendar.MONTH); //Note months are indexed starting at zero (Jan -> 0)\n year = cal.get(Calendar.YEAR);\n\n //Pair EditText to local variable and set input type\n date = (EditText) findViewById(R.id.textSetDate);\n date.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n date.setText((month + 1) + \"/\" + day + \"/\" + year);\n\n //Create onClick listener on date variable\n date.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n datePicker = new DatePickerDialog(ControlCenterActivity.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int dayOfMonth) {\n date.setText((month + 1) + \"/\" + dayOfMonth + \"/\" + year);\n }\n }, year, month, day);\n\n datePicker.show();\n }\n });\n }",
"abstract Date getDefault();",
"private void setupCalendarView() {\n // Set the default date shown to be today\n DateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.UK);\n String todayDate = df.format(Calendar.getInstance().getTime());\n\n mTextView.setText(todayDate);\n }",
"protected String getSelectedDate()\n {\n String startsOnDate = String.valueOf(selectedYear);\n if(selectedMonth<10)startsOnDate+=\"-0\"+String.valueOf(selectedMonth);\n else startsOnDate+=\"-\"+String.valueOf(selectedMonth);\n if(selectedDay<10)startsOnDate+=\"-0\"+String.valueOf(selectedDay);\n else startsOnDate+=\"-\"+String.valueOf(selectedDay);\n\n return startsOnDate;\n }",
"public String getDefaultDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMMM d, yyyy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }",
"private void selectDate() {\n Calendar calendar = Calendar.getInstance();\n int year = calendar.get(Calendar.YEAR);\n int month = calendar.get(Calendar.MONTH);\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n DatePickerDialog datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n mDatebtn.setText(day + \"-\" + (month + 1) + \"-\" + year); //sets the selected date as test for button\n }\n }, year, month, day);\n datePickerDialog.show();\n }",
"public void setCurrentDate(String currentDate) {\n this.currentDate = currentDate;\n }",
"public void openDatePicker() {\n\n Calendar now = Calendar.getInstance();\n DatePickerDialog dpd = DatePickerDialog.newInstance(\n this,\n now.get(Calendar.YEAR),\n now.get(Calendar.MONTH),\n now.get(Calendar.DAY_OF_MONTH)\n );\n dpd.show(getActivity().getFragmentManager(), StringConstants.KEY_DATEPICKER_DIALOG);\n //dpd.setAccentColor(R.color.hb_medication_history);\n dpd.showYearPickerFirst(true);\n dpd.setMaxDate(now);\n dpd.setYearRange(StaticConstants.MIN_DATE, now.get(Calendar.YEAR));\n }",
"private void chooseDateDialog() {\n Calendar c = Calendar.getInstance();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH);\n int day = c.get(Calendar.DATE);\n\n DatePickerDialog datePickerDialog =\n new DatePickerDialog(Objects.requireNonNull(getContext()), this, year, month, day);\n datePickerDialog.show();\n }",
"private void configDate(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n tvDateLost.setText(dateFormat.format(date));\n }",
"@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckIn.setText(date);\n\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n datePickerDialog.show();\n }",
"private void dateOfBirthPicker() {\n _nextActionDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n int mYear = c.get(Calendar.YEAR);\n int mMonth = c.get(Calendar.MONTH);\n int mDay = c.get(Calendar.DAY_OF_MONTH);\n DatePickerDialog dateDialog = new DatePickerDialog(v.getContext(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, month, year);\n long dtDob = chosenDate.toMillis(true);\n\n String format = new SimpleDateFormat(\"yyyy-MM-dd\").format(dtDob);\n _nextActionDate.setText(format);\n\n }\n }, mYear, mMonth, mDay);\n //dateDialog.getDatePicker().setMaxDate(new Date().getTime());\n dateDialog.show();\n }\n });\n }",
"public void setCurrentDate(String d) {\n currentDate = d;\n }",
"@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckOut.setText(date);\n long today = Calendar.getTimeInMillis();\n view.setMinDate(today);\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n //memunculkan pilihan pada UI\n datePickerDialog.show();\n }",
"public void setTodayCalendar()\n {\n this.currentCalendar = Calendar.getInstance();\n }",
"public void setPickerDate(@NonNull final LocalDateTime date) {\n onView(viewMatcher).perform(click());\n onView(withClassName(equalTo(DatePicker.class.getName())))\n .perform(PickerActions.setDate(date.getYear(), date.getMonth().getValue(), date.getDayOfMonth()));\n new Dialog().confirmDialog();\n }",
"public Date getSelectDate();",
"public void selectDate(){\r\n\t\tcloseDateText.sendKeys(ConvertDate());\r\n\t}",
"public void setDate(Calendar currentDate) {\r\n this.currentDate = currentDate;\r\n }",
"public void setTodayDate() {\r\n int oldMonthValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().setTodayDate();\r\n updateControlsFromTable();\r\n // fire property change\r\n int newMonthValue = getMonth();\r\n if (oldMonthValue != newMonthValue) {\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, newMonthValue);\r\n }\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n // clear selection when changing the month in view\r\n if (oldMonthValue != newMonthValue && oldYearValue != newYearValue) {\r\n calendarTable.getSelectionModel().clearSelection();\r\n }\r\n }",
"public void selectDate()\r\n\t{\r\n\t\tsetLayout(new FlowLayout());\r\n\t\t\r\n\t\t// Create the DatePicker\r\n\t\tUtilDateModel model = new UtilDateModel();\r\n\t\tProperties properties = new Properties();\r\n\t\tproperties.put(\"text.today\", \"Today\");\r\n\t\tproperties.put(\"text.month\", \"Month\");\r\n\t\tproperties.put(\"text.year\", \"Year\");\r\n\t\tJDatePanelImpl datePanel = new JDatePanelImpl(model,properties);\r\n\t\tdatePicker = new JDatePickerImpl(datePanel, new DateFormatter());\r\n\t\t\r\n\t\t// Add confirmation button\r\n\t\tbutton = new JButton(\"OK\");\r\n\t\tbutton.addActionListener(this);\r\n\t\t\r\n\t\t// Display the DatePicker\r\n\t\tadd(datePicker);\r\n\t\tadd(button);\r\n setSize(300,300);\r\n setLocationRelativeTo(null);\r\n setVisible(true);\r\n\t}",
"private DatePicker createDatePicker(boolean veto) {\r\n DatePickerSettings datePickerSettings = new DatePickerSettings();\r\n datePickerSettings.setAllowEmptyDates(false);\r\n datePickerSettings.setAllowKeyboardEditing(false);\r\n DatePicker datePicker = new DatePicker(datePickerSettings);\r\n if (veto) {\r\n // If today is Saturday or Sunday, this sets the default\r\n // to the following Monday\r\n if (LocalDate.now().getDayOfWeek() == DayOfWeek.SATURDAY) {\r\n datePicker.setDate(LocalDate.now().plusDays(3));\r\n } else if (LocalDate.now().getDayOfWeek() == DayOfWeek.SUNDAY) {\r\n datePicker.setDate(LocalDate.now().plusDays(2));\r\n } else datePicker.setDate(LocalDate.now().plusDays(1));\r\n // Veto Policy to disallow weekends\r\n datePickerSettings.setVetoPolicy(new VetoDates());\r\n } else datePicker.setDate(LocalDate.now());\r\n return datePicker;\r\n }",
"public void setDefaultDateRange() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n Calendar todaysDate = Calendar.getInstance();\n toDateField.setText(dateFormat.format(todaysDate.getTime()));\n\n todaysDate.set(Calendar.DAY_OF_MONTH, 1);\n fromDateField.setText(dateFormat.format(todaysDate.getTime()));\n }",
"public void setCurrentDate(Date currentDate)\r\n {\r\n m_currentDate = currentDate;\r\n }",
"public void SetCurrentDate(CalendarWidget kCal) {\n\t\tfor(int i = 0; i < 42; ++i)\n\t\t{\n\t\t\tif(kCal.cell[i].date.getText().toString().length() == 0)\n\t\t\t\tcontinue;\n\t\t\tkCal.checkForCurrentData(kCal.cell[i]);\n\t\t}\n\t}",
"private Date getCurrentDate() {\n return Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant());\n }",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void onClick(View v) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) final Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker = new DatePickerDialog(Addnewuser.this, new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n mybirthday = new GregorianCalendar(selectedyear, selectedmonth, selectedday).getTime();\n birthday = \"\" + selectedday + \"/\" + (selectedmonth + 1) + \"/\" + selectedyear + \"\";\n dob.setText(birthday);\n // Toast.makeText(Addnewuser.this, \"\"+birthday+\"\\n\" +\n // \"\"+date.toString(), Toast.LENGTH_SHORT).show();\n\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select date\");\n mDatePicker.show();\n }",
"@Override\r\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\r\n int mYear = c.get(Calendar.YEAR); // current year\r\n int mMonth = c.get(Calendar.MONTH); // current month\r\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\r\n\r\n\r\n // date picker dialog\r\n datePickerDialog = new DatePickerDialog(task_setting.this,\r\n new DatePickerDialog.OnDateSetListener() {\r\n\r\n\r\n @Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth) {\r\n // set day of month , month and year value in the edit text\r\n\r\n final String[] MONTHS = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\r\n String mon = MONTHS[monthOfYear];\r\n date.setText(mon + \" \" + dayOfMonth + \", \" + year);\r\n }\r\n }, mYear, mMonth, mDay);\r\n datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);\r\n datePickerDialog.show();\r\n }",
"public Date getSelectedDate() {\n\t\treturn date.getValue();\n\t}",
"public GregorianCalendar getSelectedDate(){\n int day = Integer.parseInt(this.date_day.getSelectedItem().toString());\n int month = Integer.parseInt(this.date_month.getSelectedItem().toString());\n int year = Integer.parseInt(this.date_year.getSelectedItem().toString());\n\n GregorianCalendar date = new GregorianCalendar();\n date.setTimeInMillis(0);\n \n date.set(Calendar.DAY_OF_MONTH, day);\n date.set(Calendar.MONTH, month -1);\n date.set(Calendar.YEAR, year);\n\n return date;\n }",
"private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }",
"public void setCurrentDate(CurrentDate pCurrentDate) { \n mCurrentDate = pCurrentDate; \n }",
"public void setDateStart_CouponsTab_Marketing() {\r\n\t\tthis.dateStart_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tString today1 = (String) (formattedDate.format(c.getTime()));\r\n\t\tthis.dateStart_CouponsTab_Marketing.sendKeys(today1);\r\n\t}",
"private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }",
"public DatePickerDialog(@NonNull Context context) {\n this(context, 0, null, Calendar.getInstance(), -1, -1, -1);\n }",
"public void onDateSet(DatePicker view, int year, int month, int day) {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n DateFormat df = DateFormat.getDateInstance();\n String formattedDate = df.format(chosenDate);\n\n // Display the chosen date to app interface\n C_birthdate.setText(formattedDate);\n //C_reg_date.setText(formattedDate);\n }",
"@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_eDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }",
"@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_sDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }",
"public Main() {\n initComponents();\n setColor(btn_home);\n String date = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\").format(new Date());\n jcurrentDate.setText(date);\n \n }",
"@Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n mDateField.setText(year + \"/\" + (month + 1) + \"/\" + day);\n }",
"public static void setDate() {\r\n\t\tDate.set(DateFormat.getDateTimeInstance(DateFormat.SHORT,\r\n\t\t\t\tDateFormat.LONG, Locale.getDefault()).format(\r\n\t\t\t\tnew java.util.Date()));\r\n\t}",
"private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\texpense.setDate(c.getTime());\n\n\t\t// display the current date\n\t\tupdateDateDisplay();\n\t}",
"private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }",
"private void chooseDateFromCalendar(Button dateButton){\n DateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n Calendar nowCalendar = formatCalendar(Calendar.getInstance());\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(getContext(),\n R.style.Theme_TrainClimbing_DatePicker,\n (v, y, m, d) -> {\n inputCalendar.set(y, m, d);\n if (inputCalendar.after(nowCalendar))\n dateButton.setText(R.string.ad_button_date);\n else\n dateButton.setText(sdf.format(inputCalendar.getTime()));\n }, inputCalendar.get(Calendar.YEAR),\n inputCalendar.get(Calendar.MONTH),\n inputCalendar.get(Calendar.DAY_OF_MONTH));\n\n datePickerDialog.getDatePicker().setFirstDayOfWeek(Calendar.MONDAY);\n datePickerDialog.getDatePicker().setMinDate(formatCalendar(\n new GregorianCalendar(2000, 7, 19)).getTimeInMillis());\n datePickerDialog.getDatePicker().setMaxDate(nowCalendar.getTimeInMillis());\n datePickerDialog.show();\n }",
"@Override\n public void onClick(View v) {\n\n new DatePickerDialog(CompoffActivity.this, date, currentDate\n .get(Calendar.YEAR), currentDate.get(Calendar.MONTH),\n currentDate.get(Calendar.DAY_OF_MONTH)).show();\n }",
"@TargetApi(Build.VERSION_CODES.O)\n public LocalDate getTodayDate() {\n LocalDate date;\n date = LocalDate.now();\n return date;\n }",
"private void setCurrentDay() {\n Calendar c = Calendar.getInstance();\n\n year = c.get(Calendar.YEAR);\n month = c.get(Calendar.MONTH);\n day = c.get(Calendar.DAY_OF_MONTH);\n hour = c.get(Calendar.HOUR_OF_DAY);\n minute = c.get(Calendar.MINUTE);\n }",
"public static void dateDue() {\n Date date = new Date();\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n String strDate = formatter.format(date);\r\n NewProject.due_date = getInput(\"Please enter the due date for this project(dd/mm/yyyy): \");\r\n\r\n UpdateData.updateDueDate();\r\n updateMenu();\t//Return back to previous menu.\r\n }",
"public String getCurrentDate() {\n return currentDate;\n }",
"public static String getCurrentDate() {\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate dateobj = new Date();\n\t\treturn df.format(dateobj);\n\t}",
"DateFormatPanel() {\r\n\t\tfDateFormat = DateFormat.getTimeInstance(DateFormat.DEFAULT);\r\n\t}",
"public void setSelectedDate(Date selectedDate);",
"public DateChooser(Locale locale) {\r\n this.locale = locale;\r\n currentDate = Calendar.getInstance(locale);\r\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }",
"public static String getCurrentDate() {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"); \n LocalDateTime now = LocalDateTime.now(); \n return dtf.format(now);\n }",
"@SuppressLint(\"SetTextI18n\")\n private void setTransactionDate() {\n // used to get the name of the month from the calendar\n HashMap<String, String> months = new HashMap<>();\n String[] mnths = {\"\", \"Jan\", \"Feb\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"Sept\", \"Oct\", \"Nov\", \"Dec\"};\n for (int i = 1; i <= 12; i++) {\n if (i < 10) {\n months.put(mnths[i], Integer.toString(i));\n } else {\n\n months.put(mnths[i], Integer.toString(i));\n }\n }\n\n // set the date when somehting is selected from the DatePicker\n dateText.setText(months.get(transaction.getMonth()) + '-' + Integer.toString(transaction.getDay()) + '-' + transaction.getYear());\n findViewById(R.id.transaction_date).setOnClickListener(new View.OnClickListener() {\n @Override\n // show DatePicker on field click\n public void onClick(View v) {\n showDatePickerDialog();\n }\n });\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), startdatepicker, trigger.getStarttime().get(Calendar.YEAR), trigger.getStarttime().get(Calendar.MONTH), trigger.getStarttime().get(Calendar.DAY_OF_MONTH)).show();\n }",
"private void setDefaultExpiryDate() {\n int twoWeeks = 14;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.DAY_OF_YEAR, twoWeeks);\n this.expiryDate = calendar.getTime();\n }",
"public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public static Date getCurrentDate() {\n return new Date();\n }",
"private void showDateDialog(){\n final Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n\n if(!newDate.before(newCalendar)){\n /**\n * Update TextView with choosen date\n */\n newDate.set(Calendar.HOUR_OF_DAY, 0);\n newDate.set(Calendar.MINUTE, 0);\n newDate.set(Calendar.SECOND, 0);\n newDate.set(Calendar.MILLISECOND,0);\n mDateTextView.setTextColor(Color.BLACK);\n String day = mDateFormatter.getDayName(newDate.getTime());\n String date = mDateFormatter.getOnlyDate(newDate.getTime());\n String month = mDateFormatter.getMonth(newDate.getTime());\n mDateTextView.setText(day + \" \" + date + \",\" + month);\n mChoosenSaveDate = newDate;\n }else{\n mDateTextView.setText(\"Deadline has to be at leats same as current date\");\n mDateTextView.setTextColor(Color.RED);\n Toast.makeText(view.getContext(),\"invalid choosen date\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n },newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n\n }",
"@Override\n\tpublic Calendar getInitialDate() {\n\t\treturn Calendar.getInstance();\n\t}",
"public Date getCurrentDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n Date currentDate = cal.getTime();\n return currentDate;\n }",
"private void pickDate(final Calendar initDate){\n //callback for when a date is picked\n DatePickerDialog.OnDateSetListener setDate = new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n initDate.set(year, month, dayOfMonth,\n initDate.get(Calendar.HOUR_OF_DAY),\n initDate.get(Calendar.MINUTE),\n initDate.get(Calendar.SECOND));\n setDateTimeViews();\n }\n };\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(this,\n setDate, //callback\n initDate.get(Calendar.YEAR), //initial values\n initDate.get(Calendar.MONTH),\n initDate.get(Calendar.DAY_OF_MONTH));\n datePickerDialog.show(); //shows the dialogue\n }",
"public void setDate() {\n this.date = new Date();\n }",
"@Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n final String selectedDate = year + \"-\" + String.format(\"%02d\", (month+1)) + \"-\" + String.format(\"%02d\", day);\n mDateSession.setText(selectedDate);\n dateFormatted=year+\"\"+String.format(\"%02d\", (month+1))+\"\"+String.format(\"%02d\", day);\n }",
"public CurrentDate getCurrentDate() { \n return mCurrentDate; \n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"public void promptDate(String date)\n {\n this.date = date;\n }",
"public Date getCurrentDate()\r\n {\r\n return (m_currentDate);\r\n }",
"public void onDateSet(DatePicker view, int year, int month, int day){\n TextView tv = getActivity().findViewById(R.id.textBornAdult);\n\n // Create a Date variable/object with user chosen date\n Calendar cal = Calendar.getInstance(SBFApplication.config.locale);\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n // DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, BaseActivity.getInstance().config.locale);\n String formattedDateShow = formatterBornShow.format(chosenDate);\n String formattedDate = formatterTrain.format(chosenDate);\n // formatter.format(date.getDate()\n\n\n // Display the chosen date to app interface\n tv.setText(formattedDateShow);\n dateBorn=formattedDate;\n // MemoryStore.set(getActivity(), \"adultBorn\", formattedDate);\n // MemoryStore.set(getActivity(), \"adultBornShow\", formattedDateShow);\n }",
"public Date getCurrentDate() {\n\t\treturn new Date();\n\t}",
"@Override\n\tprotected void setDate() {\n\n\t}",
"@Override\r\n public void onDateSet(DatePicker view, int selectedYear, int selectedMonth, int selectedDay) {\r\n year = selectedYear;\r\n month = selectedMonth;\r\n day = selectedDay;\r\n\r\n // Show selected date\r\n W_date.setText(new StringBuilder().append(month + 1).append(\"-\").append(day)\r\n .append(\"-\").append(year).append(\" \"));\r\n }",
"private void initPopupDate() {\n editDate = findViewById(R.id.date_depense);\n date = new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n // TODO Auto-generated method stub\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDate();\n }\n\n };\n\n // onclick - popup datepicker\n editDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n new DatePickerDialog(context, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }",
"private void show_Date_Picker() {\n final Calendar c = Calendar.getInstance();\r\n mYear = c.get(Calendar.YEAR);\r\n mMonth = c.get(Calendar.MONTH);\r\n mDay = c.get(Calendar.DAY_OF_MONTH);\r\n android.app.DatePickerDialog datePickerDialog = new android.app.DatePickerDialog(this,\r\n new android.app.DatePickerDialog.OnDateSetListener() {\r\n\r\n @Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth)\r\n {\r\n\r\n txt_mfgdate_text.setText(dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year);\r\n\r\n }\r\n }, mYear, mMonth, mDay);\r\n datePickerDialog.show();\r\n\r\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(merchantHome, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }",
"public static Date getCurrentDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tjava.util.Date currentDate = calendar.getTime();\r\n\t\tDate date = new Date(currentDate.getTime());\r\n\t\treturn date;\r\n\t}",
"@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}",
"public void setDate(Date newDate) {\n this.currentDate = newDate;\n }",
"public void setRequestedDate(Date date) {\n requestedDate.setText(formatDate(date));\n }",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void onClick(final View v) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) final Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker = new DatePickerDialog(UserRegister.this, new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n mybirthday = new GregorianCalendar(selectedyear, selectedmonth, selectedday).getTime();\n\n String birthday = \"\" + selectedday + \"/\" + (selectedmonth + 1) + \"/\" + selectedyear + \"\";\n // String dob = birthday;\n et_dob.setText(birthday);\n\n\n if (validatedate(mybirthday)) {\n Snackbar.make(v, birthday + \" is not possible\", Snackbar.LENGTH_LONG).show();\n et_dob.setText(\"\");\n return;\n }\n if (validateage(mybirthday)) {\n Snackbar.make(v, \"You have to be above 15 years old\", Snackbar.LENGTH_LONG)\n .setAction(\"Help\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //visitwebsite();\n }\n })\n .show();\n et_dob.setText(\"\");\n }\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select date\");\n mDatePicker.show();\n\n\n }",
"@Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n int mYear = c.get(Calendar.YEAR); // current year\n int mMonth = c.get(Calendar.MONTH); // current month\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\n // date picker dialog\n datePickerDialog = new DatePickerDialog(ChangeProfileActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n // set day of month , month and year value in the edit text\n txtdate.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }",
"private void setToday() {\r\n\t\tmTime = new Date().getTime();\r\n\t}",
"public void resetDates() {\r\n selectedDate = null;\r\n currentDate = Calendar.getInstance();\r\n }",
"public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the current date as the default date in the picker\n final Calendar c = Calendar.getInstance();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH);\n int day = c.get(Calendar.DAY_OF_MONTH);\n\n // Create a new instance of DatePickerDialog and return it\n return new DatePickerDialog(getActivity(), this, year, month, day);\n }",
"public Date getDate(Date defaultVal) {\n return get(ContentType.DateType, defaultVal);\n }",
"public void selectDateToMeet(View view) {\n int day;\n int month;\n int year;\n\n /* if the date button has tag of DATE_PICKED then set the date on dialog to date picked earlier,\n otherwise display todays date on the dialog */\n if (dateText.getText().toString().equals(\"\") || !dateText.getText().toString().toLowerCase().contains(\"date\")) {\n String dates[] = dateText.getText().toString().split(\"-\");\n\n day = Integer.parseInt(dates[2]);\n //minus 1 to get the month index\n month = Integer.parseInt(dates[1]) - 1;\n year = Integer.parseInt(dates[0]);\n\n } else {\n //get todays date\n Calendar cal = Calendar.getInstance();\n\n day = cal.get(Calendar.DAY_OF_MONTH);\n month = cal.get(Calendar.MONTH);\n year = cal.get(Calendar.YEAR);\n }\n\n //set the dialog with the date and show it\n DatePickerDialog dialog = new DatePickerDialog(BookPlanActivity.this,\n android.R.style.Theme_Holo_Light_Dialog_MinWidth,\n mDataSetListener, year, month, day);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, \"Clear Date\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n dateText.setText(\"Select a date\");\n }\n });\n\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.show();\n }",
"private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }",
"public void goToToday() {\n goToDate(today());\n }",
"@Override\n public void onClick(View v) {\n new DatePickerDialog(UserUpdate.this, date, cal\n .get(Calendar.YEAR), cal.get(Calendar.MONTH), cal\n .get(Calendar.DAY_OF_MONTH)).show();\n }"
] | [
"0.7570866",
"0.7052404",
"0.6975466",
"0.68639815",
"0.67990696",
"0.6789898",
"0.6783088",
"0.6780454",
"0.670162",
"0.6687505",
"0.66742736",
"0.6661783",
"0.66408455",
"0.6629506",
"0.6622046",
"0.6614785",
"0.66132003",
"0.65635",
"0.6558133",
"0.65395504",
"0.65298307",
"0.65156174",
"0.6510428",
"0.6485256",
"0.648461",
"0.64734167",
"0.64591086",
"0.6439087",
"0.64362216",
"0.64352",
"0.6425105",
"0.64064705",
"0.64024687",
"0.6393669",
"0.63908446",
"0.637432",
"0.63651586",
"0.6359516",
"0.63401186",
"0.63357407",
"0.632999",
"0.63193524",
"0.63104266",
"0.63042456",
"0.62969303",
"0.6276454",
"0.62764436",
"0.62690413",
"0.62551206",
"0.62495565",
"0.6243641",
"0.62392336",
"0.62359583",
"0.6220534",
"0.6207687",
"0.6200541",
"0.61888283",
"0.6177189",
"0.61749333",
"0.6163734",
"0.6161484",
"0.615686",
"0.6150765",
"0.61318576",
"0.6123813",
"0.6115902",
"0.609712",
"0.6087521",
"0.60867393",
"0.6079668",
"0.6078085",
"0.6077477",
"0.607349",
"0.6068905",
"0.6047426",
"0.6044209",
"0.6043971",
"0.60376734",
"0.60356957",
"0.60304505",
"0.602971",
"0.6022028",
"0.6019977",
"0.6016815",
"0.6011811",
"0.6000793",
"0.59980947",
"0.5995633",
"0.59946495",
"0.59938633",
"0.59934145",
"0.5984254",
"0.5983004",
"0.5982952",
"0.5980931",
"0.5977113",
"0.5972836",
"0.59721",
"0.5970178",
"0.59692395",
"0.59642744"
] | 0.0 | -1 |
Main method for testing | public static void main(String[] args){
fatalError();
System.out.println("Termination not requested.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void main() {\n MainApp.main(new String[] {});\n }",
"public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n GOL_Main.main(args);\n }",
"public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }",
"@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}",
"public static void main() {\n \n }",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n Calculadora_teste.main(args);\n \n }",
"public static void main(String[] args) {\n //init\n Client.getLayerIntersectDao().getConfig().getIntersectionFile(null);\n\n //tests\n TestLayers();\n// TestFields();\n// TestObjects();\n// TestDistributions();\n// TestDistributionData();\n// TestDistributionShapes();\n// TestObjNames();\n }",
"public static void main()\n\t{\n\t}",
"@Test\n public void main() {\n // App.main(null);\n // assertEquals(\"Hello world\", outContent.toString());\n }",
"public static void main(String args[]){\n\t\tTestingUtils.runTests();\n\t\t\n\t}",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n Cic.main(args);\n \n }",
"@Test\t\n\tpublic void testMain() {\n\n\t\tSystem.out.println(\"hello\");\n\t}",
"@org.junit.Test\n public void main() throws Exception {\n DosEquis.main(null);\n }",
"@Test\r\n\tpublic void mainTest(){\r\n\t\tMain m = new Main();\r\n\t\tm.main(null);\r\n\t}",
"@Test\n public void main() {\n System.out.println(\"main\");\n String[] args = null;\n SaalHelper.main(args);\n }",
"public Main() {\n \n \n }",
"public static void main() {\n }",
"public static void main(){\n\t}",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n SServer.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n RefSystemGUI.main(args);\n }",
"public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Just testing\");\r\n\t\t//lisää kommenttia\r\n\t\t\r\n\t}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n CashRegister.main(args);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void testMain() {\n\t}",
"public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}",
"public static void main(String[] args) {\n inOrbitDestinationControllerTest();\n// inOrbitReplayControllerTest();\n\n }",
"public static void main(String[] args) {\n\n experiment();\n }",
"public static void main(String... args) throws Exception {\n //testHelloWorld();\n //testExchange();\n //testParentChild();\n //testLinking();\n //testListener();\n //testParse(\"1\");\n //testOuterInner();\n //testResourceARM();\n //testExecuteAround();\n testExecuteAroundARM();\n }",
"public Main() {\r\n\t}",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n LoginRegister.main(args);\n }",
"@Test\r\n public void testMain() {\r\n System.out.println(\"main\");\r\n String[] args = null;\r\n Prog4.main(args);\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 static void main(String[] args) {\n \n \n \n \n }",
"public Main() {}",
"private Main() {\n\n super();\n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n\t\trun();\n\t\t//runTest();\n\n\t}",
"public static void main(String[] args) {\n\t\tTestST st2 = TestST.getInstance();\r\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main (String []args){\n }",
"public static void main(String[] args) {\n\t\ttestStreamMapReduce();\r\n\t\t//testMethodReference();\r\n\t}",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = new String[]{\"-i\", \"-p\", \"src/test/resources/problems_resp.xml\", \"src/test/resources/context.txt\"};\n PrintStream prev = System.out;\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(bos));\n XpathGenerator.main(args);\n System.setOut(prev);\n System.out.println(bos.toString());\n assertTrue(bos.toString().startsWith(\"/fhir:Bundle[1]\"));\n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String[] args)\n {\n try\n {\n TestRunner.run(isuite());\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"@Test\n public void run_main(){\n\n String resource_folder = (new File(\"src/test/resources/\")).getAbsolutePath()+ File.separator ;\n\n String[] args = new String[7];\n args[0] = \"-run\";\n args[1] = resource_folder + \"test_configs/line_ctm.xml\";\n args[2] = \"mytest\";\n args[3] = resource_folder+\"sample_output_request.xml\";\n args[4] = \"temp\";\n args[5] = \"0\";\n args[6] = \"100\";\n\n OTM.main(args);\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tglobalTest();\n//\t\ttimeTest();\n//\t\ttestPrefixSearch();\n//\t\ttestSearch();\n//\t\ttestPrediction();\n//\t\ttestTrieSearch();\n//\t\ttestRebuid();\n//\t\ttest13();\n//\t\ttest14();\n\t}",
"@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n WarPlane.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public Main() {\r\n }",
"public Main() {\r\n }",
"public static void main(String argv[]) {\n \r\n PolicyTest bmt = new PolicyTest();\r\n\r\n bmt.create_minibase();\r\n\r\n // run all the test cases\r\n System.out.println(\"\\n\" + \"Running \" + TEST_NAME + \"...\");\r\n boolean status = PASS;\r\n status &= bmt.test1();\r\n \r\n bmt = new PolicyTest();\r\n bmt.create_minibase();\r\n status &= bmt.test2();\r\n\r\n // display the final results\r\n System.out.println();\r\n if (status != PASS) {\r\n System.out.println(\"Error(s) encountered during \" + TEST_NAME + \".\");\r\n } else {\r\n System.out.println(\"All \" + TEST_NAME + \" completed successfully!\");\r\n }\r\n\r\n }",
"public static void main(String[] args) {\n\t\ttest();\n\t}",
"public static void main(String[] args) {\n basePath = MatcherTest.class.getClassLoader().getResource(\"\").getPath() + \"/\";\n\n String russianPath = basePath + \"russianArticlesTokenizedShort-2.txt\";\n String ruOriginalPath = basePath + \"newRussianArticles.json\";\n String englishPath = basePath + \"englishArticlesTokenized.txt\";\n String enOriginalPath = basePath + \"englishArticles.txt\";\n\n String titleExpert = basePath + \"titleExpert.json\";\n String expertPath = basePath + \"matchExpert.json\";\n String articlePath = basePath + \"testMatchRussian3.json\";\n\n getRussianTokenized(russianPath);\n getRussianOriginal(ruOriginalPath);\n getEnglishTokenized(englishPath);\n getEnglishOriginal(enOriginalPath);\n// matchTitles(titleExpert);\n// matchArticles(articlePath);\n// matchTest(expertPath, articlePath);\n matchArticlesRussian(articlePath);\n ArticleClass.PlayMusic();\n }",
"public Main() {\n\t\tsuper();\n\t}",
"@Test\n public void testMain() throws Exception {\n //main function cannot be tested as it is dependant on user input\n System.out.println(\"main\");\n }",
"public static void main(String[] args)\r\t{",
"public static void main(String[] args) {\n\ttest(tests);\n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main(String[] args) {\r\n\t\t// test method\r\n\t\tNewFeatures newFeatures = new NewFeatures();\r\n\t\tnewFeatures.testingArrayList();\r\n\t\tnewFeatures.testingTryCatch();\r\n\t\tnewFeatures.testingNumericValues();\r\n\t\tnewFeatures.testingSwitchWithStringStatemant();\r\n\r\n\t}",
"public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }",
"public static void main(String []args){\n\n }",
"public static void main(String[] args) {\n new TSL2550Test();\n }",
"@Test\r\n public void testMain() {\r\n System.out.println(\"main\");\r\n String[] args = null;\r\n ChessMain.main(args);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public static void main(String[] args){\n Api api = Factory.createApi(1);\n api.operation(\"using factory now\");\n\n System.out.println(\"--------------using configuration file to get api--------------\");\n Api api2 = Factory.configToCreateApi();\n api2.operation(\"just a test!\");\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public void testMain() throws ClassNotFoundException, IOException \r\n {\r\n String[] args = new String[1];\r\n args[0] = \"SyntaxTest\";\r\n \r\n System.out.println(\"Filename: SyntaxTest:\\n\");\r\n Rectangle1.main(args);\r\n \r\n\r\n\r\n String[] args2 = new String[1];\r\n args2[0] = \"SimpleInsertionTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: SimpleInsertionTest:\\n\");\r\n Rectangle1.main(args2);\r\n \r\n String[] args3 = new String[1];\r\n args3[0] = \"RegionSearchTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RegionSearchTest:\\n\");\r\n Rectangle1.main(args3);\r\n \r\n String[] args4 = new String[1];\r\n args4[0] = \"WebCatTests\";\r\n \r\n System.out.println(\"\\n\\nFilename: WebCatTests:\\n\");\r\n Rectangle1.main(args4);\r\n \r\n String[] args5 = new String[1];\r\n args5[0] = \"RemoveTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RemoveTest:\\n\");\r\n Rectangle1.main(args5);\r\n \r\n String[] args6 = new String[1];\r\n args6[0] = \"MoreCommands\";\r\n \r\n System.out.println(\"\\n\\nFilename: MoreCommands:\\n\");\r\n Rectangle1.main(args6);\r\n \r\n assertEquals(\"RegionSearchTest\", args3[0]);\r\n }",
"public static void main(String[] args) {\n \n\n }",
"public Main() {\n }",
"public static void main(String[] args)\n {\n TestRunner.run(suite());\n }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"main method\");\n\t\ttest();\n\t\t//RunprogramwithoutObject.test();// no need to create any object of class\n\t\tcover();\n\n\t}",
"private Main() {\n }",
"public static void main(String[] args) {\n System.out.println(testLibraryParseCardBarCode());\n System.out.println(testLibraryParseRunLibrarianCheckoutBookCommand());\n System.out.println(testLibraryParseRunSubscriberReturnBookCommand());\n System.out.println(testparseBookId());\n System.out.println(testparseRunSubscriberCheckoutBookCommand());\n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"private Main() {}",
"public static void main(String args[]){\n\t\t\n\t\n\t}",
"static void main(String[] args)\n {\n }",
"public Main() {\n }",
"public Main() {\n }",
"public static void main (String args[]) {\n\t\t\n }",
"static void main(String[] args) {\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String [] args) {\r\n\t\ttestOne(); //adds items to WH; tests getNumItems method & toString method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestTwo(); //tests getItem(String) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestThree(); //test getItem(Item) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFour(); //tests total cost method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFive(); //this will test the getRefrigeratedItems method\r\n\t\tSystem.out.print(\"\\n\"); \r\n\t\ttestSix(); //tests getTotalCostRefrigerated method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestSeven(); //tests remove method\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Testing basic functions...\");\n\t\tQuiz q = new QuizImpl(1, \"Test quiz\");\n\t\tSystem.out.println(\"Quiz ID: \" + q.getId());\n\t\tSystem.out.println(\"Quiz name: \" + q.getTitle());\n\t\tSystem.out.println(\"Adding questions...\");\n\t\tq.addQuestions();\n\t\tSystem.out.println(\"Printing questions...\");\n\t\tq.printQuestions();\n\t}"
] | [
"0.7799056",
"0.77874213",
"0.76932955",
"0.7666802",
"0.7611093",
"0.757639",
"0.74970156",
"0.7496197",
"0.7367972",
"0.7329825",
"0.7298581",
"0.72750217",
"0.72648335",
"0.72605103",
"0.72511375",
"0.7203502",
"0.71987534",
"0.71808213",
"0.71754104",
"0.71677196",
"0.71663064",
"0.71504873",
"0.7145215",
"0.7142309",
"0.7128713",
"0.71065795",
"0.7104541",
"0.7094157",
"0.7087616",
"0.708523",
"0.70847094",
"0.7074023",
"0.705991",
"0.7059158",
"0.7053611",
"0.7053339",
"0.70447814",
"0.7044444",
"0.7030803",
"0.6984374",
"0.6984374",
"0.69751215",
"0.69725204",
"0.69700235",
"0.69700235",
"0.69700235",
"0.69700235",
"0.69700235",
"0.69700235",
"0.69605273",
"0.6955118",
"0.6946447",
"0.6943664",
"0.6938533",
"0.6934964",
"0.6934964",
"0.6934677",
"0.69337064",
"0.69337034",
"0.6930846",
"0.6930358",
"0.6930358",
"0.6929049",
"0.6928875",
"0.69257814",
"0.69237477",
"0.69221437",
"0.69217813",
"0.69202733",
"0.69184977",
"0.6917289",
"0.6913173",
"0.6907655",
"0.6906536",
"0.69007033",
"0.6898866",
"0.6898866",
"0.68971646",
"0.68879044",
"0.68879044",
"0.68854517",
"0.68848246",
"0.68844396",
"0.68820757",
"0.68802124",
"0.68711096",
"0.68705666",
"0.6861248",
"0.6859467",
"0.6856089",
"0.68490505",
"0.6845683",
"0.6839457",
"0.68332744",
"0.68332744",
"0.6833168",
"0.6825314",
"0.6820288",
"0.68195957",
"0.6819427",
"0.6813201"
] | 0.0 | -1 |
9 Utility classes should not have a public or default constructor. | private RiValCrossValidatedRecsys() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Util() { }",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Util() {\n }",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"private Utility() {\n throw new IllegalAccessError();\n }",
"private Util() {\n }",
"private Util() {\n }",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}",
"private Utility() {\n\t}",
"private OSUtil()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not permitted.\");\n }",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"public Utils() {}",
"private ClassUtil() {}",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }",
"private CollectionUtils() {\n\n\t}",
"private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}",
"private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }",
"private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }",
"private RunUtils() {\n }",
"private CollectionUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public Utils() {\n }",
"private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }",
"private UtilityKlasse() {\n\n }",
"private ClassifierUtils() {\n throw new AssertionError();\n }",
"private FunctionUtils() {\n }",
"private BuilderUtils() {}",
"private StringUtilities() {\n // nothing to do\n }",
"private CheckUtil(){ }",
"private J2EEUtils() {\n }",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }",
"private WolUtil() {\n }",
"private IOUtilities() {\n }",
"private JacobUtils() {}",
"private SnapshotUtils() {\r\n\t}",
"private Helper() {\r\n // empty\r\n }",
"private InstanceUtil() {\n }",
"private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}",
"private StringUtil() {\n\t\tsuper();\n\t}",
"private OMUtil() { }",
"private CommonMethods() {\n }",
"public ObjectUtils() {\n super();\n }",
"private RestUtil() {\n\t}",
"private ReflectionUtil()\n {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"private EclipsePrefUtils() {\n // Exists only to defeat instantiation.\n }",
"private StringUtil() {\n }",
"private NumberUtil()\n {\n\tLog.getInstance().error(\"This Class is utility class cannot be instantiated\");\n }",
"private XMLUtil() {\n\t}",
"private ValidationUtils() {}",
"private UIUtils() {\n }",
"private DataProviderUtils() {\n }",
"private KubevirtNetworkingUtil() {\n }",
"private ProcessorUtils() { }",
"private ModuleUtil()\n {\n }",
"private WebStringUtils() {}",
"private GwtUtils() {\n }",
"private Helper() {\r\n // do nothing\r\n }",
"private WAPIHelper() { }",
"private StringUtil() {\n\n }",
"private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }",
"private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}",
"public DTUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"private XMLUtils()\r\n\t{\r\n\t}",
"private PortletRequestUtils() {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}",
"private CLUtil()\n {\n }",
"private LangUtilities() {\n }",
"private SysUtils(){}",
"private NetUtils() {\r\n\t}",
"private RendererUtils() {\n throw new AssertionError(R.string.assertion_utility_class_never_instantiated);\n }",
"private XMLUtils() {\n }",
"protected VboUtil() {\n }",
"private ExplorerFileSystemUtils() {\n // no op\n }",
"private NameUtil() {\n }",
"private DrillCalciteWrapperUtility() {\n }",
"private XhtmlUtils()\n\t{\n\t}",
"private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }",
"private SupplierLoaderUtil() {\n\t}",
"private BytesUtils() {\n\n }",
"private JsonUtils() { }",
"private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private TriggerUtils() {\n }",
"private AuthenticationUtil(){\r\n //utility class\r\n }",
"private BeanUtils() {\n\t\t\n\t}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"private StringUtil() {}",
"private StringUtil() {}",
"private VlcUtils()\n {\n \n }",
"private WeblogicMojoUtilities()\n {\n super();\n }"
] | [
"0.8163816",
"0.81117535",
"0.81117535",
"0.81117535",
"0.81117535",
"0.7976204",
"0.7952325",
"0.79112375",
"0.79051715",
"0.79051715",
"0.78382826",
"0.78382826",
"0.78146636",
"0.77984935",
"0.77445227",
"0.7734713",
"0.7689046",
"0.76741374",
"0.7674087",
"0.7674087",
"0.7674087",
"0.7674087",
"0.7674087",
"0.76645285",
"0.74671847",
"0.73697686",
"0.73499364",
"0.7328491",
"0.73096335",
"0.73032224",
"0.72712606",
"0.7267131",
"0.7250096",
"0.72335273",
"0.7223255",
"0.7179134",
"0.7169139",
"0.7115285",
"0.7103481",
"0.7093863",
"0.70838726",
"0.7064907",
"0.70633334",
"0.70226854",
"0.69734484",
"0.69704366",
"0.6969625",
"0.6941748",
"0.69379884",
"0.693527",
"0.69268817",
"0.6926156",
"0.69058055",
"0.68741536",
"0.68732274",
"0.68659127",
"0.6864406",
"0.6859589",
"0.685228",
"0.6851213",
"0.68474764",
"0.68393546",
"0.6830961",
"0.6828991",
"0.6809695",
"0.68045413",
"0.679819",
"0.67904824",
"0.67833745",
"0.6769522",
"0.67692745",
"0.6764627",
"0.6763631",
"0.67627615",
"0.6759352",
"0.67542696",
"0.67522883",
"0.67515844",
"0.6745236",
"0.6744663",
"0.6743074",
"0.6734611",
"0.67322135",
"0.6729515",
"0.6724309",
"0.6715828",
"0.67137676",
"0.67112386",
"0.67047936",
"0.6683913",
"0.6675764",
"0.6671044",
"0.6661386",
"0.6661214",
"0.6649073",
"0.66358584",
"0.66358584",
"0.66299397",
"0.66299397",
"0.66271126",
"0.66213334"
] | 0.0 | -1 |
Main method. Parameter is not used. | public static void main(final String[] args) {
String enginePath = engines[8];
EngineParameter eparams = new EngineParameter(enginePath);
String url = "http://files.grouplens.org/datasets/movielens/ml-1m.zip";
String folder = "src/resources/main/data/ml-1m";
String modelPath = "src/resources/main/crossValid/ml-1m/model/";
String recPath = "src/resources/main/crossValid/ml-1m/recommendations/";
String dataFile = eparams.getDataSouceParams().getSourceLocation().get(0);
int nFolds = N_FOLDS;
System.out.println("Preparing splits...");
prepareSplits(url, nFolds, dataFile, folder, modelPath);
System.out.println("Gathering recomendations...");
//recommend(nFolds, modelPath, recPath); // RiVal's original step.
//orbsRecommend(nFolds, eparams, modelPath); // Based on RiVal' step
mixedRecommend(nFolds, eparams, modelPath); // Mixed step
//System.out.println("Preparing strategy...");
// the strategy files are (currently) being ignored
//prepareStrategy(nFolds, modelPath, recPath, modelPath);
System.out.println("Evaluating...");
evaluate(nFolds, modelPath, recPath);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main() {\n \n }",
"public static void main()\n\t{\n\t}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static void main(){\n\t}",
"public static void main() {\n }",
"private Main() {\n\n super();\n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public Main() {\n \n \n }",
"public static void main(String[] args)\r\t{",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main (String[]args) throws IOException {\n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public Main() {\n\t\tsuper();\n\t}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {\n \n\n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public Main() {}",
"public static void main (String []args){\n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public Main() {\r\n\t}",
"public static void main (String[] args) {\r\n\t\t \r\n\t\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String args[]) throws IOException {\r\n\t\t\r\n\t}",
"public static void main (String args[]) {\n\t\t\n }",
"public static void main(String[] args) {\n \n\t}",
"static void main(String[] args)\n {\n }",
"private Main() {}",
"public static void main(String[] args) {\t}",
"public static void main(String []args){\n\n }",
"public static void main(String[] args) {\n \n\t\t}",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"static void main(String[] args) {\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main (String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) throws IOException {\n \t\n }",
"private Main() {\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t}",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t}",
"private Main ()\n {\n super ();\n }",
"public static void main(String[] args) {\n\t\t\t\t\n\t}",
"public void Main(){\n }"
] | [
"0.79063153",
"0.76104075",
"0.7546838",
"0.7469704",
"0.7449896",
"0.7387559",
"0.7351645",
"0.73487926",
"0.73139954",
"0.7300619",
"0.7300619",
"0.7300619",
"0.7300619",
"0.7300619",
"0.7300619",
"0.7294175",
"0.7292122",
"0.7282494",
"0.7275569",
"0.7275569",
"0.7264027",
"0.72437435",
"0.7202339",
"0.7201765",
"0.71854895",
"0.71854895",
"0.7183345",
"0.7169282",
"0.71640605",
"0.71580327",
"0.71580327",
"0.7153134",
"0.7129925",
"0.7114547",
"0.70931715",
"0.7087471",
"0.7085326",
"0.7085326",
"0.7081993",
"0.70817393",
"0.70814127",
"0.7080927",
"0.7080927",
"0.7078511",
"0.70751655",
"0.70725",
"0.70663285",
"0.7038171",
"0.7036282",
"0.7035185",
"0.7027953",
"0.7027709",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.7027041",
"0.70243365",
"0.7023206",
"0.7020091",
"0.7018223",
"0.70166165",
"0.70139587",
"0.7006483",
"0.700345",
"0.7002238",
"0.70018",
"0.70018",
"0.70018",
"0.70018",
"0.70018",
"0.70018",
"0.70018",
"0.70018",
"0.70018",
"0.7000168",
"0.6998473",
"0.69979686"
] | 0.0 | -1 |
Downloads a dataset and stores the splits generated from it. | public static void prepareSplits(final String url, final int nFolds, final String inFile, final String folder, final String outPath) {
DataDownloader dd = new DataDownloader(url, folder);
dd.downloadAndUnzip();
boolean perUser = true;
long seed = SEED;
Parser<Long, Long> parser = new MovielensParser();
DataModelIF<Long, Long> data = null;
try {
data = parser.parseData(new File(inFile));
} catch (IOException e) {
e.printStackTrace();
}
DataModelIF<Long, Long>[] splits = new CrossValidationSplitter<Long, Long>(nFolds, perUser, seed).split(data);
File dir = new File(outPath);
if (!dir.exists()) {
if (!dir.mkdir()) {
System.err.println("Directory " + dir + " could not be created");
return;
}
}
for (int i = 0; i < splits.length / 2; i++) {
DataModelIF<Long, Long> training = splits[2 * i];
DataModelIF<Long, Long> test = splits[2 * i + 1];
String trainingFile = outPath + "train_" + i + ".csv";
String testFile = outPath + "test_" + i + ".csv";
System.out.println("train: " + trainingFile);
System.out.println("test: " + testFile);
boolean overwrite = true;
try {
DataModelUtils.saveDataModel(training, trainingFile, overwrite, "\t");
DataModelUtils.saveDataModel(test, testFile, overwrite, "\t");
} catch (FileNotFoundException | UnsupportedEncodingException e) {
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void downloadUCIData() throws Exception {\r\n\r\n String query = \"\";\r\n String strTableHeading = \"\";\r\n int numTableColumns = 89;\r\n //boolean overwrite = false; // Flag to avoid SQL calls if we are okay with using existing files\r\n sqlConnector.outSqlToCSV(query, strTableHeading, numTableColumns, false);\r\n\r\n /*\r\n if (baseDir.exists()) return; //Data already exists, don't download it again\r\n\r\n String url = \"https://archive.ics.uci.edu/ml/machine-learning-databases/synthetic_control-mld/synthetic_control.data\";\r\n String data = IOUtils.toString(new URL(url));\r\n\r\n String[] lines = data.split(\"\\n\");\r\n\r\n //Create directories\r\n baseDir.mkdir();\r\n baseTrainDir.mkdir();\r\n featuresDirTrain.mkdir();\r\n labelsDirTrain.mkdir();\r\n baseTestDir.mkdir();\r\n featuresDirTest.mkdir();\r\n labelsDirTest.mkdir();\r\n\r\n int lineCount = 0;\r\n List<Pair<String, Integer>> contentAndLabels = new ArrayList<>();\r\n for (String line : lines) {\r\n String transposed = line.replaceAll(\" +\", \"\\n\");\r\n\r\n //Labels: first 100 examples (lines) are label 0, second 100 examples are label 1, and so on\r\n contentAndLabels.add(new Pair<>(transposed, lineCount++ / 100));\r\n }\r\n\r\n //Randomize and do a train/test split:\r\n Collections.shuffle(contentAndLabels, new Random(12345));\r\n\r\n int nTrain = 450; //75% train, 25% test\r\n int trainCount = 0;\r\n int testCount = 0;\r\n for (Pair<String, Integer> p : contentAndLabels) {\r\n //Write output in a format we can read, in the appropriate locations\r\n File outPathFeatures;\r\n File outPathLabels;\r\n if (trainCount < nTrain) {\r\n outPathFeatures = new File(featuresDirTrain, trainCount + \".csv\");\r\n outPathLabels = new File(labelsDirTrain, trainCount + \".csv\");\r\n trainCount++;\r\n } else {\r\n outPathFeatures = new File(featuresDirTest, testCount + \".csv\");\r\n outPathLabels = new File(labelsDirTest, testCount + \".csv\");\r\n testCount++;\r\n }\r\n\r\n FileUtils.writeStringToFile(outPathFeatures, p.getFirst());\r\n FileUtils.writeStringToFile(outPathLabels, p.getSecond().toString());\r\n }\r\n */\r\n }",
"public List<Dataset> getDatasets();",
"private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}",
"public void fetchData()\n {\n FetchingDataTask fetchingDataTask = new FetchingDataTask();\n fetchingDataTask.execute();\n }",
"void distributedSingleModeLoading( File dataPath, File resultsPath, int scenarioNumber );",
"private void downloadStudentData(String uri)\n\t{\n\t\tpb.setVisibility(View.VISIBLE);\n\t\tdb = new DatabaseHandler(EventUploadDownload.this, getSchoolName());\n\t\tStringRequest request = new StringRequest(uri,\n\t\t\t\tnew Response.Listener<String>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResponse(String response)\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.d(\"response message: \", response);\n\t\t\t\t\t\tString resp = response;\n\t\t\t\t\t\tArrayList<StudentInfo> studentInfoList = Utility\n\t\t\t\t\t\t\t\t.getParsedStudentInfoList(resp);\n\t\t\t\t\t\tdb = new DatabaseHandler(EventUploadDownload.this,\n\t\t\t\t\t\t\t\tgetSchoolName());\n\t\t\t\t\t\tfor (StudentInfo studentInfo : studentInfoList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"hello...\" + studentInfo.getImage_str());\n\t\t\t\t\t\t\tstudentInfo.setIsUploaded(2);\n\t\t\t\t\t\t\tdb.addStudentInfo(studentInfo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\tpb.setVisibility(View.INVISIBLE);\n\t\t\t\t\t}\n\t\t\t\t}, new Response.ErrorListener()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error)\n\t\t\t\t\t{\n\t\t\t\t\t\tToast.makeText(EventUploadDownload.this,\n\t\t\t\t\t\t\t\terror.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tRequestQueue queue = Volley.newRequestQueue(this);\n\t\tqueue.add(request);\n\t}",
"public void loadData(HistogramDataSet dataSet);",
"private static List<List<CSVAttribute[]>> getTrainData(List<CSVAttribute[]> dataset, int numFolds, int labelAttribute){\n\n float partitionRatio = (numFolds - 1) / (float) numFolds;\n int nTrainExamples = (int) (dataset.size() * partitionRatio);\n\n // Shuffle the dataset\n Random random = new Random();\n Collections.shuffle(dataset, random);\n\n List<CSVAttribute[]> trainData = new ArrayList<>();\n List<CSVAttribute[]> ulTestData = new ArrayList<>();\n List<CSVAttribute[]> lTestData = new ArrayList<>();\n\n // add to train data set\n for (int i = 0; i <= nTrainExamples; i++) {\n trainData.add(dataset.get(i));\n }\n\n // add to test data set\n for (int j = nTrainExamples + 1; j < dataset.size(); j++) {\n\n // defensive copy\n CSVAttribute[] row = dataset.get(j);\n CSVAttribute[] newRow = new CSVAttribute[row.length];\n for (int k = 0; k < newRow.length; k++) {\n newRow[k] = (CSVAttribute) row[k].clone();\n }\n\n // remove labels\n newRow[labelAttribute].setValue(\"null\");\n\n lTestData.add(row);\n ulTestData.add(newRow);\n }\n\n List<List<CSVAttribute[]>> combined = new ArrayList<>();\n combined.add(trainData);\n combined.add(ulTestData);\n combined.add(lTestData);\n\n return combined;\n }",
"public void PrepareDataset(TweetPreprocessor preprocessor, String dataset)\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n\t\ttry\n {\n System.out.println(\"Preparing Datasets ...\");\n //PrepareAll(preprocessor,dataset);\n\n\t\t\tSystem.out.println(\"Saving work to Database ..\");\n\t\t\tsaveTextOutput(Dataset + \"data_text.csv\", \"d_text\");\n\t\t\tsaveTextOutput(Dataset + \"data_feature.csv\", \"d_feature\");\n\t\t\tsaveTextOutput(Dataset + \"data_complex.csv\", \"d_complex\");\n\t\t\t//saveLexiconOuput(Dataset + \"data_lexicon.csv\",true);\n\t\t\tSystem.out.println(\"Datasets ready for training .%.\");\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"com.google.cloud.automl.v1beta1.Dataset getDataset();",
"private void downloadStudentList(){\n\t\t// wrzucenie poprzedniej listy (newlist) do oldList \n\t\toldStudentList = newStudentList;\n\t\t\n\t\t// sprawdzenie czy adresy/sciezki sa podane \n\t\tif(urlAdress.equals(\"\") && filePath.equals(\"\")){\n\t\t\tthrow new CrawlerException(\"Nie podano adresu URL i �cie�ki do pliku!\");\n\t\t}\n\t\t// pobranie nowej listy studentow do newList\n\t\tif(!urlAdress.equals(\"\")){\n\t\t\tdownloadFromUrl();\n\t\t}else if(!filePath.equals(\"\")){\n\t\t\tdownloadFromFile();\n\t\t}\n\t}",
"private void loadDataset(int datasetId) {\r\n SelectionManager.Busy_Task(true, true);\r\n DivaClientService.registerMainDataset(datasetId,\r\n new AsyncCallback<DatasetInformation>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Selection_Manager.connError();\r\n }\r\n\r\n @Override\r\n public void onSuccess(DatasetInformation datasetInfos) {\r\n init = true;\r\n reload = false;\r\n loadingAnalysis(datasetInfos);\r\n }\r\n });\r\n }",
"private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"[email protected]\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }",
"private static Dataset<Row> loadbetaFeed() {\n\t\tconf.set(TableInputFormat.INPUT_TABLE, RSSFeedUtils.betatable);\n\t\tconf.set(TableInputFormat.SCAN_COLUMN_FAMILY, RSSFeedUtils.hbaseTab_cf);\n\t\t\n\t\tString feedCols = RSSFeedUtils.hbaseTab_cf + \":rssFeed \" + RSSFeedUtils.hbaseTab_cf + \":title \" + RSSFeedUtils.hbaseTab_cf + \":articleLink \" \n\t\t\t\t\t\t+ RSSFeedUtils.hbaseTab_cf + \":description \" + RSSFeedUtils.hbaseTab_cf + \":articleDate \" + RSSFeedUtils.hbaseTab_cf + \":categories\";\n\t\t\n\t\tconf.set(TableInputFormat.SCAN_COLUMNS, feedCols);\n\t\tJavaPairRDD<ImmutableBytesWritable, Result> feedPairRDD = jsc.newAPIHadoopRDD(conf, TableInputFormat.class, ImmutableBytesWritable.class, Result.class);\n\t\t\n\t\tJavaRDD<DatasetBean> feedRDD = feedPairRDD.map(new Function<Tuple2<ImmutableBytesWritable,Result>, DatasetBean>() {\n\t\t\t\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\tpublic DatasetBean call(Tuple2<ImmutableBytesWritable, Result> arg0) throws Exception {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tResult r = arg0._2;\n\t\t\t\t//keylist.add(new Delete(r.getRow())); \n\t\t\t\t\n\t\t\t\tDatasetBean databean = new DatasetBean();\n\t\t\t\tdatabean.setRssFeed(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"rssFeed\"))));\n\t\t\t\tdatabean.setTitle(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"title\"))));\n\t\t\t\tdatabean.setArticleLink(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"articleLink\"))));\n\t\t\t\tdatabean.setDescription(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"description\"))));\n\t\t\t\tdatabean.setCategories(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"categories\"))));\n\t\t\t\tdatabean.setArticleDate(Bytes.toString(r.getValue(Bytes.toBytes(RSSFeedUtils.hbaseTab_cf), Bytes.toBytes(\"articleDate\"))));\n\t\t\t\t\n\t\t\t\treturn databean;\n\t\t\t}\n\t\t});\n\t\t\n\t\tDataset<Row> feeddataset = sparkSession.createDataFrame(feedRDD, DatasetBean.class);\n\t\treturn feeddataset;\n\t}",
"public void load(String datasetPath) throws Exception {\r\n\t\tLOGGER.log(Level.INFO, \"Started parsing and loading of the dataset\");\r\n\t\tLOGGER.config(\"Given dataset location \" + datasetPath);\r\n\t\tdatasetOperations = new DatasetOperations(datasetPath, this);\r\n\t\tdatasetOperations.traverseAndLoad(datasetPath);\r\n\t\tpubmedDump.dumpRemaining(); // To dump the last values\r\n\t\tLOGGER.log(Level.INFO, \"Completed parsing and loading of the dataset\");\r\n\t\tLOGGER.log(Level.INFO, \"Pruning the graphs for better performance\");\r\n\t\tgraphDelegator.removeNonPubmedCentralNodes();\r\n\t\tLOGGER.log(Level.INFO, \"Completed Dataset loading and Graph creation\");\r\n\t}",
"private boolean initializeDataset(){\n this.dataset = new Dataset(this.users.size(),this.recipes.size());\n //1. Read Dataset\n boolean succesReadDataset = this.dataset.read(this.userMap,this.recipeMap);\n if (!succesReadDataset) return false;\n return true;\n }",
"public AzureDataLakeStoreDataset() {\n }",
"public static void loadDataset(DatasetGraphTDB dsg, List<String> urls, boolean showProgress, boolean collectStats) {\n BulkStreamRDF dest = destinationDataset(dsg, showProgress, collectStats);\n loadQuads$(dest, urls);\n }",
"private DatasetBean createDatasetBean(DataSet dataset) {\n\n DatasetBean newDatasetBean = new DatasetBean();\n FileInfoDssDTO[] filelist = dataset.listFiles(\"original\", true);\n String download_link = filelist[0].getPathInDataSet();\n String[] splitted_link = download_link.split(\"/\");\n String fileName = splitted_link[splitted_link.length - 1];\n newDatasetBean.setCode(dataset.getCode());\n newDatasetBean.setName(fileName);\n StringBuilder dssPath =\n new StringBuilder(dataset.getDataSetDss().tryGetInternalPathInDataStore());\n dssPath.append(\"/\");\n dssPath.append(filelist[0].getPathInDataSet());\n newDatasetBean.setDssPath(dssPath.toString());\n newDatasetBean.setType(dataset.getDataSetTypeCode());\n newDatasetBean.setFileSize(filelist[0].getFileSize());\n // TODO\n // newDatasetBean.setRegistrator(registrator);\n newDatasetBean.setRegistrationDate(dataset.getRegistrationDate());\n\n newDatasetBean.setParent(null);\n newDatasetBean.setRoot(newDatasetBean);\n\n newDatasetBean.setSelected(false);\n\n\n if (filelist[0].isDirectory()) {\n newDatasetBean.setDirectory(filelist[0].isDirectory());\n String folderPath = filelist[0].getPathInDataSet();\n FileInfoDssDTO[] subList = dataset.listFiles(folderPath, false);\n datasetBeanChildren(newDatasetBean, subList, dataset);\n }\n\n // TODO\n // this.fileSize = fileSize;\n // this.humanReadableFileSize = humanReadableFileSize;\n // this.dssPath = dssPath;\n return newDatasetBean;\n }",
"private DataSet toDataSet(final Collection<TrainingEntry<Login>> trainingDataSet) {\n final int numTimestampsDifferences = getNumberOfInputFeatures(trainingDataSet);\n final IterableRecordReader recordReader = new IterableRecordReader(trainingDataSet);\n return new RecordReaderDataSetIterator(recordReader, trainingDataSet.size(), numTimestampsDifferences, NUM_CATEGORIES).next();\n }",
"private IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\tFile file = new File(\"src/test/resources/lote.xml\");\r\n\t\tIDataSet dataSet = new FlatXmlDataSet(file);\r\n\t\treturn dataSet;\r\n\t}",
"private static Data getDataObject(final String dataset) throws IOException {\n \n final Data data = Data.create(dataset, StandardCharsets.UTF_8, ';');\n \n // Read generalization hierachies\n final FilenameFilter hierarchyFilter = new FilenameFilter() {\n @Override\n public boolean accept(final File dir, final String name) {\n if (name.matches(dataset.substring(dataset.lastIndexOf(\"/\") + 1, dataset.length() - 4) + \"_hierarchy_(.)+.csv\")) {\n return true;\n } else {\n return false;\n }\n }\n };\n \n final File testDir = new File(dataset.substring(0, dataset.lastIndexOf(\"/\")));\n final File[] genHierFiles = testDir.listFiles(hierarchyFilter);\n final Pattern pattern = Pattern.compile(\"_hierarchy_(.*?).csv\");\n \n for (final File file : genHierFiles) {\n final Matcher matcher = pattern.matcher(file.getName());\n if (matcher.find()) {\n \n final CSVHierarchyInput hier = new CSVHierarchyInput(file, StandardCharsets.UTF_8, ';');\n final String attributeName = matcher.group(1);\n \n // use all found attribute hierarchies as qis\n data.getDefinition().setAttributeType(attributeName, Hierarchy.create(hier.getHierarchy()));\n \n }\n }\n \n return data;\n }",
"public void download() {\n }",
"private void startMovieDownload() {\n String sortOrder = AppPrefs.getInstance(this).getLastSortOrder();\n if (null == sortOrder) {\n sortOrder = SortBy.getDefaultSortOrder();\n }\n downloadData(sortOrder);\n }",
"private KingDataset() {\r\n\t\tString filename = \"bin\" + File.separator + \"KingDataset.bin\";\r\n\t\t\r\n\t\t// Prepare our array based on the dataset filename\r\n\t\tvalues = new byte[(int)new File(filename).length()];\r\n\t\t\r\n\t\t// Read the king dataset\r\n\t\ttry {\r\n\t\t\tFileInputStream input = new FileInputStream(filename);\r\n\t\t\tinput.read(values);\r\n\t\t\tinput.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void PrepareTestDataset(String dataset, boolean islabeled)\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n\t\tSystem.out.println(\"Preparing Test Datasets ...\");\n\t\ttry {\n\t\t\tPrepareAll(dataset,islabeled);\n\t\t\tSystem.out.println(\"Test Dataset is saved & ready for Training ..\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n counter= new AtomicInteger(0);\n }",
"public void postOpenInit() {\n logger = Logger.getLogger(Dataset.class);\n clear();\n for (DataPoint point : persistentData) {\n addPoint(point);\n }\n }",
"public MetaInfoReader(String dataset) {\n this(dataset, \"../output/tracker_data/\");\n }",
"public ClsNodeDocument[] Download (String transID, String dataFlow, String[] names) throws Exception {\r\n INodeFileCabin cabinDB = DBManager.GetNodeFileCabin(this.LoggerName);\r\n ClsNodeDocument[] temp = null;\r\n if (names != null && names.length > 0) {\r\n temp = new ClsNodeDocument[names.length];\r\n for (int i = 0; i < names.length; i++) {\r\n temp[i] = new ClsNodeDocument();\r\n temp[i].setName(names[i]);\r\n }\r\n }\r\n return cabinDB.GetDocuments(transID, dataFlow, temp);\r\n }",
"public void download() {\n // Attempt to perform the download\n Log.d(TAG, \"download\");\n try {\n // Open a connection to the PHP server.\n // Get the response code\n // Open an input stream as well as a buffered input reader\n try {\n // if (responseCode == HttpURLConnection.HTTP_OK) {\n // Attempt to parse the data from the server\n\n /* Add the crumb objects, but only add the coordinates, the rating,\n * the name, and the number of visits to the local database structure.\n */\n\n // Perhaps add a post method to add the crumbs to the hashmap\n\n // Post: Notify the UI thread that the markers are ready to be loaded.\n\n } catch (Exception e) {\n\n } finally {\n // Close the input streams\n }\n } catch(Exception e) {\n\n }\n }",
"void init(Dataset ds, Session sess);",
"public static void DatasetAndQueryToFiles(double d, double e) throws IOException {\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch1.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch2.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch3.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch4.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch5.dat\");\r\n\t\tReadInDataset.readDATFile(\"C:/Users/pigko/Downloads/driftdataset/batch6.dat\");\r\n\t\tReadInDataset.findMinAndMax();\r\n\t\tReadInDataset.finalizeDataset();\r\n\t\tReadInDataset.writeToFile2(\"FinalDataset\"+\".arff\",ReadInDataset.finalDataset); //write down the used dataset\r\n\t\tquery=assignScoreToQueries(); //assign the scores to queries\r\n\t\ttrainQueries=takeTrainingQuerySet(query,d);\r\n\t\ttestQueries=takeTestingQuerySet(query,e,d);\r\n\t\tscoreToFile(Queries.NumberOfDimensions, trainQueries, \"TrainScoreSet.arff\"); //write down the queries with the scores\r\n\t\tscoreToFile(Queries.NumberOfDimensions, testQueries, \"TestScoreSet.arff\"); //write down the queries with the scores\r\n\t//\tqueryAndDataToCSV(); // this produces a graph with both queries and the dataset, not needded right now\r\n\t\twriteQueriesToCSV(testQueries, \"test\"); \r\n\t\twriteQueriesToCSV(trainQueries, \"train\"); \r\n\t}",
"protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This is a workaround for the gnavi API.\n // Gnavi API only allows max 1000 records for output.\n // Therefore, we divide records into smaller pieces\n // by prefectures and categories.\n for (String prefecture: prefectures) {\n for (String category: categories) {\n logger.debug(\"Prefecture: {}\", prefecture);\n logger.debug(\"Category: {}\", category);\n getVenues(client, prefecture, category, 1);\n }\n }\n }",
"public void downloadData() {\n\t\tint start = millis();\n\t\tdthread = new DaysimDownloadThread();\n\t\tdthread.start();\n\t\tdataready = false;\n\t\twhile(!dataready) {\n\t\t\tif((millis() - start)/175 < 99) {\n\t\t\t\tLightMaskClient.setMainText(\"\\n\\n\" + \"Downloading: \" + (millis() - start)/175 + \"% completed\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLightMaskClient.setMainText(\"Downloading: \" + 99 + \"% completed\");\n\t\t\t}\n\t\t\tdelay(100);\n\t\t}\n\t\tdthread.quit();\n\t\tLightMaskClient.setMainText(\"\\n\\n\" + \"Downloading: 100% completed\");\n\t\tToolkit.getDefaultToolkit().beep();\n\t\tdelay(1000); \n\t\tLightMaskClient.setMainText(\"Please disconnect the Daysimeter\");\n\t\tLightMaskClient.dlComplete = true;\n\t\t//setup the download for processing\n\t\tfor(int i = 0; i < EEPROM.length; i++) {\n\t\t\tEEPROM[i] = bytefile1[i] & 0xFF;\n\t\t}\n\t \n\t\tfor(int i = 0; i < header.length; i++) {\n\t\t\theader[i] = bytefile2[i] & 0xFF;\n\t\t}\n\t\t\n\t\tasciiheader = MakeList(header);\n\t\tisnew = asciiheader[2].contains(\"daysimeter\");\n\t\tisUTC = asciiheader[1].contains(\"1.3\") || asciiheader[1].contains(\"1.4\")\n\t\t\n\t\torganizeEEPROM();\n\t\tprocessData();\n\t\tsavefile();\n\t}",
"public void TrainDataset(){\n\t\ttry{\n\t\t\t//Testing delegate method\n\t\t\tMessageController.logToConsole(\"Hey, I'm from train button\");\n\t\t\t\n\t\t\t//Pass in the real training dataset\n\t\t\tfindSuitableK(new String[]{\"Hello\", \"World\"});\n\t\t\t\n\t\t\t//Pass in the 'k' and 'query string'\n\t\t\tfindKNN(2, \"anything\");\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tthrow ex;\n\t\t}\n\t\tfinally{\n\t\t\t\n\t\t}\n\t}",
"public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}",
"@DataProvider(name=\"dataset\")\r\n\tpublic static Object[][] getdata() throws IOException{\r\n\t\tObject [][] ob= new IO().getdataset(\"./dataset.csv\");\t\r\n\treturn ob;\r\n\t}",
"private void setCurrentDownload(RqDownload dl)\n {\n download = dl;\n File f = attachRqChannel.responder.fetchFileById(dl.getId());\n try {\n fileSplitter = new FileSplitter(f, download);\n data = fileSplitter.getData();\n bbw.put(data.buildDatas());\n } catch (IOException e) {\n e.printStackTrace(System.err);\n }\n }",
"@Override\r\n\tpublic void download() {\n\t\t\r\n\t}",
"WebCrawlerData retrieve(String url);",
"public void download() {\r\n\t\t\ttThread = new Thread(this);\r\n\t\t\ttThread.start();\r\n\t\t}",
"public final EObject ruleDataset() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_dataPath_1_0=null;\n Token lv_separator_2_0=null;\n Token otherlv_3=null;\n\n\n \tenterRule();\n\n try {\n // InternalMLRegression.g:401:2: ( (otherlv_0= 'import' ( (lv_dataPath_1_0= RULE_STRING ) ) ( (lv_separator_2_0= RULE_STRING ) )? otherlv_3= ';' ) )\n // InternalMLRegression.g:402:2: (otherlv_0= 'import' ( (lv_dataPath_1_0= RULE_STRING ) ) ( (lv_separator_2_0= RULE_STRING ) )? otherlv_3= ';' )\n {\n // InternalMLRegression.g:402:2: (otherlv_0= 'import' ( (lv_dataPath_1_0= RULE_STRING ) ) ( (lv_separator_2_0= RULE_STRING ) )? otherlv_3= ';' )\n // InternalMLRegression.g:403:3: otherlv_0= 'import' ( (lv_dataPath_1_0= RULE_STRING ) ) ( (lv_separator_2_0= RULE_STRING ) )? otherlv_3= ';'\n {\n otherlv_0=(Token)match(input,19,FOLLOW_11); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getDatasetAccess().getImportKeyword_0());\n \t\t\n // InternalMLRegression.g:407:3: ( (lv_dataPath_1_0= RULE_STRING ) )\n // InternalMLRegression.g:408:4: (lv_dataPath_1_0= RULE_STRING )\n {\n // InternalMLRegression.g:408:4: (lv_dataPath_1_0= RULE_STRING )\n // InternalMLRegression.g:409:5: lv_dataPath_1_0= RULE_STRING\n {\n lv_dataPath_1_0=(Token)match(input,RULE_STRING,FOLLOW_12); \n\n \t\t\t\t\tnewLeafNode(lv_dataPath_1_0, grammarAccess.getDatasetAccess().getDataPathSTRINGTerminalRuleCall_1_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getDatasetRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"dataPath\",\n \t\t\t\t\t\tlv_dataPath_1_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t\t\t\t\n\n }\n\n\n }\n\n // InternalMLRegression.g:425:3: ( (lv_separator_2_0= RULE_STRING ) )?\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0==RULE_STRING) ) {\n alt7=1;\n }\n switch (alt7) {\n case 1 :\n // InternalMLRegression.g:426:4: (lv_separator_2_0= RULE_STRING )\n {\n // InternalMLRegression.g:426:4: (lv_separator_2_0= RULE_STRING )\n // InternalMLRegression.g:427:5: lv_separator_2_0= RULE_STRING\n {\n lv_separator_2_0=(Token)match(input,RULE_STRING,FOLLOW_6); \n\n \t\t\t\t\tnewLeafNode(lv_separator_2_0, grammarAccess.getDatasetAccess().getSeparatorSTRINGTerminalRuleCall_2_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getDatasetRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"separator\",\n \t\t\t\t\t\tlv_separator_2_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t\t\t\t\n\n }\n\n\n }\n break;\n\n }\n\n otherlv_3=(Token)match(input,13,FOLLOW_2); \n\n \t\t\tnewLeafNode(otherlv_3, grammarAccess.getDatasetAccess().getSemicolonKeyword_3());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public Dataset getDataset(DatasetType dataType){\n switch(dataType){\n case TEST:\n return test;\n case TRAINING:\n return training;\n default:\n return null;\n }\n }",
"public DataSet(){\r\n\t\tdocs = Lists.newArrayList();\r\n//\t\t_docs = Lists.newArrayList();\r\n\t\t\r\n\t\tnewId2trnId = HashBiMap.create();\r\n\t\t\r\n\t\tM = 0;\r\n\t\tV = 0;\r\n\t}",
"public static void main(String[] args) throws Exception {\n DataSet houseVotes = DataParser.parseData(HouseVotes.filename, HouseVotes.columnNames, HouseVotes.dataTypes, HouseVotes.ignoreColumns, HouseVotes.classColumn, HouseVotes.discretizeColumns);\n DataSet breastCancer = DataParser.parseData(BreastCancer.filename, BreastCancer.columnNames, BreastCancer.dataTypes, BreastCancer.ignoreColumns, BreastCancer.classColumn, HouseVotes.discretizeColumns);\n DataSet glass = DataParser.parseData(Glass.filename, Glass.columnNames, Glass.dataTypes, Glass.ignoreColumns, Glass.classColumn, Glass.discretizeColumns);\n DataSet iris = DataParser.parseData(Iris.filename, Iris.columnNames, Iris.dataTypes, Iris.ignoreColumns, Iris.classColumn, Iris.discretizeColumns);\n DataSet soybean = DataParser.parseData(Soybean.filename, Soybean.columnNames, Soybean.dataTypes, Soybean.ignoreColumns, Soybean.classColumn, Soybean.discretizeColumns);\n \n /*\n * The contents of the DataSet are not always random.\n * You can shuffle them using Collections.shuffle()\n */\n \n Collections.shuffle(houseVotes);\n Collections.shuffle(breastCancer);\n Collections.shuffle(glass);\n Collections.shuffle(iris);\n Collections.shuffle(soybean);\n /*\n * Lastly, you want to split the data into a regular dataset and a testing set.\n * DataSet has a function for this, since it gets a little weird.\n * This grabs 10% of the data in the dataset and sets pulls it out to make the testing set.\n * This also means that the remaining 90% in DataSet can serve as our training set.\n */\n\n DataSet houseVotesTestingSet = houseVotes.getTestingSet(.1);\n DataSet breastCancerTestingSet = breastCancer.getTestingSet(.1);\n DataSet glassTestingSet = glass.getTestingSet(.1);\n DataSet irisTestingSet = iris.getTestingSet(.1);\n DataSet soybeanTestingSet = soybean.getTestingSet(.1);\n \n //KNN\n //House Votes\n System.out.println(HouseVotes.class.getSimpleName());\n KNN knn = new KNN(houseVotes, houseVotesTestingSet, HouseVotes.classColumn, 3);\n String[] knnHouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n knnHouseVotes[i] = knn.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(knnHouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnHouseVotes[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnHouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n \n //Breast Cancer\n System.out.println(BreastCancer.class.getSimpleName());\n knn = new KNN(breastCancer, breastCancerTestingSet, BreastCancer.classColumn, 3);\n String[] knnBreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n knnBreastCancer[i] = knn.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(knnBreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnBreastCancer[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnBreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n \n //Glass\n System.out.println(Glass.class.getSimpleName());\n knn = new KNN(glass, glassTestingSet, Glass.classColumn, 3);\n String[] knnGlass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n knnGlass[i] = knn.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(knnGlass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnGlass[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnGlass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n \n //Iris\n System.out.println(Iris.class.getSimpleName());\n knn = new KNN(iris, irisTestingSet, Iris.classColumn, 3);\n String[] knnIris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n knnIris[i] = knn.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(knnIris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnIris[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnIris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n \n //Soybean\n System.out.println(Soybean.class.getSimpleName());\n knn = new KNN(soybean, soybeanTestingSet, Soybean.classColumn, 3);\n String[] knnSoybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n knnSoybean[i] = knn.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(knnSoybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnSoybean[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnSoybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n \n \n /*\n * Lets setup ID3:\n * DataSet, TestSet, column with the class categorization. (republican, democrat in this case)\n */\n\n System.out.println(HouseVotes.class.getSimpleName());\n ID3 id3 = new ID3(houseVotes, houseVotesTestingSet, HouseVotes.classColumn);\n String[] id3HouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n id3HouseVotes[i] = id3.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(id3HouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3HouseVotes[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3HouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n\n System.out.println(BreastCancer.class.getSimpleName());\n id3 = new ID3(breastCancer, breastCancerTestingSet, BreastCancer.classColumn);\n String[] id3BreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n id3BreastCancer[i] = id3.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(id3BreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3BreastCancer[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3BreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Glass.class.getSimpleName());\n id3 = new ID3(glass, glassTestingSet, Glass.classColumn);\n String[] id3Glass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n id3Glass[i] = id3.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(id3Glass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Glass[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Glass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Iris.class.getSimpleName());\n id3 = new ID3(iris, irisTestingSet, Iris.classColumn);\n String[] id3Iris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n id3Iris[i] = id3.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(id3Iris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Iris[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Iris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Soybean.class.getSimpleName());\n id3 = new ID3(soybean, soybeanTestingSet, Soybean.classColumn);\n String[] id3Soybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n id3Soybean[i] = id3.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(id3Soybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Soybean[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Soybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n }",
"public void recv_from_crawler() throws ClassNotFoundException\r\n {\n\r\n\r\n\t\tbyte[] yourBytes_url= new byte[10000];\r\n\r\n\r\n\r\n\t\t//10000 is assumed to be max url size\r\n\t\tStatus status = null;\r\n\t\ttry{\r\n\t\tstatus=MPI.COMM_WORLD.Recv(yourBytes_url,0,10000,MPI.BYTE,0,MPI.ANY_TAG);\r\n\t\t}\r\n\t\tcatch(MPIException e)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t // System.out.println(\"now indexer start........\");\r\n\r\n\t\tif(status.tag==1)\r\n\t\t{\r\n\t\t\tis_Recrawling=true;\r\n\t\t\tif(first)\r\n\t\t\t{\r\n\t\t\t\tfirst=false;\r\n\t\t\t\tSystem.out.println(\"reindexing------------\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\r\n\t\t//Create object from bytes\r\n\t\tByteArrayInputStream bis = new ByteArrayInputStream(yourBytes_url);\r\n\t\tObjectInput in = null;\r\n\t\ttry {\r\n\t\t in = new ObjectInputStream(bis);\r\n\t\t url = (URL) in.readObject();\r\n\t\t// System.out.println(\"url_from_crawler 1 ----> \"+url.toString());\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t try {\r\n\t\t if (in != null) {\r\n\r\n\t\t in.close();\r\n\t\t }\r\n\t\t } catch (IOException ex) {\r\n\t\t // ignore close exception\r\n\t\t }\r\n\t\t}\r\n\r\n\r\n\r\n\t\t//get_document_from_db();\r\n\r\n }",
"public Dataset openTDB(String directory){\n Dataset dataset = TDBFactory.createDataset(directory);\n return dataset;\n}",
"public void loadDownloadLocations(final Layer model, final Boolean showDownload) {\r\n \t\tview.showDownloadsLoading();\r\n \t\tif(model != null) {\r\n \t\t\tnodeService.getNodeLocations(NodeType.LAYER, model.getId(), new AsyncCallback<String>() {\r\n \t\t\t\t@Override\r\n \t\t\t\tpublic void onSuccess(String pagedResultString) {\t\t\t\t\r\n \t\t\t\t\tList<FileDownload> downloads = new ArrayList<FileDownload>();\t\t\t\t\t\t\r\n \t\t\t\t\ttry {\t\t\t\t\t\t\t\r\n \t\t\t\t\t\tPagedResults pagedResult = nodeModelCreator.createPagedResults(pagedResultString);\r\n \t\t\t\t\t\tif(pagedResult != null) {\r\n \t\t\t\t\t\t\tList<String> results = pagedResult.getResults();\r\n \t\t\t\t\t\t\tfor(String fileDownloadString : results) {\r\n \t\t\t\t\t\t\t\tDownloadLocation downloadLocation = nodeModelCreator.createDownloadLocation(fileDownloadString);\t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tif(downloadLocation != null && downloadLocation.getPath() != null) { \r\n \t\t\t\t\t\t\t\t\tFileDownload dl = new FileDownload(downloadLocation.getPath(), \"Download \" + model.getName(), downloadLocation.getMd5sum(), downloadLocation.getContentType());\r\n \t\t\t\t\t\t\t\t\tdownloads.add(dl);\r\n \t\t\t\t\t\t\t\t}\t\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} catch (ForbiddenException ex) {\r\n \t\t\t\t\t\t// if user hasn't signed an existing use agreement, a ForbiddenException is thrown. Do not alert user to this \r\n\t\t\t\t\t\tonFailure(null);\r\n \t\t\t\t\t} catch (RestServiceException ex) {\r\n \t\t\t\t\t\tDisplayUtils.handleServiceException(ex, placeChanger, authenticationController.getLoggedInUser());\r\n \t\t\t\t\t\tonFailure(null);\t\t\t\t\t\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\t\t\t\t\r\n \t\t\t\t\tview.setLicensedDownloads(downloads);\r\n \t\t\t\t\t\r\n \t\t\t\t\t// show download if requested\r\n \t\t\t\t\tif(showDownload != null && showDownload == true) {\r\n \t\t\t\t\t\tif(downloadAttempted()) {\r\n \t\t\t\t\t\t\tview.showDownload();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t@Override\r\n \t\t\t\tpublic void onFailure(Throwable caught) {\t\t\t\t\r\n \t\t\t\t\tview.setDownloadUnavailable();\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t}\r\n \t}",
"DatasetFile getDatasetFile();",
"public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMap<String, Map<String,Double>>();\n\t\tproductRatings = new HashMap<String, List<Double>>();\n\t\treInstanceList = new ArrayList<ReviewInstance>();\n\t\treInstanceMap = new HashMap<String, ReviewInstance>();\n\t}",
"@Override\n @XmlElement(name = \"dataset\")\n public synchronized String getDataset() {\n return dataset;\n }",
"private void downloadData(SQLiteDatabase db){\n DeviceDataManager.downloadDeviceData(db);\n CustomerDataManager.downloadCustomerData(db);\n CheckInTypeDataManager.downloadCheckInTypeData(db);\n CheckInPointDataManager.downloadCheckInPointData(db);\n PhotographerDataManager.downloadPhotographerData(db);\n }",
"@Override\n public void Download(DownloadBatchResult getBatchRes) {\n }",
"private synchronized void loadHistoricData(StockData sd)\r\n {\r\n debug(\"loadHistoricData(\" + sd.getSymbol().getDataSz() + \") called - \");\r\n if (DEMO_MODE)\r\n {\r\n debug(\"loadHistoricData() - is considered to be refreshed - DEMO_MODE\");\r\n }\r\n else\r\n {\r\n\r\n String fileName = getString(\"WatchListTableModule.edit.historic_details_basic_name\") + sd.getSymbol().getDataSz();\r\n //Spawn a new thread on the Util event Thread as to provide a smooth transition\r\n //into our new thread proicessing.and to Load Historic Stock Data\r\n HistoricStockDataLoaderTask downloadTask = new HistoricStockDataLoaderTask(sd);\r\n Timer timer = new Timer(true); // Deamon\r\n timer.schedule(downloadTask, ONE_SECOND);\r\n\r\n if (DEBUG)\r\n {\r\n System.out.println(\"Results from: \" + sd);\r\n System.out.println(\"StockData[\" + sd.getSymbol().getDataSz() + \"] = \" + sd);\r\n }\r\n }\r\n\r\n }",
"@Override\r\n public boolean doLoadTrackersData() {\r\n TrackerManager tManager = TrackerManager.getInstance();\r\n ObjectTracker objectTracker = (ObjectTracker) tManager.getTracker(ObjectTracker.getClassType());\r\n if (objectTracker == null)\r\n return false;\r\n if (mCurrentDataset == null)\r\n mCurrentDataset = objectTracker.createDataSet();\r\n if (mCurrentDataset == null)\r\n return false;\r\n if (!mCurrentDataset.load(mDatasetStrings.get(mCurrentDatasetSelectionIndex), STORAGE_TYPE.STORAGE_APPRESOURCE))\r\n return false;\r\n if (!objectTracker.activateDataSet(mCurrentDataset))\r\n return false;\r\n int numTrackables = mCurrentDataset.getNumTrackables();\r\n for (int count = 0; count < numTrackables; count++) {\r\n Trackable trackable = mCurrentDataset.getTrackable(count);\r\n if (isExtendedTrackingActive())\r\n trackable.startExtendedTracking();\r\n\r\n String name = \"Current Dataset : \" + trackable.getName();\r\n trackable.setUserData(name);\r\n Log.d(LOGTAG, \"UserData:Set the following user data \" + trackable.getUserData());\r\n }\r\n return true;\r\n }",
"public DataStorage getDataStorage();",
"private void fetchData() {\r\n if (fetchDialogDataInBackground != null && fetchDialogDataInBackground.getStatus() != AsyncTask.Status.FINISHED)\r\n fetchDialogDataInBackground.cancel(true);\r\n fetchDialogDataInBackground = new FetchDialogDataInBackground();\r\n fetchDialogDataInBackground.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\r\n }",
"public static void loadDataset(DatasetGraphTDB dsg, InputStream input, Lang lang, boolean showProgress, boolean collectStats) {\n BulkStreamRDF dest = destinationDataset(dsg, showProgress, collectStats);\n loadQuads$(dest, input, lang);\n }",
"private synchronized void initializeData() {\n\n System.out.println(\"En inicializar datos\");\n // Only perform initialization once per app lifetime. If initialization has already been\n // performed, we have nothing to do in this method.\n if (mInitialized) return;\n mInitialized = true;\n\n mExecutors.diskIO().execute(() -> {\n if (isFetchNeeded()) {\n System.out.println(\"Se necesita actualizar, fetch is needed\");\n startFetchPublicacionService();\n }\n });\n }",
"private void getDatasetsList(final String newName) {\r\n DivaClientService.getAvailableDatasets( new AsyncCallback<TreeMap<Integer, String>>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Window.alert(\"DiVAFiles folder is not available please contact the system administrator\");\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n\r\n @Override\r\n public void onSuccess(TreeMap results) {\r\n for (Object o : results.keySet()) {\r\n int key = (Integer) o;\r\n String str = formatTitle((String) results.get(key));\r\n selectDatasetList.addItem(str);\r\n datasetsNames.put(str, key);\r\n selectDatasetList.setItemSelected(0, true);\r\n tempSelectDatasetList.addItem(str);\r\n tempSelectDatasetList.setItemSelected(0, true);\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n updateSubDsSelectionList(newName);\r\n }\r\n\r\n });\r\n\r\n }",
"private void fillData()\n\t{\n\t\tNightliesAdapter na = new NightliesAdapter( context );\n\t\ttry\n\t\t{\n\t\t\tna.read();\n\n\t\t\t// get Downloads\n\t\t\tCursor cur_dl = na.getDownloadsCursor();\n\t\t\tcur_dl.moveToFirst();\n\n\t\t\t// we will start db records from 1: 0 reserved for our custom record\n\t\t\tint count_dl = cur_dl.getCount() + 1;\n\t\t\tif ( count_dl > 1 )\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[count_dl];\n\t\t\t\tchangelogs = new ChangeLogRecord[count_dl][];\n\n\t\t\t\tDownloadsRecord dr;\n\t\t\t\tlong dateTo = ( new Date() ).getTime();\n\t\t\t\tlong dateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\n\t\t\t\t// empty first record\n\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"next nightly\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = new Date();\n\t\t\t\tdownloads[0] = dr;\n\n\t\t\t\t// get change log data\n\t\t\t\tchangelogs[0] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\tfor ( int i = 1; i < count_dl && !cur_dl.isAfterLast(); i++ )\n\t\t\t\t{\n\t\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\t\tdr.filename = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_FILENAME ) );\n\t\t\t\t\tdr.type = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_TYPE ) );\n\t\t\t\t\tdr.md5sum = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_MD5SUM ) );\n\t\t\t\t\tdr.size = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_SIZE ) );\n\t\t\t\t\tdateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\t\t\t\t\tdr.date_added = new Date( dateFrom );\n\t\t\t\t\tdownloads[i] = dr;\n\n\t\t\t\t\t// get change log data\n\t\t\t\t\tchangelogs[i] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\t\tdateTo = dateFrom;\n\t\t\t\t\tcur_dl.moveToNext();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t\t// no records found\n\t\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"No Records found, please refresh\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = null;\n\t\t\t\tdownloads[0] = dr;\n\t\t\t}\n\t\t}\n\t\tcatch ( SQLException e )\n\t\t{\n\t\t\t// data base does not exist or cannot be opened for read\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tcatch ( CursorIndexOutOfBoundsException e )\n\t\t{\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif ( na != null )\n\t\t\t{\n\t\t\t\tna.close();\n\t\t\t}\n\t\t}\n\t}",
"private static void generateDatasets(int time_span, int time_granularity) {\n\n String[] city = {\n \"dm\", //Des Moines\n \"bo\", //Boston\n \"sf\" //San Francisco\n };\n\n double[] gridLength = { //relates (mostly) to number of agents\n 10,\n 30,\n 50,\n 100,\n 350,\n 500,\n 850,\n 1000,\n 1500,\n 2000,\n };\n\n double[] clusterDiv = { //multiply grid length by this and plug into radius in order for this to be number of clusters\n 1,\n 2,\n 4,\n 8,\n 16,\n 32,\n 64,\n 128,\n 256,\n 512,\n 1024\n };\n\n final int MIN_DEV = 2; final int MAX_DEV = 6; //minimum and maximum amount of devices per house to generate files for\n final int NUM_GRID_SIZES = 5; //number of different grid sizes to generate from the list above, some of the larger problems might be to big for some computers to handle\n for(int i = 0; i < city.length; i++) { // for each city\n for(int j = 0; j < NUM_GRID_SIZES; j++) { //for each grid size\n\n Topology topo = generateTopology(i, gridLength[j], 1);\n for(int d = MIN_DEV; d <= MAX_DEV; d++) {\n String fileName = \"datasets/\" + city[i]\n + \"_\" + topo.getNumAgents()\n + \"_\" + topo.getNumClusters()\n + \"_\" + d;\n generateSHDSInstances(fileName, d, topo, time_span, time_granularity);\n\n if(d == MAX_DEV) {\n Topology temp = topo;\n for (int k = 2; temp != null && k < clusterDiv.length; k++) {\n temp = generateTopology(i, gridLength[j], clusterDiv[k]);\n if (temp == null) continue; // if num_agents < agents_per_cluster then stop\n else topo = temp;\n }\n fileName = \"datasets/\" + city[i]\n + \"_\" + topo.getNumAgents()\n + \"_\" + topo.getNumClusters()\n + \"_\" + d;\n generateSHDSInstances(fileName, d, topo, time_span, time_granularity);\n }\n }\n }\n }\n }",
"public void downloadData(final String tripId, final String username) {\n HashMap<String, String> map = new HashMap<>();\n map.put(db.KEY_IS_BEGIN_DAY, \"false\");\n map.put(db.KEY_IS_LOAD_VERIFIED, \"false\");\n map.put(db.KEY_IS_END_DAY, \"false\");\n db.addData(db.LOCK_FLAGS, map);\n Chain chain = new Chain(new Chain.Link() {\n @Override\n public void run() {\n go();\n }\n });\n chain.setFail(new Chain.Link() {\n @Override\n public void run() throws Exception {\n fail();\n }\n });\n chain.add(new Chain.Link() {\n @Override\n public void run() {\n TripHeader.load(SettingsActivity.this, tripId, db);\n LoadDelivery.load(SettingsActivity.this, tripId, db);\n ArticleHeaders.load(SettingsActivity.this, tripId, db);\n CustomerHeaders.load(SettingsActivity.this, tripId, db);\n VisitList.load(SettingsActivity.this, tripId, db);\n Messages.load(SettingsActivity.this, username, db);\n CustomerDelivery.load(SettingsActivity.this, tripId, db);\n /*ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());*/\n }\n });\n chain.add(new Chain.Link() {\n @Override\n public void run() {\n /*TripHeader.load(LoginActivity.this,tripId, db);\n LoadDelivery.load(LoginActivity.this,tripId, db);\n ArticleHeaders.load(LoginActivity.this, tripId, db);\n CustomerHeaders.load(LoginActivity.this, tripId, db);\n VisitList.load(LoginActivity.this,tripId, db);\n Messages.load(LoginActivity.this,username,db);*/\n ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());\n OrderReasons.loadData(getApplicationContext());\n }\n });\n chain.start();\n }",
"private void saveData() {\n\t\tdataSaver.save(data);\n\t}",
"private Dataset getDataset()\n throws XMLParsingException, MissingParameterValueException,\n InvalidParameterValueException, OGCWebServiceException {\n\n Element datasetElement = (Element) XMLTools.getRequiredNode( getRootElement(), PRE_WPVS + \"Dataset\", nsContext );\n Dataset dataset = parseDataset( datasetElement, null, null, null );\n\n return dataset;\n }",
"private static List<List<byte[]>> prepareDataForTest(int partitionSize, String path){\n\t\tByteArrayDataPreparator dp = new ByteArrayDataPreparator(path);\n\t\treturn dp.getPartitionedData(partitionSize);\n\t}",
"public void updateDataset(Dataset dataset, User user) {\n // get current state of the report\n Report report = ReportingMechanism.getInstance().getReport();\n // calculate completeness\n float completeness = this.datasetPerformance.getCompletenessPercentage();\n // calculate number of users\n int numberOfUsers = this.datasetPerformance.getNumberOfUserAssigned();\n\n JsonObject reportObject = report.getJsonObject();\n JsonArray datasets = (JsonArray) reportObject.get(\"datasets\");\n Iterator<JsonElement> datasetIterator = datasets.iterator();\n while (datasetIterator.hasNext()) {\n JsonObject datasetObj = (JsonObject) (datasetIterator.next());\n if (datasetObj.get(\"dataset_id\").getAsInt() != dataset.getDatasetID())\n continue;\n // add number of users and completeness to report\n datasetObj.addProperty(\"number_of_users\", numberOfUsers);\n datasetObj.addProperty(\"completeness\", completeness);\n\n // final instance labels part\n JsonArray finalLabels = (JsonArray) datasetObj.get(\"final_instance_labels\");\n ArrayList<String> finalLabelsList = datasetPerformance.getDistributionInstance();\n\n // flush final labels array\n for (int z = finalLabels.size() - 1; z >= 0; z--) {\n finalLabels.remove(z);\n }\n // recreate final labels\n for (int i = 0; i < finalLabelsList.size(); i = i + 2) {\n JsonObject finalLabelObj = new JsonObject();\n finalLabelObj.addProperty(\"instance\", finalLabelsList.get(i));\n finalLabelObj.addProperty(\"percentage\", Double.parseDouble(finalLabelsList.get(i + 1)));\n finalLabels.add(finalLabelObj);\n }\n\n // starting of unique number of instances for each label part\n // -------------------\n\n JsonArray uniqueInstances = (JsonArray) datasetObj.get(\"unique_instance_number_for_each_label\");\n\n // flush unique instance labels array\n for (int z = uniqueInstances.size() - 1; z >= 0; z--) {\n uniqueInstances.remove(z);\n }\n\n // recreate unique instances\n ArrayList<Label> labels = datasetPerformance.getDataset().getClassLabels();\n int labelsSize = labels.size();\n for (int j = 0; j < labelsSize; j++) {\n JsonObject labelObj = new JsonObject();\n int number = datasetPerformance.getNumOfUniqueInstance(labels.get(j));\n labelObj.addProperty(\"label_id\", labels.get(j).getLabelID());\n labelObj.addProperty(\"unique_instance_number\", number);\n uniqueInstances.add(labelObj);\n }\n\n // --------------------------- ending of unique number of instances for each\n // label part\n\n // find current user's userMetric\n UserPerformance userPerformance = null;\n ArrayList<UserPerformance> userPerformances = ReportingMechanism.getInstance().getUserReportMechanism()\n .getUserPerformances();\n int userPerformancesSize = userPerformances.size();\n for (int i = 0; i < userPerformancesSize; i++) {\n if (userPerformances.get(i).getUser().getUserID() == user.getUserID()) {\n userPerformance = userPerformances.get(i);\n break;\n }\n }\n\n // starting of user completeness for datasets in report part\n // -----------------------------------------\n\n JsonArray userCompleteness = (JsonArray) datasetObj.get(\"user_completeness\");\n Iterator<JsonElement> userCompIterator = userCompleteness.iterator();\n // initially if there is no userCompleteness part, create it with user id and\n // percentage properties\n if (!userCompIterator.hasNext()) {\n userPerformancesSize = userPerformances.size();\n for (int i = 0; i < userPerformancesSize; i++) {\n JsonObject completenessObject = new JsonObject();\n completenessObject.addProperty(\"user_id\", userPerformances.get(i).getUser().getUserID());\n completenessObject.addProperty(\"percentage\", 0);\n userCompleteness.add(completenessObject);\n }\n }\n\n // if objects of the userCompleteness exists, find current user and update\n // corresponding properties\n userCompIterator = userCompleteness.iterator();\n boolean isFound = false;\n while (userCompIterator.hasNext()) {\n JsonObject completenessObj = (JsonObject) (userCompIterator.next());\n if (completenessObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n completenessObj.addProperty(\"percentage\", userPerformance.getDatasetCompletenessPer());\n isFound = true;\n }\n }\n\n // if user added in between executions, create and update user's information\n if (!isFound) {\n JsonObject completenessObject = new JsonObject();\n completenessObject.addProperty(\"user_id\", user.getUserID());\n completenessObject.addProperty(\"percentage\", userPerformance.getDatasetCompletenessPer());\n userCompleteness.add(completenessObject);\n }\n\n // -------------------------------------------- ending of user completeness for\n // datasets in report part\n\n // starting of user consistency for datasets in report part\n // ----------------------------------\n\n JsonArray userConsistency = (JsonArray) datasetObj.get(\"user_consistency\");\n Iterator<JsonElement> userConsIterator = userConsistency.iterator();\n // if objects of the userConsistency array is not created then create and add\n // user id and consistency percentages\n if (!userConsIterator.hasNext()) {\n userPerformancesSize = userPerformances.size();\n for (int i = 0; i < userPerformancesSize; i++) {\n JsonObject consistencyObject = new JsonObject();\n consistencyObject.addProperty(\"user_id\", userPerformances.get(i).getUser().getUserID());\n consistencyObject.addProperty(\"consistency_percentages\", 0);\n userConsistency.add(consistencyObject);\n }\n }\n\n // if objects of the userConsistency array has already created then find current\n // user and update it\n userConsIterator = userConsistency.iterator();\n isFound = false;\n while (userConsIterator.hasNext()) {\n JsonObject consistencyObj = (JsonObject) (userConsIterator.next());\n if (consistencyObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n JsonArray users = (JsonArray) reportObject.get(\"users\");\n Iterator<JsonElement> userIterator = users.iterator();\n while (userIterator.hasNext()) {\n JsonObject userObj = (JsonObject) (userIterator.next());\n // if current user is found in all users, update consistency percentage based on\n // all datasets\n if (userObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n consistencyObj.addProperty(\"consistency_percentages\",\n userPerformance.getConsistencyPercentagesForUser(\n ReportingMechanism.getInstance().getAllDatasets()));\n }\n }\n isFound = true;\n }\n }\n\n // if user added in between executions, create and update user's information\n if (!isFound) {\n JsonObject consistencyObject = new JsonObject();\n\n JsonArray users = (JsonArray) reportObject.get(\"users\");\n Iterator<JsonElement> userIterator = users.iterator();\n while (userIterator.hasNext()) {\n JsonObject userObj = (JsonObject) (userIterator.next());\n if (userObj.get(\"user_id\").getAsInt() == user.getUserID()) {\n consistencyObject.addProperty(\"user_id\", user.getUserID());\n consistencyObject.addProperty(\"consistency_percentages\", userPerformance\n .getConsistencyPercentagesForUser(ReportingMechanism.getInstance().getAllDatasets()));\n }\n }\n userConsistency.add(consistencyObject);\n }\n\n // ---------------------------------- ending of user consistency for datasets in\n // report part\n\n }\n\n }",
"public MetaInfoReader(String dataset, String basePath) {\n String baseFileName = basePath + dataset + \"/metainfo.txt\";\n data = new ArrayList<>();\n readFile(baseFileName);\n MetaDataManager.getInstance(data);\n }",
"private void load() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tloadPairs();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }",
"void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );",
"@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}",
"public LazyDataset(String name, int dtype, int[] shape, ILazyLoader loader) {\n \t\tthis.name = name;\n \t\tthis.shape = shape;\n \t\toShape = shape;\n \t\tthis.loader = loader;\n \t\tthis.dtype = dtype;\n \t\ttry {\n \t\t\tsize = AbstractDataset.calcSize(shape);\n \t\t} catch (IllegalArgumentException e) {\n \t\t\tsize = Integer.MAX_VALUE; // this indicates that the entire dataset cannot be read in! \n \t\t}\n \t}",
"private void readHDFS(Commande cmd, ObjectOutputStream outputStream) {\n\t\tif (Settings.DEBUG)\n\t\t\tSystem.out.println(\"server hdfs read file: \" + cmd.getNomChunk());\n\t\tFormat format = Format.get(cmd.getNomChunk(), cmd.getformat());\n\t\tformat.open(Format.OpenMode.R);\n\t\tKV enregistrement = null;\n\t\tboolean flag = false;\n\t\ttry {\n\t\t\tdo {\n\t\t\t\tenregistrement = format.read();\n\t\t\t\tif (enregistrement == null)\n\t\t\t\t\tflag = false;\n\t\t\t\telse\n\t\t\t\t\tflag = true;\n\t\t\t\tif (flag) {\n\t\t\t\t\toutputStream.writeObject(enregistrement);\n\t\t\t\t\toutputStream.reset();\n\t\t\t\t}\n\t\t\t} while (flag);\n\t\t\toutputStream.writeObject(null);\n\t\t\toutputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Fichie non trouvé\");\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tformat.close();\n\t}",
"public JsonDataset(URL url) {\r\n\t\tsuper(url);\r\n\t\tlogger.trace(\"JsonDataset(URL) - start\");\r\n\t\tlogger.trace(\"JsonDataset(URL) - end\");\r\n\t}",
"public interface DataFetchingStrategy {\n \n\tpublic String fetchData(String url) throws DataFetchingException;\n}",
"int retrieve(FileInputSplit fileInputSplit);",
"public static List<File> splitData(String treeFileName, int foldSize) {\n ArrayList<File> tempFilePaths = new ArrayList<File>();\n Random random = new Random(100);\n for (int i = 0; i < foldSize+1; i++) {\n tempFilePaths.add(new File(String.valueOf(random.nextInt())));\n }\n URL treeResource = CommonUtils.class.getClassLoader().getResource(treeFileName);\n if (treeResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + treeFileName);\n return null;\n }\n\n URL trainResource = null;\n\n File treeFile = new File(treeResource.getPath());\n ArrayList<String> tempAttributeList = new ArrayList<String>();\n try {\n FileReader treeFileInputStream = new FileReader(treeFile);\n BufferedReader bufferedReader = new BufferedReader(treeFileInputStream);\n String line = null;\n String line1 = null;\n int count = 0;\n try {\n while ((line = bufferedReader.readLine()) != null) {\n if (count == 0) {\n trainResource = CommonUtils.class.getClassLoader().getResource(line);\n if (trainResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + line);\n return null;\n }\n FileReader fileReader = new FileReader(new File(trainResource.getPath()));\n BufferedReader bufferedReader1 = new BufferedReader(fileReader);\n int count1 = 0;\n while ((line1 = bufferedReader1.readLine()) != null) {\n if (count1 == 0) {\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tempFilePaths.get(0)));\n bufferedWriter.write(line1);\n bufferedWriter.write(\"\\n\");\n bufferedWriter.flush();\n bufferedWriter.close();\n }else {\n tempAttributeList.add(line1);\n }\n count1++;\n }\n }\n count++;\n logger.info(line);\n }\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n // now we randomly write data\n int fileIndex = 1;\n while(tempAttributeList.size()!=0) {\n int index0 = new Random(100).nextInt();\n if(index0<0){\n index0 = index0 * -1;\n }\n String s = tempAttributeList.get(index0 % tempAttributeList.size());\n\n try {\n BufferedWriter bufferedWriter1 = new BufferedWriter(new FileWriter(tempFilePaths.get(fileIndex),true));\n bufferedWriter1.write(s);\n bufferedWriter1.write(\"\\n\");\n bufferedWriter1.flush();\n bufferedWriter1.close();\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n tempAttributeList.remove(s);\n if(fileIndex==foldSize){\n fileIndex=1;\n }else{\n fileIndex++;\n }\n }\n return tempFilePaths;\n }",
"protected void download() {\r\n\t\tsetState(DOWNLOADING);\r\n\t\t\r\n\t\tThread t = new Thread(this);\r\n\t\tt.start();\r\n\t}",
"public int getDatasetId() {\n return datasetId;\n }",
"@JsonIgnore\n @Override\n public List<DataSet> getDataSets()\n {\n if (getFetchOptions() != null && getFetchOptions().hasDataSets())\n {\n return dataSets;\n }\n else\n {\n throw new NotFetchedException(\"Data sets have not been fetched.\");\n }\n }",
"public void getData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.restartLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockPickingFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = getView().findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.error_no_internet_connection);\n }\n }",
"private void setTrainingData() throws IOException {\r\n\t\ttrainIdBodyMap = readInIdBodiesMap(new File(TRAIN_BODIES_CSV_LOCATION));\r\n\t\ttrainStances = readStances(new File(TRAIN_STANCES_CSV_LOCATION));\r\n\r\n\t}",
"@Override\n public void downloadData() throws ApiException, BadRequestException, DataNotSetException, AuthRequiredException {\n\n try {\n result = Constructors.constructJSONArray(url);\n message = new String[result.length()];\n creator = new String[result.length()];\n created = new String[result.length()];\n for(int i = 0; i < result.length(); i++){\n String mes = result.getJSONObject(i).getString(\"message\");\n String user = result.getJSONObject(i).getString(\"creator\");\n String date = result.getJSONObject(i).getString(\"created\");\n message[i] = mes;\n creator[i] = user;\n created[i] = date;\n\n }\n } catch (Exception e) {\n throw new ApiException(\"API Error: \" + result.toString());\n }\n\n }",
"private void loadData()\n {\n try\n {\n //Reads in the data from default file\n System.out.println(\"ATTEMPTING TO LOAD\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups.dat\");\n System.out.println(\"LOADED\");\n loadSuccessful = true;\n \n //If read is successful, save backup file in case of corruption\n try\n {\n System.out.println(\"SAVING BACKUP\");\n serial.Serialize(allGroups, \"All-Groups-backup.dat\");\n System.out.println(\"BACKUP SAVED\");\n } catch (IOException e)\n {\n System.out.println(\"FAILED TO WRITE BACKUP DATA\");\n }\n } catch (IOException e)\n {\n //If loading from default file fails, first try loading from backup file\n System.out.println(\"READING FROM DEFAULT FAILED\");\n try\n {\n System.out.println(\"ATTEMPTING TO READ FROM BACKUP\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups-backup\");\n System.out.println(\"READING FROM BACKUP SUCCESSFUL\");\n loadSuccessful = true;\n } catch (IOException ex)\n {\n //If reading from backup fails aswell generate default data\n System.out.println(\"READING FROM BACKUP FAILED\");\n allGroups = new ArrayList();\n } catch (ClassNotFoundException ex){}\n } catch (ClassNotFoundException e){}\n }",
"public void setupDryadCloudDataSets(){\n\t\ttry{\n\t\t\t\n\t\t\t// A Dryad \n\t\t\tDryadDataSet ds = new DryadDataSet(_DRYAD_D1_TREEBASE);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D1_TREEBASE_F1);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D3_POPULAR);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D3_POPULAR_F1);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D4_CSV);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D4_CSV_F1);\n\t\t\tds.harvestDataToRDF(_DRYAD_D4_CSV_F2);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D6_CSV);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D6_CSV_F1);\n\t\t\tds.harvestDataToRDF(_DRYAD_D6_CSV_F2);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D2_GENBANK);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F1);\t\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F2);\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F3);\n\t\t\tds.harvestDataToRDF(_DRYAD_D2_GENBANK_F4);\n\t\t\t_datasets.add(ds);\n\t\t\tds = new DryadDataSet(_DRYAD_D5_CSV);\n\t\t\tds.harvestMetadataToRDF();\n\t\t\tds.harvestDataToRDF(_DRYAD_D5_CSV_F1);\n\t\t\tds.harvestDataToRDF(_DRYAD_D5_CSV_F2);\n\t\t\t_datasets.add(ds);\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tSystem.out.println(\"ERROR: Exception \"+ex.getMessage());\n\t\t}\n\t}",
"protected IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\treturn new FlatXmlDataSet(this.getClass().getResourceAsStream(\"dataset_report.xml\"));\r\n\t}",
"private void loadDataTraining(String location) throws IOException {\r\n\r\n File parentDir = new ClassPathResource(location).getFile();\r\n \ttrainWriter.write(\"Data folder found.\");\r\n\r\n // Divide all data to training and testing datasets\r\n FileSplit filesInDir = new FileSplit(parentDir, allowedExtensions, randNumGen);\r\n \r\n // Create ParentPathLabelGenerator, that will parse the parent dir and use the name of the subdirectories as label/class names\r\n ParentPathLabelGenerator labelMaker = new ParentPathLabelGenerator();\r\n BalancedPathFilter pathFilter = new BalancedPathFilter(randNumGen, allowedExtensions, labelMaker);\r\n trainWriter.write(\"Label generators created.\");\r\n \r\n // Split the image files into train and test. Specify the train test split as 80%,20%\r\n InputSplit[] filesInDirSplit = filesInDir.sample(pathFilter, 80, 20);\r\n InputSplit trainDataInputSplit = filesInDirSplit[0];\r\n InputSplit testDataInputSplit = filesInDirSplit[1];\r\n trainWriter.write(\"Data splited to train and test parts as 80% and 20%.\");\r\n \r\n /*\r\n * Specifying a new record reader (one for testing on dataset, one for testing on real data, one for training)\r\n * with the height and width you want the images to be resized to.\r\n * Note that the images in this example are all of different size\r\n * They will all be resized to the height and width specified below\r\n * */\r\n ImageRecordReader trainRecordReader = new ImageRecordReader(inputShape[1],inputShape[2],inputShape[0],labelMaker);\r\n trainRecordReader.initialize(trainDataInputSplit);\r\n\r\n ImageRecordReader testRecordReader = new ImageRecordReader(inputShape[1],inputShape[2],inputShape[0], labelMaker);\r\n testRecordReader.initialize(testDataInputSplit);\r\n trainWriter.write(\"Data iterators created successfully.\");\r\n \r\n // Get the number of labels, ImageRecordReader founded in dir and check it\r\n int outputNum = trainRecordReader.numLabels();\r\n\r\n // Init iterators with datasets\r\n trainIterator = new RecordReaderDataSetIterator(trainRecordReader, batchSizeTraining, labelIndex, outputNum);\r\n trainIterator.setCollectMetaData(true);\r\n testIterator = new RecordReaderDataSetIterator(testRecordReader, batchSizeTesting, labelIndex, outputNum);\r\n testIterator.setCollectMetaData(true);\r\n trainWriter.write(\"Data iterators setted to collect metadata.\");\r\n }",
"private static void getTheData()\n {\n try\n {\n ITEMS = getSalesOrderSets();\n }\n catch (OnlineODataStoreException e)\n {\n Log.e(TAG, \"caught OnlineODataStoreException\");\n }\n }",
"void store(WebCrawlerData data);",
"public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public boolean doLoadTrackersData() {\n\n TrackerManager tManager = TrackerManager.getInstance();\n ObjectTracker objectTracker = (ObjectTracker) tManager\n .getTracker(ObjectTracker.getClassType());\n if (objectTracker == null)\n return false;\n\n if (markerDataSet == null)\n markerDataSet = objectTracker.createDataSet();\n\n if (markerDataSet == null)\n return false;\n\n if (!markerDataSet.load(\n \"Test0000.xml\",\n STORAGE_TYPE.STORAGE_APPRESOURCE))\n return false;\n\n if (!objectTracker.activateDataSet(markerDataSet))\n return false;\n\n int numTrackers = markerDataSet.getNumTrackables();\n for (int count = 0; count < numTrackers; count++) {\n Trackable trackable = markerDataSet.getTrackable(count);\n if (enableExtendedTracking) {\n trackable.startExtendedTracking();\n }\n\n String name = \"Current Dataset : \" + trackable.getName();\n trackable.setUserData(name);\n Log.d(TAG, \"UserData:Set the following user data \" + trackable.getUserData());\n }\n\n return true;\n }",
"public boolean insertDataSet(String dsID, String hdfsPath);",
"void createGraphForSingleLoad();",
"private void getData(){\r\n \tsetProgressBarIndeterminateVisibility(true);\r\n \t\r\n\t String url = \"HospitalInfo?hospital=\" + URLEncoder.encode(hospital) + \"&ssid=\" + UserInfo.getSSID();\r\n\t download = new HttpGetJSONConnection(url, mHandler, TASK_GETDATA);\r\n\t download.start();\r\n }",
"private void loadData() {\n this.financeDataList = new ArrayList<>();\n }",
"void loadData();",
"void loadData();",
"private void startDownload(){\n final DownloadCurrent downloadCurrent = new DownloadCurrent(this);\n downloadCurrent.execute(UpdateTalesData.sData_HTTP);\n sProgDialDownload.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n downloadCurrent.cancel(true);\n }\n });\n\n }"
] | [
"0.5514423",
"0.53716314",
"0.52574795",
"0.5123324",
"0.5105031",
"0.5077774",
"0.5073874",
"0.5060727",
"0.5027278",
"0.5019327",
"0.5017672",
"0.50064033",
"0.49569267",
"0.49229422",
"0.4884217",
"0.4841211",
"0.4839872",
"0.48218042",
"0.4821767",
"0.48151094",
"0.48142287",
"0.48107862",
"0.4797933",
"0.47973445",
"0.47943825",
"0.4787768",
"0.47838095",
"0.47718254",
"0.47551036",
"0.4753581",
"0.47361848",
"0.4718449",
"0.4717188",
"0.4699295",
"0.4661328",
"0.4658366",
"0.46498233",
"0.46479946",
"0.46352184",
"0.4634489",
"0.46326575",
"0.46299288",
"0.46236554",
"0.46203366",
"0.46187368",
"0.46181178",
"0.4612753",
"0.45982185",
"0.4591992",
"0.45762038",
"0.45728555",
"0.45646492",
"0.45628494",
"0.45602208",
"0.45432454",
"0.45394626",
"0.45378187",
"0.45313066",
"0.45172155",
"0.4511101",
"0.45109302",
"0.45088655",
"0.45052972",
"0.45033208",
"0.44967395",
"0.4493899",
"0.4482767",
"0.44826022",
"0.4477898",
"0.44768798",
"0.44645438",
"0.4461175",
"0.44537893",
"0.44515917",
"0.4447872",
"0.44378722",
"0.44374695",
"0.44332683",
"0.44285566",
"0.4425001",
"0.44237325",
"0.44221526",
"0.44203535",
"0.44172382",
"0.44130182",
"0.44079944",
"0.4406662",
"0.44050193",
"0.44025415",
"0.44009158",
"0.43978155",
"0.4394271",
"0.43941262",
"0.43909806",
"0.43858516",
"0.43777817",
"0.4376858",
"0.4375643",
"0.4375643",
"0.4361827"
] | 0.50001144 | 12 |
Recommends using an UB algorithm. Based on RiVal step. | public static void orbsRecommend(final int nFolds, EngineParameter eparams, final String inPath) {
List<String> trainingFiles;
String testFile;
for (int curFold = 0; curFold < nFolds; curFold++) {
trainingFiles = new ArrayList<String>();
trainingFiles.add(inPath + "train_" + curFold + ".csv");
testFile = inPath+"test_"+curFold+".csv";
DataSourceParams dsp = eparams.getDataSouceParams();
eparams.setDataSource(trainingFiles, dsp.getEnclosure(), " ", false, false);
eparams.setEngineName("EngineFold"+curFold);
eparams.setTestFile(testFile);
eparams.setServing("br.ufsc.lapesd.orbs.example.crossvalidation.ServingToFile");
Engine engine;
switch (eparams.getEngineType()) {
case "br.ufsc.lapesd.orbs.example.ucfclassic.UCFClassicEngine":
engine = new UCFClassicEngine(eparams);
break;
case "br.ufsc.lapesd.orbs.example.ucfmultiattribute.UCFMultiAttributeEngine":
engine = new UCFMultiAttributeEngine(eparams);
break;
case "br.ufsc.lapesd.orbs.core.ProposalEngine":
engine = new UCFProposalEngine(eparams);
break;
default:
System.out.println("Declared engine no expected. Using ClassicNeighborhoodAnalyzerEngine instead.");
engine = new UCFClassicEngine(eparams);
break;
}
System.out.println("EngineFold "+ curFold +" will begin training.");
engine.train();
//Query especial para todos os usuários do teste, recomendar todos os itens do treino
List<String> ls = new ArrayList<String>();
ls.add(testFile);
eparams.setDataSource(ls, dsp.getEnclosure(), " ", false, false);
DataSource testSource = new DataSource(eparams.getDataSouceParams());
TrainingData testData = testSource.readTraining();
Set<String> userIDs = testData.getUsers().keySet();
for(String userID: userIDs){
engine.query(new Query(userID, 4000, null, null, null));
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public static void tinyUBTest() {\n final double[] answers = {0.5307575646626514, 0.7264168965132833, 0.860376939237304,\n 0.952744626134358, 0.9954079673114701, 1.0};\n final double kappa = 2.0;\n assertTrue(1.0 == approximateUpperBoundOnP(0, 0, kappa));\n final long n = 5;\n for (long k = 0; k <= n; k++) {\n final double ub = approximateUpperBoundOnP(n, k, kappa);\n final double est = estimateUnknownP(n, k);\n assertTrue(ub >= est);\n assertTrue(Math.abs(ub - answers[(int) k]) < 1e-14);\n // System.out.printf (\"UB\\t%d\\t%d\\t%.1f\\t%.16g%n\", n, k, kappa, ub);\n }\n }",
"private void evaluateProbabilities()\n\t{\n\t}",
"private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}",
"private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }",
"double getMissChance();",
"double find_min_takeoff_v_old_algorithm_aux (double min_lift, double max_drag, double speed, double speed_step, double pitch_init, double pitch_step) {\n double pitch = pitch_init;\n double pitch_limit = aoa_max*0.7;\n {\n trace(\"speed_step: \" + speed_step + \" pitch_step: \" + pitch_step);\n for (; speed < v_max; speed += speed_step) {\n velocity = speed;\n // if the startimg pitch guess when at this point was too high, \n // drag will be too big at this point; then reduce pitch\n while (pitch > aoa_min/2) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag)\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n else \n break; // while (pitch > aoa_min/2)\n } \n \n trace(\"for() speed: \" + speed + \" pitch: \" + pitch);\n for (;pitch < pitch_limit; pitch += pitch_step) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag) {\n // stop increasing pitch, won't work. need more speed\n trace(\"too much drag. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift());\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n break; // for (pitch...)\n }\n if (foil_lift() >= min_lift) {\n if (speed_step > 0.25) {\n trace(\"request reiterate. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift() + \" speed_step: \" + speed_step);\n return Math.max(0, velocity - speed_step); // request to reiterate\n } else {\n // done!\n make_min_takeoff_speed_info(min_lift, max_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + min_takeoff_speed_info);\n return -1;\n }\n } \n }\n // need to start from lowest pitch?\n if (pitch >= pitch_limit) pitch = pitch_init;\n }\n }\n return -2; // can not find solution\n }",
"private static void badApproach() {\n\t\t\n\t\tList<Double> result = new ArrayList<>();\n\t\t\n\t\tThreadLocalRandom.current()\n\t\t\t.doubles(10_000).boxed()\n\t\t\t.forEach(\n\t\t\t\t\td -> NewMath.inv(d)\n\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\tinv -> NewMath.sqrt(inv)\n\t\t\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\t\t\t\tsqrt -> result.add(sqrt)\n\t\t\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\n\t\tSystem.out.println(\"# result = \"+result.size());\n\t\t\n\t}",
"public abstract void BoostNerf(int boost);",
"public void computeWinnerDeterminationU()\r\n\t{\r\n\t\tif( _plans.size() == 0)\r\n\t\t{\r\n\t\t\t_allocation = new AllocationWoD();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t_randGenerator.setSeed(_seed);\r\n\t\t\r\n\t\tdouble maxExpectedUtility = 0.;\r\n\t\tint itsIdx = -1;\r\n\t\tint itsAtom = -1;\r\n\t\tfor(int i = 0; i < _plans.size(); ++i)\t\t\t\t\t\t\t\t\t// for every buyer\r\n\t\t\tfor(int j = 0; j < _plans.get(i).getNumberOfAtoms(); ++j)\t\t\t// for every plan he has value for\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get(i).getAtom(j));\r\n\t\t\t\tif(_paymentRule.equals(\"SecondPrice\"))\r\n\t\t\t\t\tplan.resolveWithSecondPrice();\r\n\t\t\t\telse if(_paymentRule.equals(\"FirstPrice\"))\r\n\t\t\t\t\tplan.resolveWithFirstPrice();\r\n\t\t\t\telse throw new RuntimeException(\"Cannot resolve the type: \" + _paymentRule);\r\n\t\t\t\t\r\n\t\t\t\tdouble expectedUtility = plan.computeExpectedValue() - plan.getPlanExpectedPayment();\r\n\t\t\t\t\r\n\t\t\t\tif( expectedUtility >= maxExpectedUtility )\r\n\t\t\t\t{\r\n\t\t\t\t\tmaxExpectedUtility = expectedUtility;\r\n\t\t\t\t\titsIdx = i;\r\n\t\t\t\t\titsAtom = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t_allocation = new AllocationWoD();\r\n\r\n\t\tif(itsIdx >= 0)\r\n\t\t{\r\n\t\t\tList<Integer> allocatedBundles = new LinkedList<Integer>();\r\n\t\t\tallocatedBundles.add(itsAtom);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get( itsIdx ).getAtom( itsAtom ));\r\n\t\t\t\t\r\n\t\t\t\tList<Integer> actuallyAllocatedTuples = new LinkedList<Integer>();\r\n\t\t\t\tfor(int i = 0; i < plan.getNumberOfFragments(); ++i)\r\n\t\t\t\t\tactuallyAllocatedTuples.add( plan.getMinNumberOfRecords(i) + _randGenerator.nextInt(plan.getMaxNumberOfRecords(i) - plan.getMinNumberOfRecords(i)) );\r\n\r\n\t\t\t\tif(plan.getAllocatedSellers().size() < 1)\r\n\t\t\t\t\tthrow new RuntimeException(\"No sellers in plan: \" + plan.toString());\r\n\t\t\t\t\r\n\t\t\t\tplan.setActuallyAllocatedRecords(actuallyAllocatedTuples);\r\n\t\t\t\tList<Integer> sellersInvolved = plan.getAllocatedSellers();\r\n\t\t\t\t\r\n\t\t\t\tList<ComplexSemanticWebType> allocatedPlans = new LinkedList<ComplexSemanticWebType>();\r\n\t\t\t\tallocatedPlans.add(plan);\r\n\t\t\t\t_allocation.addAllocatedAgent(plan.getAgentId(), sellersInvolved, allocatedBundles,\r\n\t\t\t\t\t\t\t\t\t\t\t plan.computeExpectedValue(), plan.computeExpectedCosts());\r\n\t\t\t\t_allocation.addAllocatedPlans(allocatedPlans, true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}",
"public void calculateProbabilities(){\n\t}",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"abstract double rightProbability();",
"float getSpecialProb();",
"private void checkStability() {\n double maxDeviation = Double.NEGATIVE_INFINITY;\n\n DeviationIterator itr = new DeviationIterator(currentOutcome, nActs);\n while (itr.hasNext()) {\n int[] devOutcome = itr.next();\n\n // this shouldn't happen\n if (eGame.getNumSamples(devOutcome) <= 0) {\n System.out.println(\"BRD: checking equilibrium with unsampled deviations!\");\n System.out.println(\"Current: \" + Arrays.toString(currentOutcome));\n System.out.println(\"Unsampled: \" + Arrays.toString(devOutcome));\n return;\n }\n\n double devBenefit = eGame.getPayoff(devOutcome, itr.getDeviatingPlayer()) -\n eGame.getPayoff(currentOutcome, itr.getDeviatingPlayer());\n\n maxDeviation = Math.max(maxDeviation, devBenefit);\n\n // terminate early; not better than one we have already confirmed\n if (maxDeviation >= confirmedStability) return;\n }\n\n if (maxDeviation < confirmedStability) {\n confirmedStability = maxDeviation;\n mostStableConfirmed = currentOutcome.clone();\n if (samplesToConfirmEquilibrium < 0 &&\n confirmedStability <= 0) {\n samplesToConfirmEquilibrium = eGame.getTotalNumSamples();\n }\n }\n }",
"private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }",
"private static AlleleFrequencyBacked.AlleleFrequencyRange computeAFrange(double[] alleleFrequencyProbs, int N, int bestAFguess, double fraction) {\n double totalProb = alleleFrequencyProbs[bestAFguess];\n int lowIndex = bestAFguess;\n int highIndex = bestAFguess;\n while ( totalProb < fraction ) {\n if ( lowIndex > 1 ) {\n lowIndex--;\n totalProb += alleleFrequencyProbs[lowIndex];\n }\n if ( highIndex < N ) {\n highIndex++;\n totalProb += alleleFrequencyProbs[highIndex];\n }\n }\n \n return new AlleleFrequencyBacked.AlleleFrequencyRange((double)lowIndex / (double)N, (double)highIndex / (double)N, fraction);\n }",
"@Override\n public void computeSatisfaction() {\n\n }",
"abstract public RandomRange getPlunderRange(Unit attacker);",
"private void computeOutcomePrediction(GameObserver gameObs) {\n int nProfiles = eGame.getNumProfiles();\n while (gameObs.numObsLeft() > 0 &&\n eGame.getTotalNumSamples() < nProfiles) {\n\n int newBR = computeBetterResponse(currentPlayer, gameObs);\n\n // not enough samples to compute the next BR\n if (newBR == NO_SAMPLES_FLAG) {\n break;\n }\n\n // no BR for this player; try another player\n // if no players are left, we have found an equilibrium\n else if (newBR == NO_BR_FLAG) {\n if (lastPlayerWithBR == currentPlayer) {\n checkStability();\n selectRandomUnexploredProfile(gameObs);\n updateCurrentPlayer();\n } else {\n updateCurrentPlayer();\n }\n }\n\n // we have found a new BR\n else {\n // flag errors\n if (newBR < 0 || newBR > nActs[currentPlayer]) {\n throw new RuntimeException(\"Invalid BR in IBRD: \" + currentPlayer + \" \" + newBR);\n }\n\n // update the current profile and tabu list\n tabu.setValue(true, currentOutcome);\n currentOutcome[currentPlayer] = newBR;\n lastPlayerWithBR = currentPlayer;\n updateCurrentPlayer();\n }\n }\n\n // update \"global\" prediction based on all data so far\n updateGlobalOutcomePrediction();\n\n //System.out.println(\"Done with this iteration; no more samples.\");\n //System.out.println(\"Samples: \" + gameObs.getNumObs());\n }",
"@Test\n @Order(8)\n void taillardTestMoreIterations() {\n try {\n\n for (int i = 0; i < SearchTestUtil.taillardFilenames.length; i++) {\n int output;\n float sumTabu = 0;\n int minTabu = Integer.MAX_VALUE;\n float sumRecuit = 0;\n int minRecuit = Integer.MAX_VALUE;\n System.out.println(\"Run#\" + SearchTestUtil.taillardFilenames[i]);\n assignementProblem.taillardInitializer(SearchTestUtil.taillardFilenames[i]);\n assignementProblem.setNeighborsFunction(NEIGHBORHOOD_TYPE, assignementProblem.getAssignmentData().getLength());\n for (int j = 0; j < 10; j++) {\n assignementProblem.setInCombination(Combination.generateRandom(assignementProblem.getAssignmentData().getLength()));\n\n System.out.println(\"\\n \\t Test#\"+j);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumTabu += output;\n if (output < minTabu) minTabu = output;\n\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumRecuit += output;\n if (output < minRecuit) minRecuit = output;\n }\n\n\n System.out.println(\"\\tAverage tabu \" + sumTabu / 10);\n System.out.println(\"\\tMinimum found \" + minTabu);\n\n System.out.println(\"\\tAverage recuit \" + sumRecuit / 10);\n System.out.println(\"\\tMinimum found \" + minRecuit);\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic double getBestTargetValue() {\n\t\treturn 0;\n\t}",
"@Test\n public void testAdaptivePruningWithBadBubble() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n final SeqVertex F = new SeqVertex(\"F\");\n final SeqVertex G = new SeqVertex(\"G\");\n final SeqVertex H = new SeqVertex(\"H\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, E, F, G, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, F, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, G, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), E, C);\n\n if (variantPresent) {\n graph.addVertices(H);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, H, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_LOG_ODDS_THRESHOLD,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(H));\n }\n }\n }",
"private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }",
"private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }",
"@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }",
"static double reliability(vmnode vm, jobnode[] jobs, int[] assigned, int ind) {\n double pow, bw, mem;\n pow = bw = mem = 0;\n\n for (int i = 0; i < jobs.length; i++) {\n if (assigned[i] == ind) {\n pow = pow + 1.0 * jobs[i].pow;\n bw = bw + 1.0 * jobs[i].bw;\n }\n }\n pow = 0.5 * (vm.powavail * 1.0 / pow);\n bw = 0.3 * (vm.bwavail * 1.0 / bw);\n mem = 0.2 * (vm.memavail + vm.memused) / vm.memused;\n if (vm.memused == 0.0) {\n return 1000000.0;\n }\n return (pow + bw + mem);\n }",
"@Override\n\tpublic Double unreliability(Scanner scaner) {\n\t\treturn 0d;\n\t}",
"private void runBest() {\n }",
"private double getUnadjustedFitness(Computer computer){\n double score = 0;\n score += 6 * getMatchPercent(computer);\n if(computer.compatible() && sizeCompatability(computer))\n score += 9.5;\n int ramAmount =computer.ramAmount();\n if(ramAmount < 8)\n score -= (8 - ramAmount) * 2;\n else if(ramAmount > 8 && ramAmount < 17)\n score += .06 * (ramAmount - 8);\n else if(ramAmount > 17)\n score += .03 * (ramAmount - 8);\n\n if(computer.cpu.name.contains(\"Intel\") && computer.cpu.name.endsWith(\"K\")){\n if (!computer.motherboard.overclock()){\n score -= 6;\n }\n }\n\n if(computer.cpu.name.contains(\"Intel\") && !(computer.cpu.shortname.contains(\"-5\") || computer.cpu.shortname.contains(\"-6\"))){\n score -= 2;\n }\n if(computer.cpu.name.contains(\"GeForce\") && !(computer.gpu.name.contains(\"GTX 9\") || computer.gpu.name.contains(\"GTX 1\"))){\n score -= 2;\n }\n if(computer.bootDrive.size < 240)\n score -= settings.diskSize * 0.33;\n if(computer.bootDrive.size > 700)\n score += settings.diskSize * 5;\n else\n score += settings.diskSize * computer.bootDrive.size / 140;\n if(computer.secondaryDrive != null)\n score += settings.diskSize * computer.secondaryDrive.size / 1000;\n\n //Now ensure there's enough power, and give a bonus for there being ~300 watts more than needed;\n //there are 4.5 points to gain in powersupply, 10 points to lose\n int basePower = computer.powerConsumption();\n int ideal = basePower + 65;\n if(computer.power.watts < basePower)\n score -= 10;\n else if(computer.power.watts < ideal)\n score += (basePower - computer.power.watts) / 100;\n else\n score += 2.5 - (computer.power.watts - basePower) / 250;\n score += (3 - computer.power.tier) * .6;\n\n // Now motherboard, one point to gain, one to lose\n score += 2 - computer.motherboard.getQuality();\n\n double driveScore = ((computer.bootDrive.reads + computer.bootDrive.writes) / 2) / 88;\n driveScore -= 2;\n if(driveScore > 7.5){\n driveScore = 7.5;\n }\n score += driveScore;\n double rawCpu = ((1 - settings.multicore) / 3) * computer.cpu.singlecore + ((settings.multicore / 3) * (computer.cpu.multicore));\n double adjustedCpu = 26 + 40* ((settings.cpuIntensity / (settings.cpuIntensity + settings.gpuIntensity))* rawCpu - lowCpuScore()) / (maxCpuScore() - lowCpuScore());\n double rawGpu = computer.gpu.fps + (computer.gpu.threedmark / 100);\n double adjustedGpu = 17 + 40 * ((settings.gpuIntensity / (settings.cpuIntensity + settings.gpuIntensity)) * rawGpu - lowGpuScore()) / (maxGpuScore() - lowGpuScore());\n //Inflate the GPU score slightly\n // adjustedGpu * ((35 - adjustedGpu) / 35);\n score += adjustedGpu;\n score += adjustedCpu;\n\n return score;\n }",
"private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }",
"@Override\n\tpublic double getTargetValueInCurrentBest() {\n\t\treturn 0;\n\t}",
"protected double suggestionResidual(double[] params, double weight) {\n double residual = 0.0;\n \n if (mSuggestSkewnessValueEnabled) {\n residual += Math.pow(params[0] - mSuggestedSkewnessValue, 2.0);\n }\n \n if (mSuggestHorizontalFocalLengthEnabled) {\n residual += Math.pow(\n params[1] - mSuggestedHorizontalFocalLengthValue, 2.0);\n }\n \n if (mSuggestVerticalFocalLengthEnabled) {\n residual += Math.pow(\n params[2] - mSuggestedVerticalFocalLengthValue, 2.0);\n }\n \n if (mSuggestAspectRatioEnabled) {\n double aspectRatio = params[2] / params[1];\n residual += Math.pow(aspectRatio - mSuggestedAspectRatioValue, 2.0);\n }\n \n if (mSuggestPrincipalPointEnabled) {\n if (mResidualPrincipalPoint == null) {\n mResidualPrincipalPoint = new InhomogeneousPoint2D(\n params[3], params[4]);\n } else {\n mResidualPrincipalPoint.setInhomogeneousCoordinates(\n params[3], params[4]);\n }\n \n residual += Math.pow(mResidualPrincipalPoint.distanceTo(\n mSuggestedPrincipalPointValue), 2.0);\n }\n \n if (mSuggestRotationEnabled) {\n if (mResidualRotation == null) {\n mResidualRotation = new Quaternion(params[5], params[6], \n params[7], params[8]);\n } else {\n mResidualRotation.setA(params[5]);\n mResidualRotation.setB(params[6]);\n mResidualRotation.setC(params[7]);\n mResidualRotation.setD(params[8]);\n }\n mResidualRotation.normalize();\n mSuggestedRotationValue.normalize();\n residual += Math.pow(mResidualRotation.getA() - \n mSuggestedRotationValue.getA(), 2.0) + \n Math.pow(mResidualRotation.getB() - \n mSuggestedRotationValue.getB(), 2.0) +\n Math.pow(mResidualRotation.getC() - \n mSuggestedRotationValue.getC(), 2.0) +\n Math.pow(mResidualRotation.getD() - \n mSuggestedRotationValue.getD(), 2.0); \n }\n \n if (mSuggestCenterEnabled) {\n if (mResidualCenter == null) {\n mResidualCenter = new InhomogeneousPoint3D(\n params[9], params[10], params[11]);\n } else {\n mResidualCenter.setInhomogeneousCoordinates(\n params[9], params[10], params[11]);\n }\n residual += Math.pow(\n mResidualCenter.distanceTo(mSuggestedCenterValue), 2.0);\n }\n \n return weight * residual;\n }",
"public double[] runOptimizer() {\n List<Integer> sents = new ArrayList<Integer>();\n for(int i=0; i<sentNum; i++)\n sents.add(i);\n \n if(needShuffle)\n Collections.shuffle(sents);\n \n double oraMetric, oraScore, predMetric, predScore;\n double[] oraPredScore = new double[4];\n double eta = 1.0; //learning rate, will not be changed if run percep\n double avgEta = 0; //average eta, just for analysis\n double loss = 0;\n double featNorm = 0;\n double featDiffVal;\n double sumMetricScore = 0;\n double sumModelScore = 0;\n String oraFeat = \"\";\n String predFeat = \"\";\n String[] oraPredFeat = new String[2];\n String[] vecOraFeat;\n String[] vecPredFeat;\n String[] featInfo;\n boolean first = true;\n //int processedSent = 0;\n Iterator it;\n Integer diffFeatId;\n double[] avgLambda = new double[initialLambda.length]; //only needed if averaging is required\n for(int i=0; i<initialLambda.length; i++)\n avgLambda[i] = 0.0;\n\n //update weights\n for(Integer s : sents) {\n //find out oracle and prediction\n if(first)\n findOraPred(s, oraPredScore, oraPredFeat, initialLambda, featScale);\n else\n findOraPred(s, oraPredScore, oraPredFeat, finalLambda, featScale);\n \n //the model scores here are already scaled in findOraPred\n oraMetric = oraPredScore[0];\n oraScore = oraPredScore[1];\n predMetric = oraPredScore[2];\n predScore = oraPredScore[3];\n oraFeat = oraPredFeat[0];\n predFeat = oraPredFeat[1];\n \n //update the scale\n if(needScale) { //otherwise featscale remains 1.0\n sumMetricScore += java.lang.Math.abs(oraMetric+predMetric);\n sumModelScore += java.lang.Math.abs(oraScore+predScore)/featScale; //restore the original model score\n \n if(sumModelScore/sumMetricScore > scoreRatio)\n featScale = sumMetricScore/sumModelScore;\n\n /* a different scaling strategy \n if( (1.0*processedSent/sentNum) < sentForScale ) { //still need to scale\n double newFeatScale = java.lang.Math.abs(scoreRatio*sumMetricDiff / sumModelDiff); //to make sure modelScore*featScale/metricScore = scoreRatio\n \n //update the scale only when difference is significant\n if( java.lang.Math.abs(newFeatScale-featScale)/featScale > 0.2 )\n featScale = newFeatScale;\n }*/\n }\n// processedSent++;\n\n HashMap<Integer, Double> allOraFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> allPredFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> featDiff = new HashMap<Integer, Double>();\n\n vecOraFeat = oraFeat.split(\"\\\\s+\");\n vecPredFeat = predFeat.split(\"\\\\s+\");\n \n for (int i = 0; i < vecOraFeat.length; i++) {\n featInfo = vecOraFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allOraFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n featDiff.put(diffFeatId, Double.parseDouble(featInfo[1]));\n }\n\n for (int i = 0; i < vecPredFeat.length; i++) {\n featInfo = vecPredFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allPredFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n\n if (featDiff.containsKey(diffFeatId)) //overlapping features\n featDiff.put(diffFeatId, featDiff.get(diffFeatId)-Double.parseDouble(featInfo[1]));\n else //features only firing in the 2nd feature vector\n featDiff.put(diffFeatId, -1.0*Double.parseDouble(featInfo[1]));\n }\n\n if(!runPercep) { //otherwise eta=1.0\n featNorm = 0;\n\n Collection<Double> allDiff = featDiff.values();\n for(it =allDiff.iterator(); it.hasNext();) {\n featDiffVal = (Double) it.next();\n featNorm += featDiffVal*featDiffVal;\n }\n \n //a few sanity checks\n if(! evalMetric.getToBeMinimized()) {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score+ora_metric > pred_score+pred_metric\n * pred_score-pred_metric > ora_score-ora_metric\n * => ora_metric > pred_metric */\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be greater than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for max-metric oracle selection or min-metric prediction selection, the oracle metric \" +\n \t\t\"score must be greater than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n } else {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score-ora_metric > pred_score-pred_metric\n * pred_score+pred_metric > ora_score+ora_metric\n * => ora_metric < pred_metric */\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be smaller than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for min-metric oracle selection or max-metric prediction selection, the oracle metric \" +\n \"score must be smaller than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n }\n \n if(predSelectMode==2) {\n if(predScore+1e-10 < oraScore) {\n System.err.println(\"WARNING: for max-model prediction selection, the prediction model score must be greater than oracle model score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n //cost - margin\n //remember the model scores here are already scaled\n loss = evalMetric.getToBeMinimized() ? //cost should always be non-negative \n (predMetric-oraMetric) - (oraScore-predScore)/featScale: \n (oraMetric-predMetric) - (oraScore-predScore)/featScale;\n \n if(loss<0)\n loss = 0;\n\n if(loss == 0)\n eta = 0;\n else\n //eta = C < loss/(featNorm*featScale*featScale) ? C : loss/(featNorm*featScale*featScale); //feat vector not scaled before\n eta = C < loss/(featNorm) ? C : loss/(featNorm); //feat vector not scaled before\n }\n \n avgEta += eta;\n\n Set<Integer> diffFeatSet = featDiff.keySet();\n it = diffFeatSet.iterator();\n\n if(first) {\n first = false;\n \n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = initialLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n else {\n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = finalLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n \n if(needAvg) {\n for(int i=0; i<avgLambda.length; i++)\n avgLambda[i] += finalLambda[i];\n }\n }\n \n if(needAvg) {\n for(int i=0; i<finalLambda.length; i++)\n finalLambda[i] = avgLambda[i]/sentNum;\n }\n \n avgEta /= sentNum;\n System.out.println(\"Average learning rate: \"+avgEta);\n\n // the intitialLambda & finalLambda are all trainable parameters\n //if (!trainMode.equals(\"3\")) // for mode 3, no need to normalize sparse\n // feature weights\n //normalizeLambda(finalLambda);\n //else\n //normalizeLambda_mode3(finalLambda);\n\n /*\n * for( int i=0; i<finalLambda.length; i++ ) System.out.print(finalLambda[i]+\" \");\n * System.out.println(); System.exit(0);\n */ \n\n double initMetricScore = computeCorpusMetricScore(initialLambda); // compute the initial corpus-level metric score\n double finalMetricScore = computeCorpusMetricScore(finalLambda); // compute final corpus-level metric score // the\n\n // prepare the printing info\n int numParamToPrint = 0;\n String result = \"\";\n\n if (trainMode.equals(\"1\") || trainMode.equals(\"4\")) {\n numParamToPrint = paramDim > 10 ? 10 : paramDim; // how many parameters\n // to print\n result = paramDim > 10 ? \"Final lambda(first 10): {\" : \"Final lambda: {\";\n\n for (int i = 1; i < numParamToPrint; i++)\n // in ZMERT finalLambda[0] is not used\n result += finalLambda[i] + \" \";\n } else {\n int sparseNumToPrint = 0;\n if (trainMode.equals(\"2\")) {\n result = \"Final lambda(regular feats + first 5 sparse feats): {\";\n for (int i = 1; i <= regParamDim; ++i)\n result += finalLambda[i] + \" \";\n\n result += \"||| \";\n\n sparseNumToPrint = 5 < (paramDim - regParamDim) ? 5 : (paramDim - regParamDim);\n\n for (int i = 1; i <= sparseNumToPrint; i++)\n result += finalLambda[regParamDim + i] + \" \";\n } else {\n result = \"Final lambda(first 10 sparse feats): {\";\n sparseNumToPrint = 10 < paramDim ? 10 : paramDim;\n\n for (int i = 1; i < sparseNumToPrint; i++)\n result += finalLambda[i] + \" \";\n }\n }\n\n output.add(result + finalLambda[numParamToPrint] + \"}\\n\" + \"Initial \"\n + evalMetric.get_metricName() + \": \" + initMetricScore + \"\\nFinal \"\n + evalMetric.get_metricName() + \": \" + finalMetricScore);\n\n // System.out.println(output);\n\n if (trainMode.equals(\"3\")) {\n // finalLambda = baseline(unchanged)+disc\n for (int i = 0; i < paramDim; i++)\n copyLambda[i + regParamDim + 1] = finalLambda[i];\n\n finalLambda = copyLambda;\n }\n\n return finalLambda;\n }",
"@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }",
"@Override\n\tpublic double getFinalBestTargetValue() {\n\t\treturn 0;\n\t}",
"@Test\n public void badChoicePunisher() {\n Edge[] edgelist = {new Edge(new int[] {1, 7}), new Edge(new int[] {1, 8}),\n new Edge(new int[] {7, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist, 8, 2);\n\n\n Edge[] edgelist1 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist1, 7, 1);\n\n Edge[] edgelist2 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5}), new Edge(new int[] {2, 8})};\n timeMethod(edgelist2, 8, 2);\n\n Edge[] edgelist3 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist3, 7, 1);\n }",
"public void antiderivative () {\n antiderivative(0.0);\n }",
"public int a(alq paramalq, int paramInt1, int paramInt2, fn paramfn)\r\n/* 120: */ {\r\n/* 121:137 */ int i = 0;\r\n/* 122: */ amj localamj;\r\n/* 123: */ int k;\r\n/* 124:138 */ for (int j = 0; j < this.a.length; j++)\r\n/* 125: */ {\r\n/* 126:139 */ localamj = this.a[j];\r\n/* 127:140 */ if (localamj != null) {\r\n/* 128:143 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 129:146 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 130:149 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), true)))\r\n/* 131: */ {\r\n/* 132:153 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 133:154 */ i += k;\r\n/* 134:155 */ if (paramInt2 != 0)\r\n/* 135: */ {\r\n/* 136:156 */ this.a[j].b -= k;\r\n/* 137:157 */ if (this.a[j].b == 0) {\r\n/* 138:158 */ this.a[j] = null;\r\n/* 139: */ }\r\n/* 140:160 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 141:161 */ return i;\r\n/* 142: */ }\r\n/* 143: */ }\r\n/* 144: */ }\r\n/* 145: */ }\r\n/* 146: */ }\r\n/* 147: */ }\r\n/* 148: */ }\r\n/* 149:165 */ for (j = 0; j < this.b.length; j++)\r\n/* 150: */ {\r\n/* 151:166 */ localamj = this.b[j];\r\n/* 152:167 */ if (localamj != null) {\r\n/* 153:170 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 154:173 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 155:176 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), false)))\r\n/* 156: */ {\r\n/* 157:180 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 158:181 */ i += k;\r\n/* 159:182 */ if (paramInt2 != 0)\r\n/* 160: */ {\r\n/* 161:183 */ this.b[j].b -= k;\r\n/* 162:184 */ if (this.b[j].b == 0) {\r\n/* 163:185 */ this.b[j] = null;\r\n/* 164: */ }\r\n/* 165:187 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 166:188 */ return i;\r\n/* 167: */ }\r\n/* 168: */ }\r\n/* 169: */ }\r\n/* 170: */ }\r\n/* 171: */ }\r\n/* 172: */ }\r\n/* 173: */ }\r\n/* 174:193 */ if (this.f != null)\r\n/* 175: */ {\r\n/* 176:194 */ if ((paramalq != null) && (this.f.b() != paramalq)) {\r\n/* 177:195 */ return i;\r\n/* 178: */ }\r\n/* 179:197 */ if ((paramInt1 > -1) && (this.f.i() != paramInt1)) {\r\n/* 180:198 */ return i;\r\n/* 181: */ }\r\n/* 182:200 */ if ((paramfn != null) && (!cy.a(paramfn, this.f.o(), false))) {\r\n/* 183:201 */ return i;\r\n/* 184: */ }\r\n/* 185:204 */ j = paramInt2 <= 0 ? this.f.b : Math.min(paramInt2 - i, this.f.b);\r\n/* 186:205 */ i += j;\r\n/* 187:206 */ if (paramInt2 != 0)\r\n/* 188: */ {\r\n/* 189:207 */ this.f.b -= j;\r\n/* 190:208 */ if (this.f.b == 0) {\r\n/* 191:209 */ this.f = null;\r\n/* 192: */ }\r\n/* 193:211 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 194:212 */ return i;\r\n/* 195: */ }\r\n/* 196: */ }\r\n/* 197: */ }\r\n/* 198:217 */ return i;\r\n/* 199: */ }",
"float getFixedHotwordGain();",
"@Test\n public static void tinyLBTest() {\n final double[] answers = {0.0, 0.004592032688529923, 0.04725537386564205,\n 0.1396230607626959, 0.2735831034867167, 0.4692424353373485};\n final double kappa = 2.0;\n assertTrue( 0.0 == approximateLowerBoundOnP(0, 0, kappa) );\n final long n = 5;\n for (long k = 0; k <= n; k++) {\n final double lb = approximateLowerBoundOnP(n, k, kappa);\n final double est = estimateUnknownP(n, k);\n assertTrue(lb <= est);\n assertTrue(Math.abs(lb - answers[(int) k]) < 1e-14);\n // System.out.printf (\"LB\\t%d\\t%d\\t%.1f\\t%.16g%n\", n, k, kappa, lb);\n }\n }",
"void ComputeFitnessBefore(){\n\t\t\t\tint i, pos;\n\t\t\t\t// individual t;\n\t\t\t\tdouble min, sum = 0, tm;\n\t\t\t\t// First Compute Raw fitness\n\t\t\t\tfor(i = 0; i < poplen; i++)\n\t\t\t\t{\n\t\t\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t\t\t}\n\t\t\t\t//tim individual co fitness be nhat\n\t\t\t\tmin = oldpop[0].fitness;\t\t\t\n\t\t\t\tsum = oldpop[0].fitness;\t\t\t\n\t\t\t\t\n\t\t\t\tfor(i = 1; i < poplen; i++) {\n\t\t\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\t\t\tmin = oldpop[i].fitness;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsum += oldpop[i].fitness;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// copy the best and average\n//\t\t\t\tbestBeforeFitness[gen]=min;\n//\t\t\t\tavgBeforeFitness[gen]=sum/poplen;\n//\t\t\t\tbestcurrent[gen] = new individual();\n//\t\t\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n//\t\t\t\taverage[gen] = sum /poplen;\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}",
"int[] predict(int paraUserIndex, int paraItemIndex, int paraK) {\n\t\tint[] tempDistribution = new int[5];\n\t\tIndicesOfFriendsRatedItem = new int[5];\n\t\t// Step 1. Find my friends\n\t\tint[] tempFriends = dataModel.uSecRels[paraUserIndex];\n\n\t\t// System.out.println(\"the friends is \" + Arrays.toString(tempFriends));\n\n\t\t// Step 1.1 If the user has not friends, we can't predict the object.\n\t\tif (tempFriends == null || tempFriends.length == 0) {\n\t\t\ttempDistribution = predictForNoneFriendUser(paraUserIndex, paraItemIndex, paraK);\n\t\t\treturn tempDistribution;\n\t\t} // Of if\n\n\t\t// Step 2. Find users to buy the items\n\t\tint[] tempUsers = dataModel.iTrRateInds[paraItemIndex];\n\n\t\t// System.out.println(\"the tempUsers is \" + Arrays.toString(tempUsers));\n\n\t\t// Step 3. Find my friends who rated the item.\n\t\tint[] tempIndicesOfFriendsRatedItem = SetOperator.interSection(tempFriends, tempUsers);\n\n\t\t// if the inter-section is null, we ask my friend one by one.\n\t\t// int a = 0;\n\t\t// while (tempIndicesOfFriendsRatedItem == null && a <\n\t\t// dataModel.uRelations[paraUserIndex].length) {\n\t\t// tempFriends = dataModel.uRelations[dataModel.uRelations[paraUserIndex][a]];\n\t\t// tempIndicesOfFriendsRatedItem = SetOperator.interSection(tempFriends,\n\t\t// tempUsers);\n\t\t//// if(tempIndicesOfFriendsRatedItem != null) {\n\t\t//// noWayCount1++;\n\t\t//// }//Of if\n\t\t// a++;\n\t\t// } // Of while\n\n\t\t// If the intersection is null, we can't predict the object.\n\t\tif (tempIndicesOfFriendsRatedItem == null) {\n\t\t\ttempDistribution = predictForNoneFriendUser(paraUserIndex, paraItemIndex, paraK);\n\t\t\treturn tempDistribution;\n\t\t} // Of if\n\n\t\t// Step 4. Compute the distribution of the predicting item\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < tempIndicesOfFriendsRatedItem.length; i++) {\n\t\t\tfor (int j = 0; j < dataModel.uRelations[paraUserIndex].length; j++) {\n\t\t\t\tif (tempIndicesOfFriendsRatedItem[i] == dataModel.uRelations[paraUserIndex][j]) {\n\t\t\t\t\tint tempIndex = dataModel.iTrRatings[paraItemIndex][tempIndicesOfFriendsRatedItem[i]];\n\t\t\t\t\ttempDistribution[tempIndex - 1]++;\n\t\t\t\t\tIndicesOfFriendsRatedItem[tempIndex - 1]++;\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint tempIndex = dataModel.iTrRatings[paraItemIndex][tempIndicesOfFriendsRatedItem[i]];\n\t\t\ttempDistribution[tempIndex - 1]++;\n\n\t\t} // Of for i\n\n\t\treturn tempDistribution;\n\t}",
"private double bound(int iter, Solution next) {\n return Math.exp((-1.0 * (next.getValue() - bestSol.getValue())) / denominator(iter));\n }",
"private void processLowValue(Bid bid) {\n\t}",
"public interface AMDPModelLearner extends AMDPPolicyGenerator{\n\n\n public void updateModel(State s, Action a, List<Double> rewards, State sPrime, GroundedTask gt);\n\n\n}",
"public abstract void improveValueFunction(Vector<BeliefState> vBeliefPoints, Vector<BeliefState> vNewBeliefPoints);",
"public abstract double evaluateFitness();",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"public boolean LocalImprovementDNF (TableVar Variables, TableDat Examples) {\r\n IndDNF solucion = new IndDNF(Variables.getNVars(), Variables);\r\n QualityMeasures res, new_res;\r\n int mejor, cambio;\r\n int[] indices = new int[Variables.getNVars()];\r\n float[] evalua = new float[Variables.getNVars()];\r\n boolean improvement = true;\r\n boolean retValue = false;\r\n int control;\r\n\r\n // Store the pos of the best guy in \"mejor\"\r\n mejor = poblac.getBestGuy();\r\n\r\n // Copy in \"solucion\" the rule to improve\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n solucion.setCromElemGene(i, j, poblac.getCromElemGene(mejor,i,j));\r\n\r\n // Evaluate de rule and get the measures\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; // Increment the number of trials\r\n res = solucion.getMedidas();\r\n\r\n control = 1;\r\n\r\n while ((improvement)&&(control<Variables.getNVars())) {\r\n improvement = false; // By now, there is no improvement\r\n for (int i=0; i<Variables.getNVars(); i++) {\r\n indices[i]=i;\r\n // It does not matter if the variable is discrete or continuous\r\n if (solucion.getCromElemGene(i,Variables.getNLabelVar(i))==0)\r\n // If variable does not actually takes part in the rule\r\n evalua[i] = -1;\r\n else {\r\n // The initial value is not stored cause we know the value is 1\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i),0);\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++;\r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n }\r\n else\r\n evalua[i]=-1;\r\n // Restore initial values of \"solucion\"\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i), 1);\r\n }\r\n }\r\n\r\n if (improvement) {\r\n Utils.OrCrecIndex (evalua,0,Variables.getNVars()-1,indices);\r\n cambio = indices[Variables.getNVars()-1];\r\n for (int j=0; j<=Variables.getNLabelVar(cambio); j++)\r\n solucion.setCromElemGene(cambio, j, 0);\r\n\r\n res.setSup(evalua[Variables.getNVars()-1]);\r\n // Important: take into account not to eliminate all the variables of the rule\r\n\r\n // If there is improvement, set return value to true\r\n retValue = true;\r\n control++;\r\n\r\n }\r\n } // End while \"improvement\"\r\n\r\n // Store the new rule if it was improved\r\n if (retValue==true){\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n poblac.setCromElemGene(mejor, i, j, solucion.getCromElemGene(i,j));\r\n poblac.setIndivEvaluated(mejor,false);\r\n }\r\n\r\n return retValue;\r\n\r\n }",
"@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }",
"public void increase_BUIBYDryingFactor(){\r\n\tBUO=BUO+DF;\r\n}",
"public void findBPS() {\n\t\tfinal String consensus = \"UACUAAC\";\n\t\tString candidate = \"\"; \n\t\tint currentDistance;\n\t\t\n\t\tint bestDistance = Integer.MAX_VALUE;\n\t\tString bestCandidate = \"\"; \n\t\tfor( int i = 6; i < this.intron.length() - consensus.length() - 2; i++ ) {\n\t\t\tcandidate = this.intron.substring( i, (i+consensus.length()) );\n\t\t\tcurrentDistance = StringUtils.getLevenshteinDistance(consensus, candidate); \n\t\t\tif( currentDistance <= bestDistance ) {\n\t\t\t\tbestCandidate = candidate; \n\t\t\t\tbestDistance = currentDistance; \n\t\t\t}\n\t\t}\n\t\t\n\t\t//System.out.println( bestCandidate + \"\\t\" + bestDistance ); \n\t\tthis.bps = bestCandidate; \n\t}",
"@Test\n public void testDecisionRule() {\n DataProvider provider = new DataProvider();\n provider.createDataDefinition();\n DataHandle handle = provider.getData().getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n \n // Risk before anonymization\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, 1.0d) == 0);\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n final ARXAnonymizer anonymizer = new ARXAnonymizer();\n final ARXConfiguration config = ARXConfiguration.create();\n config.addPrivacyModel(new KAnonymity(2));\n config.setSuppressionLimit(0d);\n \n ARXResult result = null;\n try {\n result = anonymizer.anonymize(provider.getData(), config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n final DataHandle outHandle = result.getOutput(false);\n \n populationUniqueness = outHandle.getRiskEstimator(ARXPopulationModel.create(provider.getData().getHandle().getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk().getFractionOfUniqueTuplesDankar();\n assertTrue(\"Is: \" + populationUniqueness, compareUniqueness(populationUniqueness, 0) == 0);\n }",
"private void processSuperHighValue(Bid bid) {\n\t}",
"public void evaluate_anti_fixedpoint() {\n // DES_action_type = 0;\n // JOptionPane.showMessageDialog(null, \"Evaluating the Anti-FP && Action-Type = \" +\n // DES_action_type);\n int[] last2_anti_fixedpoint_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n last2_anti_fixedpoint_rounds[i] = DES_anti_fixedpoint_sequence[9][i];\n last2_anti_fixedpoint_rounds[32 + i] = DES_anti_fixedpoint_sequence[8][i];\n }\n DES_anti_fixedpoint = select(last2_anti_fixedpoint_rounds, FP);\n\n for (int i = 0; i < 64; i++)\n DES_anti_fixedpoint[i] = 1 ^ DES_anti_fixedpoint[i];\n }",
"public void specialize(){\n\tdefense *= .6;\n\tattRating *= 1.4;\n\tif ( attRating > 2.0){\n\t attRating = 2.0;\n\t}\n }",
"@Test(dataProvider = \"chainPrunerData\")\n public void testAdaptivePruning(final int kmerSize, final byte[] ref, final byte[] alt, final double altFraction, final double errorRate, final int depthPerAlignmentStart, final double logOddsThreshold) {\n final RandomGenerator rng = RandomGeneratorFactory.createRandomGenerator(new Random(kmerSize + FastMath.round(10000*(errorRate + altFraction))));\n final ReadThreadingGraph graph = new ReadThreadingGraph(kmerSize);\n graph.addSequence(ref, true);\n final List<byte[]> reads = IntStream.range(0, ref.length)\n .mapToObj(start -> IntStream.range(0, depthPerAlignmentStart).mapToObj(n -> generateReadWithErrors(rng.nextDouble() < altFraction ? alt : ref, start, errorRate, rng)))\n .flatMap(s -> s).collect(Collectors.toList());\n\n reads.forEach(read -> graph.addSequence(read, false));\n\n\n // note: these are the steps in ReadThreadingAssembler::createGraph\n graph.buildGraphIfNecessary();\n\n final ChainPruner<MultiDeBruijnVertex, MultiSampleEdge> pruner = new AdaptiveChainPruner<>(0.001,\n logOddsThreshold, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n final SmithWatermanAligner aligner = SmithWatermanJavaAligner.getInstance();\n graph.recoverDanglingTails(1, 3, false, aligner, DANGLING_END_SW_PARAMETERS);\n graph.recoverDanglingHeads(1, 3, false, aligner, DANGLING_END_SW_PARAMETERS);\n graph.removePathsNotConnectedToRef();\n\n final SeqGraph seqGraph = graph.toSequenceGraph();\n seqGraph.zipLinearChains();\n seqGraph.removeSingletonOrphanVertices();\n seqGraph.removeVerticesNotConnectedToRefRegardlessOfEdgeDirection();\n seqGraph.simplifyGraph();\n seqGraph.removePathsNotConnectedToRef();\n seqGraph.simplifyGraph();\n\n final List<KBestHaplotype<SeqVertex, BaseEdge>> bestPaths = new GraphBasedKBestHaplotypeFinder<>(seqGraph).findBestHaplotypes(10);\n\n final OptionalInt altIndex = IntStream.range(0, bestPaths.size()).filter(n -> bestPaths.get(n).haplotype().basesMatch(alt)).findFirst();\n Assert.assertTrue(altIndex.isPresent());\n\n // ref path should not be pruned even if all reads are alt\n final OptionalInt refIndex = IntStream.range(0, bestPaths.size()).filter(n -> bestPaths.get(n).haplotype().basesMatch(ref)).findFirst();\n Assert.assertTrue(refIndex.isPresent());\n\n // the haplotype score is the sum of the log-10 of all branching fractions, so the alt haplotype score should come out to\n // around the log-10 of the allele fraction up to some fudge factor, assuming we didn't do any dumb pruning\n Assert.assertEquals(bestPaths.get(altIndex.getAsInt()).score(), Math.log10(altFraction), 0.5);\n Assert.assertTrue(bestPaths.size() < 15);\n }",
"public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }",
"int getTotalLeased();",
"private double calculateUvi(){\n if ( uva != Integer.MAX_VALUE\n && uvb != Integer.MAX_VALUE\n && uvd != Integer.MAX_VALUE\n && uvcomp1 != Integer.MAX_VALUE\n && uvcomp2 != Integer.MAX_VALUE\n )\n {\n // These equations came from the \"Designing the VEML6075 into an Application\" document from Vishay\n double uvacomp = (uva - uvd) - VEML_A_COEF * (uvcomp1 - uvd) - VEML_B_COEF * (uvcomp2 - uvd);\n double uvbcomp = (uvb - uvd) - VEML_C_COEF * (uvcomp1 - uvd) - VEML_D_COEF * (uvcomp2 - uvd);\n\n return ( (uvbcomp * VEML_UVB_RESP) + (uvacomp * VEML_UVA_RESP) ) / 2.0;\n }\n\n return Double.NaN;\n }",
"@Override\r\n\tpublic int computeNextVal(boolean prediction, Instance inst) {\n\t\treturn 0;\r\n\t}",
"public double GetCurOffensiveBV( boolean UseRear, boolean UseTC, boolean UseAES, boolean UseRobotic ) {\n return GetOffensiveBV();\n }",
"@Test\n public void testInbreedingCoeffForMultiallelicVC() {\n VariantContext test1 = makeVC(\"1\",Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s2\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s3\", T, C, 7099, 2530, 7099, 3056, 0, 14931),\n makeG(\"s4\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s5\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s6\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s7\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s8\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s9\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s10\", Aref, T, 2530, 0, 7099, 366, 3056, 14931));\n\n final AS_InbreedingCoeff testClass1 = new AS_InbreedingCoeff();\n final double ICresult1 = testClass1.calculateIC(test1, T);\n Assert.assertEquals(ICresult1, -0.4285714, DELTA_PRECISION, \"Pass\");\n final double ICresult1b = testClass1.calculateIC(test1, C);\n Assert.assertEquals(ICresult1b, -0.05263, DELTA_PRECISION, \"Pass\");\n\n //make sure that hets with different alternate alleles all get counted\n VariantContext test2 = makeVC(\"2\", Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, C, 4878, 1623, 11297, 0, 7970, 8847),\n makeG(\"s2\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s3\", Aref, T, 3382, 0, 6364, 1817, 5867, 12246),\n makeG(\"s4\", Aref, T, 2488, 0, 9110, 3131, 9374, 12505),\n makeG(\"s5\", Aref, C, 4530, 2006, 18875, 0, 6847, 23949),\n makeG(\"s6\", Aref, T, 5325, 0, 18692, 389, 16014, 24570),\n makeG(\"s7\", Aref, T, 2936, 0, 29743, 499, 21979, 38630),\n makeG(\"s8\", Aref, T, 6902, 0, 8976, 45, 5844, 9061),\n makeG(\"s9\", Aref, T, 5732, 0, 10876, 6394, 11408, 17802),\n makeG(\"s10\", Aref, T, 2780, 0, 25045, 824, 23330, 30939));\n\n final AS_InbreedingCoeff testClass2 = new AS_InbreedingCoeff();\n final double ICresult2 = testClass2.calculateIC(test2, T);\n Assert.assertEquals(ICresult2, -0.666666, DELTA_PRECISION, \"Pass\");\n final double ICresult2b = testClass2.calculateIC(test2, C);\n Assert.assertEquals(ICresult2b, -0.111129, DELTA_PRECISION, \"Pass\");\n }",
"private void optimiseEVProfile()\n\t{\n\t}",
"static int testUlpCase(float f, float expected) {\n float minus_f = -f;\n int failures=0;\n\n failures+=Tests.test(\"Math.ulp(float)\", f,\n Math.ulp(f), expected);\n failures+=Tests.test(\"Math.ulp(float)\", minus_f,\n Math.ulp(minus_f), expected);\n failures+=Tests.test(\"StrictMath.ulp(float)\", f,\n StrictMath.ulp(f), expected);\n failures+=Tests.test(\"StrictMath.ulp(float)\", minus_f,\n StrictMath.ulp(minus_f), expected);\n return failures;\n }",
"public void rla() {\r\n\t\tint iter = 0;\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\titer++;\r\n\t\t\t\r\n\t\t\tHashMap<RouteState, ActionValue<RouteAction>> V0 = new HashMap<RouteState, ActionValue<RouteAction>> (V);\r\n\r\n\t\t\tfor (RouteState state : Q.keySet()) {\r\n\t\t\t\tfor (RouteAction action : Q.get(state).keySet()) {\t\t\t\r\n\t\t\t\t\tdouble value = R.get(state).get(action) + discountedSum(state, action);\r\n\t\t\t\t\tQ.get(state).put(action, value);\r\n\t\t\t\t}\r\n\t\t\t\tRouteAction bestAction = Q.get(state).entrySet().stream().max((entry1, entry2) -> entry1.getValue() > entry2.getValue() ? 1 : -1).get().getKey();\r\n\t\t\t\tDouble bestValue = Q.get(state).get(bestAction);\r\n\t\t\t\tActionValue<RouteAction> av = new ActionValue<RouteAction>(bestAction, bestValue);\r\n\r\n\t\t\t\tV.put(state, av);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (goodEnough(V0, V)) break;\r\n\t\t}\r\n\t\tSystem.out.println(\"Number of iterations: \" + iter);\r\n\t}",
"private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}",
"private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public abstract void recalcNormalizationExtrema();",
"private static void BicingsimulatedAnnealingSearch(int num, int n_est, int nbicis, int nfurgo, int d1, int cas, String Cas, String H, String D, int s) {\n\n\n try {\n\n double MedT = 0;\n //double MedN = 0;\n //double MedB = 0;\n int iteraciones = 100;\n Estado Bicing = new Estado(n_est,nbicis,nfurgo,d1,s,1);\n Bicing.setList_cdesp(iteraciones);\n long StartTime = System.nanoTime();\n Problem problem = new Problem(Bicing, new sucesoresA(), new isGoal(), new Heuristic_Function());\n SimulatedAnnealingSearch search = new SimulatedAnnealingSearch(iteraciones, 1000, 125, 0.00001D);\n SearchAgent agent = new SearchAgent(problem, search);\n List L = search.getPathStates();\n Properties properties = agent.getInstrumentation();\n long EndTime = System.nanoTime();\n Estado E = (Estado) search.getGoalState();\n long time = ((EndTime - StartTime) / 1000000);\n MedT += time;\n //MedB += E.getganancia();\n // MedN += Integer.parseInt(properties.getProperty((String)properties.keySet().iterator().next()));\n // MedB /= num;\n // MedN /= num;\n // MedT /= num;\n //MedB = (Math.round(MedB*100.0)/100.0);\n Writer output;\n output = new BufferedWriter(new FileWriter(\"Estadisticas_\" + Cas + \"_D\" + D + \"_H\" + H + \"S.txt\", true));\n double [] vec = E.getearnings();\n for (int i = 0 ; i < iteraciones; ++i) {\n String S = \"\" + vec[i];\n S = S + '\\n';\n output.append(S);\n }\n output.close();\n\n /*for (int i = 0; i < E.getN_furgo(); ++i) {\n System.out.println(\"Recorrido por furgoneta \" + i + \" \" + E.getIFurgo(i).getLong_t());\n }*/\n //printEstado(E);\n //System.out.println();\n //System.out.println(E.getganancia());\n //printActions(agent.getActions());\n //printInstrumentation(agent.getInstrumentation());\n } catch (Exception var4) {\n var4.printStackTrace();\n }\n\n }",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"private void calc_q0(double[] llr) {\n\t\tfor (int i=noffs; i<llr.length; i++)\n\t\t\tq0[i-noffs] = Math.exp(llr[i]) / (1 + Math.exp(llr[i])); // beliefs\t\t\t\n\t}",
"private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }",
"@Override\n public DRFLPSolution algorithm(DRFLPInstance instance) {\n try {\n List<Future<DRFLPSolution>> futures = new ArrayList<>();\n RandomManager.reinitialize(RandomType.LEGACY, 0, this.n);\n for (int i = 0; i < n; i++) {\n int _i = i;\n futures.add(executor.submit(() -> {\n RandomManager.reset(_i);\n return alg.algorithm(instance);\n }));\n }\n var results = ConcurrencyUtil.awaitAll(futures);\n DRFLPSolution best = null;\n for(var solution: results){\n if(solution.isBetterThan(best)){\n best = solution;\n }\n }\n return best;\n } finally {\n executor.shutdown();\n }\n }",
"int[] recommendListForOneUser(int paraUserIndex, double paraLikeThreshold, int paraK, int paraN, double paraBelta,\n\t\t\tdouble paraGama) {\n\t\t// System.out.println(\"the user is \" + paraUserIndex + \" , the length is \" +\n\t\t// dataModel.uTeRateInds[paraUserIndex].length);\n\t\tint[] tempRecLists = new int[dataModel.uTeRateInds[paraUserIndex].length];\n\t\tdouble[] itemLikeRatio = new double[dataModel.uTeRateInds[paraUserIndex].length];\n\t\t// int[] itemLike = new int[dataModel.uTeRateInds[paraUserIndex].length];\n\t\t// for (int i = 0; i < itemLike.length; i++) {\n\t\t// itemLike[i] = -1;\n\t\t// }\n\t\tArrays.fill(tempRecLists, -1);\n\t\tArrays.fill(itemLikeRatio, -1);\n\t\t// Arrays.fill(itemLike, -1);\n\t\tint tempCount = 0;\n\t\t// Step 1. Predict the distribution\n\t\tfor (int i = 0; i < dataModel.uTeRateInds[paraUserIndex].length; i++) {\n\t\t\tisFriends = true;\n\t\t\tint[] tempDistribution = predict(paraUserIndex, dataModel.uTeRateInds[paraUserIndex][i], paraK);\n\n\t\t\t// System.out.println(\"the distribution is \" +\n\t\t\t// Arrays.toString(tempDistribution));\n\t\t\t// System.out.println(\"the IndicesOfFriendsRatedItem is \" +\n\t\t\t// Arrays.toString(IndicesOfFriendsRatedItem));\n\n\t\t\tif (tempDistribution == null) {\n\t\t\t\tcontinue;\n\t\t\t} // Of if\n\t\t\tdouble tempLikePro = 0;\n\t\t\tint tempTotal = 0;\n\t\t\tfor (int j = 0; j < tempDistribution.length; j++) {\n\t\t\t\tif (j >= paraLikeThreshold) {\n\t\t\t\t\ttempLikePro += (IndicesOfFriendsRatedItem[j] * 1\n\t\t\t\t\t\t\t+ (tempDistribution[j] - IndicesOfFriendsRatedItem[j]) * paraBelta);\n\t\t\t\t} // Of if\n\t\t\t\ttempTotal += (IndicesOfFriendsRatedItem[j] * 1\n\t\t\t\t\t\t+ (tempDistribution[j] - IndicesOfFriendsRatedItem[j]) * paraBelta);\n\t\t\t} // Of for i\n\n\t\t\t// System.out.println(tempLikePro + \" / \" + tempTotal);\n\n\t\t\tif (tempTotal > 1e-6) {\n\t\t\t\ttempLikePro = tempLikePro / tempTotal;\n\t\t\t} // Of if\n\n\t\t\t// Step 3. Obtain the recommend lists.\n\t\t\ttempRecLists[tempCount] = dataModel.uTeRateInds[paraUserIndex][i];\n\t\t\tif(isFriends) {//friend relationships\n\t\t\t\titemLikeRatio[tempCount] = tempLikePro;\n\t\t\t}else {//kNN\n\t\t\t\titemLikeRatio[tempCount] = tempLikePro * paraGama;\n\t\t\t}\n\t\t\t// itemLike[tempCount] = dataModel.uTeRateInds[paraUserIndex][i];\n\t\t\ttempCount++;\n\t\t} // Of for i\n\n\t\t// System.out.println(\"the reclist = \" + Arrays.toString(tempRecLists));\n\t\t// System.out.println(\"the itemLikeRatio = \" + Arrays.toString(itemLikeRatio));\n\t\t// System.out.println(\"the itemLike = \" + Arrays.toString(itemLike));\n\n\t\t// Step 4. Compress\n\t\tif (tempCount < paraN) {\n\t\t\treturn null;\n\t\t} // Of if\n\n\t\tint[] tempCompRecLists = new int[tempCount];\n\t\tdouble[] tempCompRecRatio = new double[tempCount];\n\t\tfor (int i = 0; i < tempCount; i++) {\n\t\t\ttempCompRecLists[i] = tempRecLists[i];\n\t\t\ttempCompRecRatio[i] = itemLikeRatio[i];\n\t\t} // Of for i\n\t\t\t// System.out.println(\"the recommend list's length is \" +\n\t\t\t// tempCompRecLists.length);\n\n\t\titemLike = orderItemLike(tempCompRecRatio, tempCompRecLists);\n\t\t// System.out.println(\"the itemLike = \" + Arrays.toString(itemLike));\n\n\t\tint[] result = new int[paraN];\n\t\tfor (int i = 0; i < paraN; i++) {\n\t\t\tresult[i] = itemLike[i];\n\t\t} // Of for i\n\t\tArrays.sort(result);\n\t\treturn result;\n\t}",
"public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }",
"double getExtremeSpikeProbability();",
"double getReliability();",
"public void recalc() {\n\t\tMapping mapping = getConsumerProductMatrix();\n\t\tif (mapping == null) {\n\t\t\treturn; // there is nobody to calculate recommendation for\n\t\t}\n\t\tSparseMatrix<Float64> Ct = makeC(mapping.matrix).transpose();\n\t\tSparseMatrix<Float64> B = makeB(mapping.matrix);\n\t\tSparseMatrix<Float64> CR0 = makeCR0(mapping.matrix.getNumberOfRows());\n\n\t\tSparseMatrix<Float64> PR = null;\n\t\tSparseMatrix<Float64> CR = CR0;\n\n\t\tint iterations =\n\t\t\tConfigService.CONFIG_SERVICE.getConfig(\n\t\t\t\tServerConfigKey.RECOMMENDATION_ITERATIONS).get();\n\t\tfor (int i = 0; i < iterations; i++) {\n\t\t\tPR = CR.times(B);\n\t\t\tCR = PR.times(Ct).plus(CR0);\n\t\t}\n\n\t\tsaveRecommendations(mapping, PR);\n\t}",
"@Override\n\tpublic void makeDecision() {\n\t\tDouble weightedFrontProximity;\n\t\tif (algorithmData.receiveMessageData != null && algorithmData.previousDistance != null) {\n\t\t\tdouble delay = (Time.getTime() - algorithmData.receiveMessageData.getStartTime()) / 100000000;\n\t\t\t//calculate the distance us and our predecessor have travelled since message received\n\t\t\talgorithmData.predictedPredecessorMovement = algorithmData.predecessorSpeed * delay\n\t\t\t\t\t+ 0.5 * algorithmData.predecessorAcceleration * delay * delay;\n\t\t\talgorithmData.predictedMovement = algorithmData.previousSpeed * delay\n\t\t\t\t\t+ 0.5 * algorithmData.previousAcceleration * delay * delay;\n\t\t\talgorithmData.predictedFrontProximity = algorithmData.predictedPredecessorMovement\n\t\t\t\t\t- algorithmData.predictedMovement + algorithmData.previousDistance;\n\n\t\t\talgorithmData.chosenSpeed = algorithmData.predecessorChosenSpeed;\n\t\t\talgorithmData.chosenTurnRate = algorithmData.predecessorTurnRate;\n\t\t} else {\n\t\t\t//no message received or no previous distance\n\t\t\talgorithmData.predictedFrontProximity = null;\n\t\t\talgorithmData.chosenSpeed = algorithmData.speed;\n\t\t\talgorithmData.chosenTurnRate = algorithmData.turnRate;\n\t\t}\n\t\tif (algorithmData.frontProximity != null && algorithmData.frontProximity > maxSensorDist) {\n\t\t\talgorithmData.frontProximity = null;\n\t\t}\n\t\tweightedFrontProximity = weightFrontProximity(algorithmData.predictedFrontProximity,\n\t\t\t\talgorithmData.frontProximity);\n\n\t\t// update previous state variables so that they are correct in next time period\n\t\talgorithmData.previousDistance = weightedFrontProximity;\n\t\talgorithmData.previousSpeed = algorithmData.speed;\n\t\talgorithmData.previousAcceleration = algorithmData.acceleration;\n\n\t\tif (weightedFrontProximity != null) {\n\t\t\tif (weightedFrontProximity < buffDist) {\n\t\t\t\tif (algorithmData.chosenAcceleration >= 0) {\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration * weightedFrontProximity / buffDist;\n\t\t\t\t} else {\n\t\t\t\t\t// if braking then divide by value so deceleration decreases if gap too small\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration / (weightedFrontProximity / buffDist);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (algorithmData.chosenAcceleration >= 0) {\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration\n\t\t\t\t\t\t\t* (0.75 + weightedFrontProximity / (4* buffDist));\n\t\t\t\t} else {\n\t\t\t\t\t// if braking then divide by value so deceleration decreases if gap too small\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration\n\t\t\t\t\t\t\t/ (0.75 + weightedFrontProximity / (4* buffDist));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//no messages received and proximity sensor not working\n\t\t\talgorithmData.chosenAcceleration = 0;\n\t\t}\n\n\n\t}",
"protected ProbNet step (PNEdit bestEdition) throws NormalizeNullVectorException {\n\n /* If there have been any improvements on the score, we update\n * the learnedNet. */\n try{\n probNet.doEdit(bestEdition);\n } catch (ConstraintViolationException ex){\n /* If the edition was not allowed (ModelNetworkconstraint)\n * the algorithm just goes through the next iteration of the\n * loop, asking the cache for the next best edition.\n */\n }\n catch (Exception exception){\n exception.printStackTrace();\n }\n return probNet;\n }",
"static void testAProblem(Problem aProblem,Problem optimisedSortProblem){\n\t\t\t\tIndividual originalIndividual = new Individual(aProblem);\n\t\t\t\t//Individual.initialise(originalIndividual.ourProblem.getStrings());\n\t\t\t\toriginalIndividual.gpMaterial.printAll();\n\t\t\t\tIndividualEvaluator indEval = new ByteCodeIndividualEvaluator();\n\t\t\t\tindEval.evaluateIndNoTimeLimit(originalIndividual); // This is our reference individual\n\t\t\t\toriginalIndividual.ourProblem.setBaselineRuntimeAvg(originalIndividual.getRuntimeAvg());\n\t\t\t\t\n\t\t\t\t// create a variant to compare against\n\t\t\t\t//Problem optimisedSortProblem = new Sort1Optimised();\n\t\t\t\tIndividual sortVariant = new Individual(originalIndividual, optimisedSortProblem,null);\n\t\t\t\tindEval.evaluateIndNoTimeLimit(sortVariant);\n\t\t\t\tSystem.out.println(\"Variant \"+sortVariant +\" \"+ sortVariant.getFunctionalityErrorCount()+\" \"+ sortVariant.getRuntimeAvg());\n\t\t\t\tSystem.out.println(\"timeratio: \" + sortVariant.getTimeFitnessRatio()+ \" correctness \"+ sortVariant.getCorrectness());\n\t\t\t\tSystem.out.println(\"Fitness \" + sortVariant.getFitness()+\"\\n\");\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t *\t9 May 2014 (commented out 15 Jan 2015)\n\t\t\t\t * Added to test multithreaded evaluation,\n\t\t\t\t * create a generation of individuals, then evaluate the lot. \n\t\t\t\t * (not needed, bug found in multi-threaded eval, due to programs accessing static methods when collecting results\n\t\t\t\t */\n\t\t\t\t/*for ( int i = 1 ; i < 100 ; i++){\n\t\t\t\t\toptimisedSortProblem = new Sort1Optimised();\n\t\t\t\t\tsortVariant = new Individual(originalIndividual, optimisedSortProblem,null);\n\t\t\t\t\tindEval.evaluateIndNoTimeLimit(sortVariant);\n\t\t\t\t\tSystem.out.println(\"Variant \"+sortVariant +\" \"+ sortVariant.getFunctionalityScore()+\" \"+ sortVariant.getRuntimeAvg());\n\t\t\t\t\tSystem.out.println(\"timeratio: \" + sortVariant.getTimeFitnessRatio()+ \" correctness \"+ sortVariant.getCorrectness());\n\t\t\t\t\tSystem.out.println(\"Fitness \" + sortVariant.getFitness()+\"\\n\");\n\t\t\t\t}*/\n\t}",
"@Test\n public void testSubsequentRunsWithUnsatisfiablePenalizingConstraint() {\n System.out.println(\" - test subsequent runs with unsatisfiable penalizing constraint\");\n // set constraint\n final double penalty = 7.8;\n problem.addPenalizingConstraint(new NeverSatisfiedPenalizingConstraintStub(penalty));\n // perform multiple runs (maximizing objective)\n // perform multiple runs (maximizing objective)\n System.out.format(\" - low temperature (T = %.7f)\\n\", LOW_TEMP);\n multiRunWithMaximumRuntime(searchLowTemp, MULTI_RUN_RUNTIME, MAX_RUNTIME_TIME_UNIT, NUM_RUNS, true, true);\n System.out.format(\" - medium temperature (T = %.7f)\\n\", MED_TEMP);\n multiRunWithMaximumRuntime(searchMedTemp, MULTI_RUN_RUNTIME, MAX_RUNTIME_TIME_UNIT, NUM_RUNS, true, true);\n System.out.format(\" - high temperature (T = %.7f)\\n\", HIGH_TEMP);\n multiRunWithMaximumRuntime(searchHighTemp, MULTI_RUN_RUNTIME, MAX_RUNTIME_TIME_UNIT, NUM_RUNS, true, true);\n // verify\n PenalizedEvaluation penEval;\n penEval = (PenalizedEvaluation) searchLowTemp.getBestSolutionEvaluation();\n assertEquals(penalty, penEval.getEvaluation().getValue() - penEval.getValue(), TestConstants.DOUBLE_COMPARISON_PRECISION);\n penEval = (PenalizedEvaluation) searchMedTemp.getBestSolutionEvaluation();\n assertEquals(penalty, penEval.getEvaluation().getValue() - penEval.getValue(), TestConstants.DOUBLE_COMPARISON_PRECISION);\n penEval = (PenalizedEvaluation) searchHighTemp.getBestSolutionEvaluation();\n assertEquals(penalty, penEval.getEvaluation().getValue() - penEval.getValue(), TestConstants.DOUBLE_COMPARISON_PRECISION);\n }",
"private void updatePrecisionAndRecallAndAp(List<ScoreRetrieval> results, List<QuerieDocRelevance> queryRelevance){\n List<Double> precisionQuerieAP = new ArrayList<>();\n List<Double> precisionQuerieAPRankedTop = new ArrayList<>();\n int tp=0;\n int fp=0;\n int fn=0;\n int cont=0;\n int rankMax=10;\n \n //results.stream().map(ScoreRetrieval::getDocId).filter( docId -> querieRelevance.contains(docId)).mapToInt(List::size).sum();\n \n for(ScoreRetrieval result : results){\n if(queryRelevance.stream().filter(o -> o.getDocID()==result.getDocId()).findFirst().isPresent()){ \n tp++;\n precisionQuerieAP.add(tp/(double)(tp+fp));\n if(cont<rankMax){\n precisionQuerieAPRankedTop.add(tp/(double)(tp+fp));\n }\n }else{\n fp++;\n }\n cont++;\n }\n if(precisionQuerieAP.isEmpty()){\n apRes.add(0.0);\n }else{\n apRes.add(precisionQuerieAP.stream().mapToDouble(d->d).sum()/precisionQuerieAP.size());\n }\n if(precisionQuerieAPRankedTop.isEmpty()){\n apResRankedTopLimited.add(0.0);\n }else{\n apResRankedTopLimited.add(precisionQuerieAPRankedTop.stream().mapToDouble(d->d).sum()/precisionQuerieAPRankedTop.size());\n }\n \n \n for(QuerieDocRelevance querieRel : queryRelevance){\n if(!(results.stream().filter(q -> q.getDocId()==querieRel.getDocID()).findFirst().isPresent())){\n fn++; \n }\n }\n \n precision.add(tp/(double)(tp+fp));\n recall.add(tp/(double)(tp+fn));\n }",
"public void driver() {\r\n \t// At the last time point assume exponentials are largely decayed and most of what is\r\n \t// left is the constant a[0] term.\r\n gues[0] = ySeries[ySeries.length-1];\r\n for (int i = 0; i < (a.length-1)/2; i++) {\r\n \tgues[2*i+1] = 1.0;\r\n \tgues[2*i+2] = -1.0;\r\n }\r\n super.driver();\r\n }",
"public void testPAUMChunkLearnng() throws IOException, GateException {\n // Initialisation\n System.out.print(\"Testing the PAUM method on chunk learning...\");\n File chunklearningHome = new File(new File(learningHome, \"test\"),\n \"chunklearning\");\n String configFileURL = new File(chunklearningHome,\n \"engines-paum.xml\").getAbsolutePath();\n String corpusDirName = new File(chunklearningHome, \"data-ontonews\")\n .getAbsolutePath();\n //Remove the label list file, feature list file and chunk length files.\n String wdResults = new File(chunklearningHome,\n ConstantParameters.SUBDIRFORRESULTS).getAbsolutePath();\n emptySavedFiles(wdResults);\n String inputASN = \"Key\";\n loadSettings(configFileURL, corpusDirName, inputASN, inputASN);\n // Set the evaluation mode\n RunMode runM=RunMode.EVALUATION;\n learningApi.setLearningMode(runM);\n controller.execute();\n // Using the evaluation mode for testing\n EvaluationBasedOnDocs evaluation = learningApi.getEvaluation();\n // Compare the overall results with the correct numbers\n /*assertEquals(evaluation.macroMeasuresOfResults.correct, 3);\n assertEquals(evaluation.macroMeasuresOfResults.partialCor, 1);\n assertEquals(evaluation.macroMeasuresOfResults.spurious, 19);\n assertEquals(evaluation.macroMeasuresOfResults.missing, 68);*/\n assertEquals(\"Wrong value for correct: \", 52, (int)Math.floor(evaluation.macroMeasuresOfResults.correct));\n assertEquals(\"Wrong value for partial: \", 12, (int)Math.floor(evaluation.macroMeasuresOfResults.partialCor));\n assertEquals(\"Wrong value for spurious: \", 24, (int)Math.floor(evaluation.macroMeasuresOfResults.spurious));\n assertEquals(\"Wrong value for missing: \", 30, (int)Math.floor(evaluation.macroMeasuresOfResults.missing));\n // Remove the resources\n clearOneTest();\n System.out.println(\"completed\");\n }",
"@Override\n\tprotected double calculateDependence(IterablePosting[] ips, // posting lists\n\t\t\tboolean[] okToUse, // is this posting list on the correct document?\n\t\t\tdouble[] phraseTermWeights, boolean SD // not needed\n\t) {\n\t\tBlockPosting[] postings = ProximityToolbox.getBlocks(ips);\n\t\tint[] aPositions = postings[0].getPositions();\n\t\tint[] bPositions = postings[1].getPositions();\n\n\t\t// TODO: Finish this method\n\t\treturn 1.0;\n\t}",
"public void calculateUtilityValue(Problem prob, int row, int col, Policy pol)\n\t\t{\n\t\t\tdouble maxActionVal = Double.MIN_VALUE;\n\t\t\tint maxAction;\n\t\t\tint chosenAction=0;\n\t\t\tfor(int i=0; i < ACTION_COUNT; i++)\n\t\t\t{\n\t\t\t\tdouble newSampleVal = 0;\n\n\t\t\t\t\n\t\t\t\tif(isOutOfBound(i, row, col))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tfor(int j=0; j < prob.moveProbs.length ; j++ )\n\t\t\t\t{\n\n\t\t\t\t\tint nextStateVal=0;\n\n\t\t\t\t\tif( i == UP || i == DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tnextStateVal = fetchNextStateRowOrColumn(j+1, i, row);\n\t\t\t\t\t\tnewSampleVal += prob.moveProbs[j] * utilities[nextStateVal][col];\n\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnextStateVal = fetchNextStateRowOrColumn(j+1, i, col);\n\t\t\t\t\t\tnewSampleVal += prob.moveProbs[j] * utilities[row][nextStateVal];\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(newSampleVal > maxActionVal)\n\t\t\t\t{\n\t\t\t\t\tmaxActionVal = newSampleVal;\n\t\t\t\t\tchosenAction = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tutilities[row][col] = rewards[row][col] + DISCOUNT_FACTOR * maxActionVal;\n\t\t\tif(prob.map.get(row).get(col).equals(\"G\") || prob.map.get(row).get(col).equals(\"P\"))\n\t\t\t{\n\t\t\t\tpol.bestActions[row][col] = prob.map.get(row).get(col);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpol.bestActions[row][col] = DIRECTION[chosenAction];\n\t\t\t}\n\t\t}",
"private void testWithBacktrackingInput(LcssAlgorithm algorithm) {\n\t}",
"private void raiseIgnorable(double higher, double lower) {\n this.eatable *= lower;\n this.playable *= lower;\n this.ignorable *= higher;\n }",
"void updateBeliefStateDiagnosisObs( BeliefStateDimension prev_belief,\n DiagnosisTrigger diagnosis,\n BeliefStateDimension next_belief )\n throws BelievabilityException\n {\n if (( prev_belief == null )\n || ( diagnosis == null )\n || ( next_belief == null ))\n throw new BelievabilityException\n ( \"updateBeliefStateDiagnosisObs()\",\n \"NULL parameter(s) sent in.\" );\n\n double denom = 0.0;\n String diagnosis_value = diagnosis.getSensorValue();\n\n double[] prev_belief_prob = prev_belief.getProbabilityArray();\n double[] next_belief_prob = new double[prev_belief_prob.length];\n\n if ( _logger.isDebugEnabled() )\n _logger.debug( \"Updating belief given sensor '\"\n + diagnosis.getSensorName()\n + \"' has sensed '\" + diagnosis_value + \"'\");\n\n SensorTypeModel sensor_model \n = _asset_dim_model.getSensorTypeModel \n ( diagnosis.getSensorName() );\n \n if ( sensor_model == null )\n throw new BelievabilityException\n ( \"updateBeliefStateDiagnosisObs()\",\n \"Cannot find sensor model for: \"\n + diagnosis.getSensorName() );\n \n // This 'obs_prob' is a matrix of conditional probabilities of\n // an observation (i.e., diagnosis) given an asset state. The\n // first index is the observation and the second is the state.\n //\n double[][] obs_prob = sensor_model.getObservationProbabilityArray();\n\n if ( _logger.isDetailEnabled() )\n _logger.detail( \"Observation probabilities: \" \n + _asset_dim_model.getStateDimensionName() + \"\\n\" \n + ProbabilityUtils.arrayToString( obs_prob ));\n\n\n int obs_idx = sensor_model.getObsNameIndex( diagnosis_value );\n\n if ( obs_idx < 0 )\n throw new BelievabilityException\n ( \"updateBeliefStateDiagnosisObs()\",\n \"Diagnosis value '\" \n + diagnosis_value + \"' not found. \"\n + diagnosis.toString() );\n \n if ( _logger.isDetailEnabled() )\n _logger.detail( \"Pre-update: \" \n + ProbabilityUtils.arrayToString( prev_belief_prob ));\n\n for ( int state = 0; state < prev_belief_prob.length; state++ ) \n {\n\n next_belief_prob[state] \n = prev_belief_prob[state] * obs_prob[state][obs_idx];\n \n denom += next_belief_prob[state];\n \n } // for state\n\n if ( _logger.isDetailEnabled() )\n _logger.detail( \"Pre-normalization: \" \n + ProbabilityUtils.arrayToString( next_belief_prob ));\n \n // Here we choose to ignore impossible observations, though we\n // will give a warning. We do not want to completely abort\n // this operation, since the previous belief state will more\n // than likely have some threat transition information in it.\n // Thus, we choose to leave the belief state as is, which is\n // why we simply copy the arrays over. \n //\n if( Precision.isZeroComputation( denom ))\n {\n if ( _logger.isWarnEnabled() )\n _logger.warn( \"updateBeliefStateDiagnosisObs(): \"\n + \"Diagnosis is not possible. i.e., Pr(\"\n + diagnosis_value + \") = 0.0. Ignoring diagnosis.\");\n next_belief.setProbabilityArray\n ( prev_belief.getProbabilityArray());\n\n return;\n } // if found an impossible observation\n\n for( int i = 0; i < next_belief_prob.length; i++ )\n next_belief_prob[i] /= denom;\n\n if ( _logger.isDetailEnabled() )\n _logger.detail( \"Post-normalization: \" \n + ProbabilityUtils.arrayToString( next_belief_prob ));\n\n next_belief.setProbabilityArray( next_belief_prob );\n\n }",
"private int getU(int[] inputs, int[] original) {\n\t\tint u = 0; \n\t\tint u2 = 0;\n\t\tfor(int i = 0 ; i < inputs.length ; i++) {\n\t\t\tu += inputs[i];\n\t\t\tu2 += original[i];\n\t\t}\n\t\treturn u <= u2 ? u : u2;\n\t}",
"@Override\n\tprotected double getAdditionalUsageLosses(final IInternalParameters parameters,\n\t\t\tfinal IEnergyState state) {\n\t\tfinal IConstants constants = parameters.getConstants();\n\t\tif (getStore().getVolume() >= constants.get(HeatingSystemConstants.STORAGE_COMBI_VOLUME_THRESHOLD)) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\tfinal double A = constants.get(HeatingSystemConstants.STORAGE_COMBI_LOSS_TERMS, 0);\n\n\t\t\tfinal double volumeDemanded = state.getTotalDemand(EnergyType.DemandsHOT_WATER_VOLUME);\n\n\t\t\tfinal double fu =\n\t\t\tMath.min(1.0d,\n\t\t\t\t\tvolumeDemanded\n\t\t\t\t\t/\n\t\t\t\t\tconstants.get(HeatingSystemConstants.COMBI_HOT_WATER_USAGE_LIMIT));\n\n\t\t\tfinal double B = getStore().getVolume() - constants.get(HeatingSystemConstants.STORAGE_COMBI_LOSS_TERMS, 1);\n\n\t\t\tfinal double combiLosses = fu * (A - B * constants.get(HeatingSystemConstants.STORAGE_COMBI_LOSS_TERMS, 2));\n\t\t\treturn combiLosses;\n\t\t}\n\t}",
"@Override\n public List<Feature> viterbi(HiddenMarkovModel<AminoAcid, Feature> model, List<AminoAcid> observedSequence) {\n List<Map<Feature, Double>> pathProbs = new ArrayList<>();\n //Stores: index of time step - current hidden state - the most probable previous hidden state\n List<Map<Feature, Feature>> helperVars = new ArrayList<>();\n\n Map<Feature, Map<Feature, Double>> transitions = model.getTransitionMatrix();\n Map<Feature, Map<AminoAcid, Double>> emissions = model.getEmissionMatrix();\n\n for (int i = 0; i < observedSequence.size(); i++) {\n Map<Feature, Double> newPathProb = new HashMap<>();\n Map<Feature, Feature> newHelpVar = new HashMap<>();\n AminoAcid currAcid = observedSequence.get(i);\n\n //Generate values for all possible current types\n for (Feature currFeature : Feature.values()) {\n //For first observation, there is no previous type, so the probability is only the emission prob\n if (i == 0) {\n newPathProb.put(currFeature, Math.log(emissions.get(currFeature).get(currAcid)));\n //Ensure that the time step corresponds with list index\n newHelpVar.put(currFeature, null);\n }\n else {\n //Deduce the previous state which outputs the greatest probability\n Feature maxPrevFeature = null;\n double maxProbability = Double.NEGATIVE_INFINITY;\n for (Feature prevFeature : Feature.values()) {\n double currentProb = pathProbs.get(i-1).get(prevFeature)\n + Math.log(transitions.get(prevFeature).get(currFeature))\n + Math.log(emissions.get(currFeature).get(currAcid));\n if (currentProb > maxProbability || maxPrevFeature == null) {\n maxPrevFeature = prevFeature;\n maxProbability = currentProb;\n }\n }\n newPathProb.put(currFeature, maxProbability);\n newHelpVar.put(currFeature, maxPrevFeature);\n }\n }\n pathProbs.add(newPathProb);\n helperVars.add(newHelpVar);\n }\n\n //Now backtrack to obtain ordering with maximum probability\n LinkedList<Feature> result = new LinkedList<>();\n Feature prevAddedType = Feature.END;\n result.add(prevAddedType);\n for (int i = helperVars.size() -1; i > 0; i--) {\n result.addFirst(helperVars.get(i).get(prevAddedType));\n prevAddedType = helperVars.get(i).get(prevAddedType);\n }\n return result;\n }",
"@Override\r\n public void updateModel(Bid opponentBid, double time) {\r\n if (negotiationSession.getOpponentBidHistory().size() < 2) {\r\n return;\r\n }\r\n int numberOfUnchanged = 0;\r\n // get the current bid of the opponent\r\n BidDetails oppBid = negotiationSession.getOpponentBidHistory().getHistory()\r\n .get(negotiationSession.getOpponentBidHistory().size() - 1);\r\n // get the previous bid of the opponent\r\n BidDetails prevOppBid = negotiationSession.getOpponentBidHistory().getHistory()\r\n .get(negotiationSession.getOpponentBidHistory().size() - 2);\r\n HashMap<Integer, Integer> diffSet = determineDifference(prevOppBid, oppBid);\r\n\r\n // count the number of unchanged issues in value\r\n for (Integer i : diffSet.keySet()) {\r\n if (diffSet.get(i) == 0)\r\n numberOfUnchanged++;\r\n }\r\n\r\n // This is the value to be added to weights of unchanged issues before normalization.\r\n // Also the value that is taken as the minimum possible weight,\r\n // (therefore defining the maximum possible also).\r\n double goldenValue = learnCoef / (double) amountOfIssues;\r\n // The total sum of weights before normalization.\r\n double totalSum = 1D + goldenValue * (double) numberOfUnchanged;\r\n // The maximum possible weight\r\n double maximumWeight = 1D - ((double) amountOfIssues) * goldenValue / totalSum;\r\n\r\n // re-weighing issues while making sure that the sum remains 1\r\n for (Integer i : diffSet.keySet()) {\r\n if (diffSet.get(i) == 0 && opponentUtilitySpace.getWeight(i) < maximumWeight)\r\n opponentUtilitySpace.setWeight(opponentUtilitySpace.getDomain().getObjectives().get(i),\r\n (opponentUtilitySpace.getWeight(i) + goldenValue) / totalSum);\r\n else\r\n opponentUtilitySpace.setWeight(opponentUtilitySpace.getDomain().getObjectives().get(i),\r\n opponentUtilitySpace.getWeight(i) / totalSum);\r\n }\r\n\r\n // Then for each issue value that has been offered last time, a constant\r\n // value is added to its corresponding ValueDiscrete.\r\n try {\r\n for (Entry<Objective, Evaluator> e : opponentUtilitySpace.getEvaluators()) {\r\n // cast issue to discrete and retrieve value. Next, add constant\r\n // learnValueAddition to the current preference of the value to\r\n // make it more important\r\n ((EvaluatorDiscrete) e.getValue()).setEvaluation(\r\n oppBid.getBid().getValue(((IssueDiscrete) e.getKey()).getNumber()),\r\n (learnValueAddition + ((EvaluatorDiscrete) e.getValue()).getEvaluationNotNormalized(\r\n ((ValueDiscrete) oppBid.getBid().getValue(((IssueDiscrete) e.getKey()).getNumber())))));\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void calculateEffectiveness(){\n double[] typeEffective = new double[18];\n \n for(int i = 0; i < 18; i++){\n typeEffective[i] = tc.getEffectiveNumber(i, tc.convertType(type1));\n }\n \n if(type2 != null){\n for(int i = 0; i < 18; i++){\n typeEffective[i] *= tc.getEffectiveNumber(i, tc.convertType(type2));\n }\n }\n \n for(int i = 0; i < 18; i++){\n if(typeEffective[i] != 1){\n if(typeEffective[i] > 1){\n double[] newWeak = {i,typeEffective[i]};\n weak.add(newWeak);\n }else{\n double[] newStrong = {i,typeEffective[i]};\n strong.add(newStrong);\n }\n }\n }\n }",
"public void updateHopsForIBU(double ibu) {\n\t\tRecipeIngredient ri = getBitteringHops();\n\t\tHops h = (Hops) ri.getIngredient();\n\t\tdouble ob = (0.01335 * getIBU() * m_batchSize) / 0.30; // ob ~ Old Bitterness\n\t\tdouble nb = (0.01335 * ibu * m_batchSize) / 0.30; // nb ~ New Bitterness\n\t\t\n\t\t//TODO explain crazy algebra\n\t\tdouble newAmt = (nb - (ob - (ri.getAmount() * (h.getAlphaAcid() * (h.getBoilTime()/60) )))) / (h.getAlphaAcid() * (h.getBoilTime()/60));\n\t\t//TODO loop through hops or update slider underneath user. Could use bool return value for updating sliders.\n\t\tif (newAmt < 0) {newAmt = 0;} //No negative amounts.\n\t\tri.setAmount(newAmt);\n\t}"
] | [
"0.58324426",
"0.5489201",
"0.53820795",
"0.53361386",
"0.53274024",
"0.5316997",
"0.52796596",
"0.52309275",
"0.5214268",
"0.520948",
"0.5177799",
"0.5170669",
"0.5156676",
"0.51091975",
"0.50787944",
"0.50751066",
"0.50734615",
"0.5070566",
"0.50516033",
"0.5043201",
"0.50185883",
"0.50129604",
"0.5003139",
"0.4996016",
"0.49933818",
"0.49924576",
"0.49856147",
"0.4971783",
"0.49341023",
"0.49339512",
"0.49164757",
"0.49156913",
"0.49156353",
"0.491444",
"0.49062547",
"0.49031472",
"0.49030516",
"0.48925662",
"0.48847613",
"0.48732322",
"0.48695624",
"0.48657113",
"0.48447028",
"0.4842387",
"0.48350376",
"0.48289517",
"0.4828404",
"0.48205554",
"0.48205316",
"0.48202732",
"0.48091474",
"0.48039824",
"0.47999164",
"0.4799529",
"0.4796307",
"0.47959396",
"0.4791264",
"0.47903356",
"0.4776077",
"0.4773059",
"0.47718278",
"0.4768734",
"0.47573444",
"0.47533703",
"0.4749953",
"0.47494987",
"0.4747714",
"0.4747132",
"0.47461167",
"0.47455963",
"0.47441468",
"0.4736719",
"0.4726023",
"0.47177014",
"0.4717629",
"0.4717564",
"0.47122487",
"0.47113666",
"0.47099558",
"0.47084686",
"0.47084367",
"0.47051042",
"0.47033897",
"0.4702992",
"0.47025433",
"0.46993357",
"0.4698025",
"0.46918273",
"0.469138",
"0.46846437",
"0.46832877",
"0.46827197",
"0.46772006",
"0.46733934",
"0.46722725",
"0.46720877",
"0.4667892",
"0.4667366",
"0.4667005",
"0.46587372",
"0.46565694"
] | 0.0 | -1 |
Recommends using an UB algorithm. Mixed step. | public static void mixedRecommend(final int nFolds, EngineParameter eparams, final String inPath) {
List<String> trainingFiles;
String trainPath, testPath;
for (int i = 0; i < nFolds; i++) {
trainPath = inPath+"train_"+i+".csv";
testPath = inPath+"test_"+i+".csv";
org.apache.mahout.cf.taste.model.DataModel trainModel;
org.apache.mahout.cf.taste.model.DataModel testModel;
try {
trainModel = new FileDataModel(new File(trainPath));
testModel = new FileDataModel(new File(testPath));
} catch (IOException e) {
e.printStackTrace();
return;
}
trainingFiles = new ArrayList<String>();
trainingFiles.add(trainPath);
DataSourceParams dsp = eparams.getDataSouceParams();
eparams.setDataSource(trainingFiles, dsp.getEnclosure(), " ", false, false);
eparams.setEngineName("EngineFold"+i);
eparams.setTestFile(testPath);
eparams.setServing("br.ufsc.lapesd.orbs.example.crossvalidation.ServingToFile");
Engine engine;
switch (eparams.getEngineType()) {
case "br.ufsc.lapesd.orbs.example.ucfclassic.UCFClassicEngine":
engine = new UCFClassicEngine(eparams);
break;
case "br.ufsc.lapesd.orbs.example.ucfmultiattribute.UCFMultiAttributeEngine":
engine = new UCFMultiAttributeEngine(eparams);
break;
case "br.ufsc.lapesd.orbs.core.ProposalEngine":
engine = new UCFProposalEngine(eparams);
break;
default:
System.out.println("Declared engine no expected. Using ClassicNeighborhoodAnalyzerEngine instead.");
engine = new UCFClassicEngine(eparams);
break;
}
System.out.println("EngineFold "+ i +" is start training.");
engine.train();
System.out.println("EngineFold "+ i +" is receiving queries.");
LongPrimitiveIterator users;
try {
users = testModel.getUserIDs();
while (users.hasNext()) {
long u = users.nextLong();
engine.query(new Query(String.valueOf(u), trainModel.getNumItems(), null, null, null));
}
} catch (TasteException e) {
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public static void tinyUBTest() {\n final double[] answers = {0.5307575646626514, 0.7264168965132833, 0.860376939237304,\n 0.952744626134358, 0.9954079673114701, 1.0};\n final double kappa = 2.0;\n assertTrue(1.0 == approximateUpperBoundOnP(0, 0, kappa));\n final long n = 5;\n for (long k = 0; k <= n; k++) {\n final double ub = approximateUpperBoundOnP(n, k, kappa);\n final double est = estimateUnknownP(n, k);\n assertTrue(ub >= est);\n assertTrue(Math.abs(ub - answers[(int) k]) < 1e-14);\n // System.out.printf (\"UB\\t%d\\t%d\\t%.1f\\t%.16g%n\", n, k, kappa, ub);\n }\n }",
"private void runBest() {\n }",
"private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }",
"double find_min_takeoff_v_old_algorithm_aux (double min_lift, double max_drag, double speed, double speed_step, double pitch_init, double pitch_step) {\n double pitch = pitch_init;\n double pitch_limit = aoa_max*0.7;\n {\n trace(\"speed_step: \" + speed_step + \" pitch_step: \" + pitch_step);\n for (; speed < v_max; speed += speed_step) {\n velocity = speed;\n // if the startimg pitch guess when at this point was too high, \n // drag will be too big at this point; then reduce pitch\n while (pitch > aoa_min/2) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag)\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n else \n break; // while (pitch > aoa_min/2)\n } \n \n trace(\"for() speed: \" + speed + \" pitch: \" + pitch);\n for (;pitch < pitch_limit; pitch += pitch_step) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag) {\n // stop increasing pitch, won't work. need more speed\n trace(\"too much drag. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift());\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n break; // for (pitch...)\n }\n if (foil_lift() >= min_lift) {\n if (speed_step > 0.25) {\n trace(\"request reiterate. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift() + \" speed_step: \" + speed_step);\n return Math.max(0, velocity - speed_step); // request to reiterate\n } else {\n // done!\n make_min_takeoff_speed_info(min_lift, max_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + min_takeoff_speed_info);\n return -1;\n }\n } \n }\n // need to start from lowest pitch?\n if (pitch >= pitch_limit) pitch = pitch_init;\n }\n }\n return -2; // can not find solution\n }",
"private void evaluateProbabilities()\n\t{\n\t}",
"@Test\n public void badChoicePunisher() {\n Edge[] edgelist = {new Edge(new int[] {1, 7}), new Edge(new int[] {1, 8}),\n new Edge(new int[] {7, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist, 8, 2);\n\n\n Edge[] edgelist1 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist1, 7, 1);\n\n Edge[] edgelist2 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5}), new Edge(new int[] {2, 8})};\n timeMethod(edgelist2, 8, 2);\n\n Edge[] edgelist3 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist3, 7, 1);\n }",
"public void testPAUMChunkLearnng() throws IOException, GateException {\n // Initialisation\n System.out.print(\"Testing the PAUM method on chunk learning...\");\n File chunklearningHome = new File(new File(learningHome, \"test\"),\n \"chunklearning\");\n String configFileURL = new File(chunklearningHome,\n \"engines-paum.xml\").getAbsolutePath();\n String corpusDirName = new File(chunklearningHome, \"data-ontonews\")\n .getAbsolutePath();\n //Remove the label list file, feature list file and chunk length files.\n String wdResults = new File(chunklearningHome,\n ConstantParameters.SUBDIRFORRESULTS).getAbsolutePath();\n emptySavedFiles(wdResults);\n String inputASN = \"Key\";\n loadSettings(configFileURL, corpusDirName, inputASN, inputASN);\n // Set the evaluation mode\n RunMode runM=RunMode.EVALUATION;\n learningApi.setLearningMode(runM);\n controller.execute();\n // Using the evaluation mode for testing\n EvaluationBasedOnDocs evaluation = learningApi.getEvaluation();\n // Compare the overall results with the correct numbers\n /*assertEquals(evaluation.macroMeasuresOfResults.correct, 3);\n assertEquals(evaluation.macroMeasuresOfResults.partialCor, 1);\n assertEquals(evaluation.macroMeasuresOfResults.spurious, 19);\n assertEquals(evaluation.macroMeasuresOfResults.missing, 68);*/\n assertEquals(\"Wrong value for correct: \", 52, (int)Math.floor(evaluation.macroMeasuresOfResults.correct));\n assertEquals(\"Wrong value for partial: \", 12, (int)Math.floor(evaluation.macroMeasuresOfResults.partialCor));\n assertEquals(\"Wrong value for spurious: \", 24, (int)Math.floor(evaluation.macroMeasuresOfResults.spurious));\n assertEquals(\"Wrong value for missing: \", 30, (int)Math.floor(evaluation.macroMeasuresOfResults.missing));\n // Remove the resources\n clearOneTest();\n System.out.println(\"completed\");\n }",
"public void computeWinnerDeterminationU()\r\n\t{\r\n\t\tif( _plans.size() == 0)\r\n\t\t{\r\n\t\t\t_allocation = new AllocationWoD();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t_randGenerator.setSeed(_seed);\r\n\t\t\r\n\t\tdouble maxExpectedUtility = 0.;\r\n\t\tint itsIdx = -1;\r\n\t\tint itsAtom = -1;\r\n\t\tfor(int i = 0; i < _plans.size(); ++i)\t\t\t\t\t\t\t\t\t// for every buyer\r\n\t\t\tfor(int j = 0; j < _plans.get(i).getNumberOfAtoms(); ++j)\t\t\t// for every plan he has value for\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get(i).getAtom(j));\r\n\t\t\t\tif(_paymentRule.equals(\"SecondPrice\"))\r\n\t\t\t\t\tplan.resolveWithSecondPrice();\r\n\t\t\t\telse if(_paymentRule.equals(\"FirstPrice\"))\r\n\t\t\t\t\tplan.resolveWithFirstPrice();\r\n\t\t\t\telse throw new RuntimeException(\"Cannot resolve the type: \" + _paymentRule);\r\n\t\t\t\t\r\n\t\t\t\tdouble expectedUtility = plan.computeExpectedValue() - plan.getPlanExpectedPayment();\r\n\t\t\t\t\r\n\t\t\t\tif( expectedUtility >= maxExpectedUtility )\r\n\t\t\t\t{\r\n\t\t\t\t\tmaxExpectedUtility = expectedUtility;\r\n\t\t\t\t\titsIdx = i;\r\n\t\t\t\t\titsAtom = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t_allocation = new AllocationWoD();\r\n\r\n\t\tif(itsIdx >= 0)\r\n\t\t{\r\n\t\t\tList<Integer> allocatedBundles = new LinkedList<Integer>();\r\n\t\t\tallocatedBundles.add(itsAtom);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get( itsIdx ).getAtom( itsAtom ));\r\n\t\t\t\t\r\n\t\t\t\tList<Integer> actuallyAllocatedTuples = new LinkedList<Integer>();\r\n\t\t\t\tfor(int i = 0; i < plan.getNumberOfFragments(); ++i)\r\n\t\t\t\t\tactuallyAllocatedTuples.add( plan.getMinNumberOfRecords(i) + _randGenerator.nextInt(plan.getMaxNumberOfRecords(i) - plan.getMinNumberOfRecords(i)) );\r\n\r\n\t\t\t\tif(plan.getAllocatedSellers().size() < 1)\r\n\t\t\t\t\tthrow new RuntimeException(\"No sellers in plan: \" + plan.toString());\r\n\t\t\t\t\r\n\t\t\t\tplan.setActuallyAllocatedRecords(actuallyAllocatedTuples);\r\n\t\t\t\tList<Integer> sellersInvolved = plan.getAllocatedSellers();\r\n\t\t\t\t\r\n\t\t\t\tList<ComplexSemanticWebType> allocatedPlans = new LinkedList<ComplexSemanticWebType>();\r\n\t\t\t\tallocatedPlans.add(plan);\r\n\t\t\t\t_allocation.addAllocatedAgent(plan.getAgentId(), sellersInvolved, allocatedBundles,\r\n\t\t\t\t\t\t\t\t\t\t\t plan.computeExpectedValue(), plan.computeExpectedCosts());\r\n\t\t\t\t_allocation.addAllocatedPlans(allocatedPlans, true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"abstract void uminus();",
"private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}",
"@Test\n public void testAdaptivePruningWithBadBubble() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n final SeqVertex F = new SeqVertex(\"F\");\n final SeqVertex G = new SeqVertex(\"G\");\n final SeqVertex H = new SeqVertex(\"H\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, E, F, G, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, F, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, G, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), E, C);\n\n if (variantPresent) {\n graph.addVertices(H);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, H, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_LOG_ODDS_THRESHOLD,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(H));\n }\n }\n }",
"double getMissChance();",
"public abstract void BoostNerf(int boost);",
"private static void badApproach() {\n\t\t\n\t\tList<Double> result = new ArrayList<>();\n\t\t\n\t\tThreadLocalRandom.current()\n\t\t\t.doubles(10_000).boxed()\n\t\t\t.forEach(\n\t\t\t\t\td -> NewMath.inv(d)\n\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\tinv -> NewMath.sqrt(inv)\n\t\t\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\t\t\t\tsqrt -> result.add(sqrt)\n\t\t\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\n\t\tSystem.out.println(\"# result = \"+result.size());\n\t\t\n\t}",
"private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"private void computeOutcomePrediction(GameObserver gameObs) {\n int nProfiles = eGame.getNumProfiles();\n while (gameObs.numObsLeft() > 0 &&\n eGame.getTotalNumSamples() < nProfiles) {\n\n int newBR = computeBetterResponse(currentPlayer, gameObs);\n\n // not enough samples to compute the next BR\n if (newBR == NO_SAMPLES_FLAG) {\n break;\n }\n\n // no BR for this player; try another player\n // if no players are left, we have found an equilibrium\n else if (newBR == NO_BR_FLAG) {\n if (lastPlayerWithBR == currentPlayer) {\n checkStability();\n selectRandomUnexploredProfile(gameObs);\n updateCurrentPlayer();\n } else {\n updateCurrentPlayer();\n }\n }\n\n // we have found a new BR\n else {\n // flag errors\n if (newBR < 0 || newBR > nActs[currentPlayer]) {\n throw new RuntimeException(\"Invalid BR in IBRD: \" + currentPlayer + \" \" + newBR);\n }\n\n // update the current profile and tabu list\n tabu.setValue(true, currentOutcome);\n currentOutcome[currentPlayer] = newBR;\n lastPlayerWithBR = currentPlayer;\n updateCurrentPlayer();\n }\n }\n\n // update \"global\" prediction based on all data so far\n updateGlobalOutcomePrediction();\n\n //System.out.println(\"Done with this iteration; no more samples.\");\n //System.out.println(\"Samples: \" + gameObs.getNumObs());\n }",
"@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }",
"@Override\n public void computeSatisfaction() {\n\n }",
"private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }",
"private void testWithBacktrackingInput(LcssAlgorithm algorithm) {\n\t}",
"public void antiderivative () {\n antiderivative(0.0);\n }",
"public void calculateProbabilities(){\n\t}",
"public interface AMDPModelLearner extends AMDPPolicyGenerator{\n\n\n public void updateModel(State s, Action a, List<Double> rewards, State sPrime, GroundedTask gt);\n\n\n}",
"private void checkStability() {\n double maxDeviation = Double.NEGATIVE_INFINITY;\n\n DeviationIterator itr = new DeviationIterator(currentOutcome, nActs);\n while (itr.hasNext()) {\n int[] devOutcome = itr.next();\n\n // this shouldn't happen\n if (eGame.getNumSamples(devOutcome) <= 0) {\n System.out.println(\"BRD: checking equilibrium with unsampled deviations!\");\n System.out.println(\"Current: \" + Arrays.toString(currentOutcome));\n System.out.println(\"Unsampled: \" + Arrays.toString(devOutcome));\n return;\n }\n\n double devBenefit = eGame.getPayoff(devOutcome, itr.getDeviatingPlayer()) -\n eGame.getPayoff(currentOutcome, itr.getDeviatingPlayer());\n\n maxDeviation = Math.max(maxDeviation, devBenefit);\n\n // terminate early; not better than one we have already confirmed\n if (maxDeviation >= confirmedStability) return;\n }\n\n if (maxDeviation < confirmedStability) {\n confirmedStability = maxDeviation;\n mostStableConfirmed = currentOutcome.clone();\n if (samplesToConfirmEquilibrium < 0 &&\n confirmedStability <= 0) {\n samplesToConfirmEquilibrium = eGame.getTotalNumSamples();\n }\n }\n }",
"private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }",
"@Test\n @Order(8)\n void taillardTestMoreIterations() {\n try {\n\n for (int i = 0; i < SearchTestUtil.taillardFilenames.length; i++) {\n int output;\n float sumTabu = 0;\n int minTabu = Integer.MAX_VALUE;\n float sumRecuit = 0;\n int minRecuit = Integer.MAX_VALUE;\n System.out.println(\"Run#\" + SearchTestUtil.taillardFilenames[i]);\n assignementProblem.taillardInitializer(SearchTestUtil.taillardFilenames[i]);\n assignementProblem.setNeighborsFunction(NEIGHBORHOOD_TYPE, assignementProblem.getAssignmentData().getLength());\n for (int j = 0; j < 10; j++) {\n assignementProblem.setInCombination(Combination.generateRandom(assignementProblem.getAssignmentData().getLength()));\n\n System.out.println(\"\\n \\t Test#\"+j);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumTabu += output;\n if (output < minTabu) minTabu = output;\n\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumRecuit += output;\n if (output < minRecuit) minRecuit = output;\n }\n\n\n System.out.println(\"\\tAverage tabu \" + sumTabu / 10);\n System.out.println(\"\\tMinimum found \" + minTabu);\n\n System.out.println(\"\\tAverage recuit \" + sumRecuit / 10);\n System.out.println(\"\\tMinimum found \" + minRecuit);\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private static void normal(){\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n\n //NSGAII algorithm = new NSGAII();\n SPEA2 algorithm = new SPEA2();\n //SPEAHADKA algorithm = new SPEAHADKA();\n //AEMMT algorithm = new AEMMT();\n //AEMMD algorithm = new AEMMD();\n //MOEAD algorithm = new MOEAD();\n\n int x =1;\n int counter = 0;\n\n if (AEMMD.class.isInstance(algorithm) || AEMMT.class.isInstance(algorithm)){\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n }\n else{\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n }\n\n while (counter < x) {\n algorithm.runAlgorithm(problem);\n counter++;\n }\n }",
"public static void main(String[] args) throws FileFormatException,\n IOException {\n \n OpdfMultiGaussianFactory initFactoryPunch = new OpdfMultiGaussianFactory(\n 3);\n \n Reader learnReaderPunch = new FileReader(\n \"punchlearn.seq\");\n List<List<ObservationVector>> learnSequencesPunch = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(), learnReaderPunch);\n learnReaderPunch.close();\n \n KMeansLearner<ObservationVector> kMeansLearnerPunch = new KMeansLearner<ObservationVector>(\n 10, initFactoryPunch, learnSequencesPunch);\n // Create an estimation of the HMM (initHmm) using one iteration of the\n // k-Means algorithm\n Hmm<ObservationVector> initHmmPunch = kMeansLearnerPunch.iterate();\n \n // Use BaumWelchLearner to create the HMM (learntHmm) from initHmm\n BaumWelchLearner baumWelchLearnerPunch = new BaumWelchLearner();\n Hmm<ObservationVector> learntHmmPunch = baumWelchLearnerPunch.learn(\n initHmmPunch, learnSequencesPunch);\n \n // Create HMM for scroll-down gesture\n \n OpdfMultiGaussianFactory initFactoryScrolldown = new OpdfMultiGaussianFactory(\n 3);\n \n Reader learnReaderScrolldown = new FileReader(\n \"scrolllearn.seq\");\n List<List<ObservationVector>> learnSequencesScrolldown = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(),\n learnReaderScrolldown);\n learnReaderScrolldown.close();\n \n KMeansLearner<ObservationVector> kMeansLearnerScrolldown = new KMeansLearner<ObservationVector>(\n 10, initFactoryScrolldown, learnSequencesScrolldown);\n // Create an estimation of the HMM (initHmm) using one iteration of the\n // k-Means algorithm\n Hmm<ObservationVector> initHmmScrolldown = kMeansLearnerScrolldown\n .iterate();\n \n // Use BaumWelchLearner to create the HMM (learntHmm) from initHmm\n BaumWelchLearner baumWelchLearnerScrolldown = new BaumWelchLearner();\n Hmm<ObservationVector> learntHmmScrolldown = baumWelchLearnerScrolldown\n .learn(initHmmScrolldown, learnSequencesScrolldown);\n \n // Create HMM for send gesture\n \n OpdfMultiGaussianFactory initFactorySend = new OpdfMultiGaussianFactory(\n 3);\n \n Reader learnReaderSend = new FileReader(\n \"sendlearn.seq\");\n List<List<ObservationVector>> learnSequencesSend = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(), learnReaderSend);\n learnReaderSend.close();\n \n KMeansLearner<ObservationVector> kMeansLearnerSend = new KMeansLearner<ObservationVector>(\n 10, initFactorySend, learnSequencesSend);\n // Create an estimation of the HMM (initHmm) using one iteration of the\n // k-Means algorithm\n Hmm<ObservationVector> initHmmSend = kMeansLearnerSend.iterate();\n \n // Use BaumWelchLearner to create the HMM (learntHmm) from initHmm\n BaumWelchLearner baumWelchLearnerSend = new BaumWelchLearner();\n Hmm<ObservationVector> learntHmmSend = baumWelchLearnerSend.learn(\n initHmmSend, learnSequencesSend);\n \n Reader testReader = new FileReader(\n \"scroll.seq\");\n List<List<ObservationVector>> testSequences = ObservationSequencesReader\n .readSequences(new ObservationVectorReader(), testReader);\n testReader.close();\n \n short gesture; // punch = 1, scrolldown = 2, send = 3\n double punchProbability, scrolldownProbability, sendProbability;\n for (int i = 0; i <= 4; i++) {\n punchProbability = learntHmmPunch.probability(testSequences\n .get(i));\n gesture = 1;\n scrolldownProbability = learntHmmScrolldown.probability(testSequences\n .get(i));\n if (scrolldownProbability > punchProbability) {\n gesture = 2;\n }\n sendProbability = learntHmmSend.probability(testSequences\n .get(i));\n if ((gesture == 1 && sendProbability > punchProbability)\n || (gesture == 2 && sendProbability > scrolldownProbability)) {\n gesture = 3;\n }\n if (gesture == 1) {\n System.out.println(\"This is a punch gesture\");\n } else if (gesture == 2) {\n System.out.println(\"This is a scroll-down gesture\");\n } else if (gesture == 3) {\n System.out.println(\"This is a send gesture\");\n }\n }\n }",
"@SubL(source = \"cycl/inference/harness/inference-balanced-tactician-motivation.lisp\", position = 24008) \n public static final SubLObject balanced_strategy_problem_is_the_rest_of_an_early_removalP(SubLObject problem, SubLObject strategy) {\n {\n SubLObject set_contents_var = inference_datastructures_problem.problem_dependent_links(problem);\n SubLObject basis_object = set_contents.do_set_contents_basis_object(set_contents_var);\n SubLObject state = NIL;\n for (state = set_contents.do_set_contents_initial_state(basis_object, set_contents_var); (NIL == set_contents.do_set_contents_doneP(basis_object, state)); state = set_contents.do_set_contents_update_state(state)) {\n {\n SubLObject restriction_link = set_contents.do_set_contents_next(basis_object, state);\n if ((NIL != set_contents.do_set_contents_element_validP(state, restriction_link))) {\n if ((NIL != inference_datastructures_problem_link.problem_link_has_typeP(restriction_link, $kw9$RESTRICTION))) {\n {\n SubLObject non_focal_problem = inference_datastructures_problem_link.problem_link_supported_problem(restriction_link);\n SubLObject set_contents_var_16 = inference_datastructures_problem.problem_dependent_links(non_focal_problem);\n SubLObject basis_object_17 = set_contents.do_set_contents_basis_object(set_contents_var_16);\n SubLObject state_18 = NIL;\n for (state_18 = set_contents.do_set_contents_initial_state(basis_object_17, set_contents_var_16); (NIL == set_contents.do_set_contents_doneP(basis_object_17, state_18)); state_18 = set_contents.do_set_contents_update_state(state_18)) {\n {\n SubLObject join_ordered_link = set_contents.do_set_contents_next(basis_object_17, state_18);\n if ((NIL != set_contents.do_set_contents_element_validP(state_18, join_ordered_link))) {\n if ((NIL != inference_datastructures_problem_link.problem_link_has_typeP(join_ordered_link, $kw12$JOIN_ORDERED))) {\n if ((NIL != inference_worker_join_ordered.join_ordered_link_restricted_non_focal_linkP(join_ordered_link, restriction_link))) {\n if ((non_focal_problem == inference_worker_join_ordered.join_ordered_link_non_focal_problem(join_ordered_link))) {\n if ((NIL != balanced_strategy_chooses_to_propagate_new_root_motivation_to_restricted_non_focal_problemP(strategy, problem, join_ordered_link))) {\n return T;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n return NIL;\n }",
"static int testUlpCase(float f, float expected) {\n float minus_f = -f;\n int failures=0;\n\n failures+=Tests.test(\"Math.ulp(float)\", f,\n Math.ulp(f), expected);\n failures+=Tests.test(\"Math.ulp(float)\", minus_f,\n Math.ulp(minus_f), expected);\n failures+=Tests.test(\"StrictMath.ulp(float)\", f,\n StrictMath.ulp(f), expected);\n failures+=Tests.test(\"StrictMath.ulp(float)\", minus_f,\n StrictMath.ulp(minus_f), expected);\n return failures;\n }",
"@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"private static boolean bayesian() {\n\t\tSystem.out.println(\"BAYESIAN\");\n\t\t\n//\t\tFFNeuralNetwork ffnn = new FFNeuralNetwork(ActivationFunction.SIGMOID0p5,5,5);\n\t\tModelLearner modeler = new ModelLearnerHeavy(100, new int[] {}, new int[] {5},\n\t\t\t\tnew int[] {}, ActivationFunction.SIGMOID0p5, 10);\n\t\t\n\t\tCollection<DataPoint> data = new ArrayList<DataPoint>();\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,0,0,1,0})); // move right\n\t\tdata.add(new DataPoint(new double[] {0,0,1,0,0}, new double[] {0,1,0,0,0})); // move left\n\t\tdata.add(new DataPoint(new double[] {0,1,0,0,0}, new double[] {1,0,0,0,0})); // move left again\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,1,0,0})); // move back to center\n\t\tdata.add(new DataPoint(new double[] {0,0,0,1,0}, new double[] {0,0,0,0,0})); // disappear\n\t\t\n//\t\tControlPanel.learnFromBackPropagation(ffnn.getInputNodes(), ffnn.getOutputNodes(), data,\n//\t\t\t\t10000, 1,1,0,0,0,0);\n\t\tfor (DataPoint dp : data) {\n\t\t\tmodeler.observePreState(dp.getInput());\n\t\t\tmodeler.observePostState(dp.getOutput());\n\t\t\tmodeler.saveMemory();\n\t\t}\n\t\tmodeler.learnFromMemory(1.5,0.5,0, false, 1000);\n\t\tmodeler.getTransitionsModule().getNeuralNetwork().report(data);\n\t\t\n\t\tdouble[] foresight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 1, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0) && near(foresight[1],0.5) && near(foresight[2],0)\n\t\t\t\t&& near(foresight[3],0.5) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 1 ok\" : \"montecarlo 1 sucks\");\n\t\tforesight = Foresight.montecarlo(modeler, new double[] {0,0,1,0,0}, null, null, 2, 10000, 10, 0.1);\n\t\tfor (double d : foresight) System.out.print(d + \"\t\");\n\t\tSystem.out.println(near(foresight[0],0.5) && near(foresight[1],0) && near(foresight[2],0.25)\n\t\t\t\t&& near(foresight[3],0) && near(foresight[4],0)\n\t\t\t\t? \"montecarlo 2 ok\" : \"montecarlo 2 sucks\");\n\n\t\treturn false;\n\t}",
"private static AlleleFrequencyBacked.AlleleFrequencyRange computeAFrange(double[] alleleFrequencyProbs, int N, int bestAFguess, double fraction) {\n double totalProb = alleleFrequencyProbs[bestAFguess];\n int lowIndex = bestAFguess;\n int highIndex = bestAFguess;\n while ( totalProb < fraction ) {\n if ( lowIndex > 1 ) {\n lowIndex--;\n totalProb += alleleFrequencyProbs[lowIndex];\n }\n if ( highIndex < N ) {\n highIndex++;\n totalProb += alleleFrequencyProbs[highIndex];\n }\n }\n \n return new AlleleFrequencyBacked.AlleleFrequencyRange((double)lowIndex / (double)N, (double)highIndex / (double)N, fraction);\n }",
"public void smell() {\n\t\t\n\t}",
"void breach();",
"protected abstract void a(bru parambru);",
"private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }",
"private static void BicingsimulatedAnnealingSearch(int num, int n_est, int nbicis, int nfurgo, int d1, int cas, String Cas, String H, String D, int s) {\n\n\n try {\n\n double MedT = 0;\n //double MedN = 0;\n //double MedB = 0;\n int iteraciones = 100;\n Estado Bicing = new Estado(n_est,nbicis,nfurgo,d1,s,1);\n Bicing.setList_cdesp(iteraciones);\n long StartTime = System.nanoTime();\n Problem problem = new Problem(Bicing, new sucesoresA(), new isGoal(), new Heuristic_Function());\n SimulatedAnnealingSearch search = new SimulatedAnnealingSearch(iteraciones, 1000, 125, 0.00001D);\n SearchAgent agent = new SearchAgent(problem, search);\n List L = search.getPathStates();\n Properties properties = agent.getInstrumentation();\n long EndTime = System.nanoTime();\n Estado E = (Estado) search.getGoalState();\n long time = ((EndTime - StartTime) / 1000000);\n MedT += time;\n //MedB += E.getganancia();\n // MedN += Integer.parseInt(properties.getProperty((String)properties.keySet().iterator().next()));\n // MedB /= num;\n // MedN /= num;\n // MedT /= num;\n //MedB = (Math.round(MedB*100.0)/100.0);\n Writer output;\n output = new BufferedWriter(new FileWriter(\"Estadisticas_\" + Cas + \"_D\" + D + \"_H\" + H + \"S.txt\", true));\n double [] vec = E.getearnings();\n for (int i = 0 ; i < iteraciones; ++i) {\n String S = \"\" + vec[i];\n S = S + '\\n';\n output.append(S);\n }\n output.close();\n\n /*for (int i = 0; i < E.getN_furgo(); ++i) {\n System.out.println(\"Recorrido por furgoneta \" + i + \" \" + E.getIFurgo(i).getLong_t());\n }*/\n //printEstado(E);\n //System.out.println();\n //System.out.println(E.getganancia());\n //printActions(agent.getActions());\n //printInstrumentation(agent.getInstrumentation());\n } catch (Exception var4) {\n var4.printStackTrace();\n }\n\n }",
"static void testAProblem(Problem aProblem,Problem optimisedSortProblem){\n\t\t\t\tIndividual originalIndividual = new Individual(aProblem);\n\t\t\t\t//Individual.initialise(originalIndividual.ourProblem.getStrings());\n\t\t\t\toriginalIndividual.gpMaterial.printAll();\n\t\t\t\tIndividualEvaluator indEval = new ByteCodeIndividualEvaluator();\n\t\t\t\tindEval.evaluateIndNoTimeLimit(originalIndividual); // This is our reference individual\n\t\t\t\toriginalIndividual.ourProblem.setBaselineRuntimeAvg(originalIndividual.getRuntimeAvg());\n\t\t\t\t\n\t\t\t\t// create a variant to compare against\n\t\t\t\t//Problem optimisedSortProblem = new Sort1Optimised();\n\t\t\t\tIndividual sortVariant = new Individual(originalIndividual, optimisedSortProblem,null);\n\t\t\t\tindEval.evaluateIndNoTimeLimit(sortVariant);\n\t\t\t\tSystem.out.println(\"Variant \"+sortVariant +\" \"+ sortVariant.getFunctionalityErrorCount()+\" \"+ sortVariant.getRuntimeAvg());\n\t\t\t\tSystem.out.println(\"timeratio: \" + sortVariant.getTimeFitnessRatio()+ \" correctness \"+ sortVariant.getCorrectness());\n\t\t\t\tSystem.out.println(\"Fitness \" + sortVariant.getFitness()+\"\\n\");\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t *\t9 May 2014 (commented out 15 Jan 2015)\n\t\t\t\t * Added to test multithreaded evaluation,\n\t\t\t\t * create a generation of individuals, then evaluate the lot. \n\t\t\t\t * (not needed, bug found in multi-threaded eval, due to programs accessing static methods when collecting results\n\t\t\t\t */\n\t\t\t\t/*for ( int i = 1 ; i < 100 ; i++){\n\t\t\t\t\toptimisedSortProblem = new Sort1Optimised();\n\t\t\t\t\tsortVariant = new Individual(originalIndividual, optimisedSortProblem,null);\n\t\t\t\t\tindEval.evaluateIndNoTimeLimit(sortVariant);\n\t\t\t\t\tSystem.out.println(\"Variant \"+sortVariant +\" \"+ sortVariant.getFunctionalityScore()+\" \"+ sortVariant.getRuntimeAvg());\n\t\t\t\t\tSystem.out.println(\"timeratio: \" + sortVariant.getTimeFitnessRatio()+ \" correctness \"+ sortVariant.getCorrectness());\n\t\t\t\t\tSystem.out.println(\"Fitness \" + sortVariant.getFitness()+\"\\n\");\n\t\t\t\t}*/\n\t}",
"public static void main(String[] args) {\n\t\tint [] houses= {6,7,1,30,8,2,4};\n\t\tint val=topDown(houses, 0);\n\t\tSystem.out.println(\"Maximum stolen: \"+val);\n\t\tarr=null;\n\t\tint [] houses1= {20,5,1,13,6,11,40};\n\t\tval=topDown(houses1, 0);\n\t\tSystem.out.println(\"Maximum stolen: \"+val);\n\t\tarr=null;\n\t\t\n\t\tval=botUp(houses, 0);\n\t\tSystem.out.println(\"Maximum stolen: \"+val);\n\t\tarr=null;\n\t\tval=botUp(houses1, 0);\n\t\tSystem.out.println(\"Maximum stolen: \"+val);\n\t\tarr=null;\n\t}",
"private static void drukaf()\n\t{\n\t\tint a;\n\t\tint oplossing;\n\t\tfor(a=1; a<10; a++)\n\t\t{\n\t\t\tint b;\n\t\t\tfor(b=1; b<10; b++)\n\t\t\t{\n\t\t\t\toplossing = a*b;\n\t\t\t\tSystem.out.println(a + \" x \" + b + \" = \" + oplossing);\n\t\t\t}\t\n\t\t}\n\t}",
"public static void testNewBBFArchitecture(){\n\t\t\n\t\tString outputDir = \"E:\\\\testing\\\\Java Backbone Fitting\\\\test orientation fix\\\\\";\n\t\tString inputFileName = outputDir+\"Berlin@Berlin_2NDs_B_Square_SW_96-160_201411201541.prejav\";\n\t\t\t\n\t\tExperiment ex = new Experiment(inputFileName);\n\t\t\n\t\t\n\t\tBackboneFitter bbf = new BackboneFitter(ex.getTrackFromInd(50));\n\t\tbbf.fitTrack();\n\t\t\n\t\tBackboneFitter bbfOld = new BackboneFitter();\n\t\t///method no longer exists\n\t\t//bbfOld.fitTrack(ex.getTrackFromInd(50));\n\t\t///\n\t\t\n\t\tSystem.out.println(\"Done\");\n\t}",
"@Test(dataProvider = \"chainPrunerData\")\n public void testAdaptivePruning(final int kmerSize, final byte[] ref, final byte[] alt, final double altFraction, final double errorRate, final int depthPerAlignmentStart, final double logOddsThreshold) {\n final RandomGenerator rng = RandomGeneratorFactory.createRandomGenerator(new Random(kmerSize + FastMath.round(10000*(errorRate + altFraction))));\n final ReadThreadingGraph graph = new ReadThreadingGraph(kmerSize);\n graph.addSequence(ref, true);\n final List<byte[]> reads = IntStream.range(0, ref.length)\n .mapToObj(start -> IntStream.range(0, depthPerAlignmentStart).mapToObj(n -> generateReadWithErrors(rng.nextDouble() < altFraction ? alt : ref, start, errorRate, rng)))\n .flatMap(s -> s).collect(Collectors.toList());\n\n reads.forEach(read -> graph.addSequence(read, false));\n\n\n // note: these are the steps in ReadThreadingAssembler::createGraph\n graph.buildGraphIfNecessary();\n\n final ChainPruner<MultiDeBruijnVertex, MultiSampleEdge> pruner = new AdaptiveChainPruner<>(0.001,\n logOddsThreshold, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n final SmithWatermanAligner aligner = SmithWatermanJavaAligner.getInstance();\n graph.recoverDanglingTails(1, 3, false, aligner, DANGLING_END_SW_PARAMETERS);\n graph.recoverDanglingHeads(1, 3, false, aligner, DANGLING_END_SW_PARAMETERS);\n graph.removePathsNotConnectedToRef();\n\n final SeqGraph seqGraph = graph.toSequenceGraph();\n seqGraph.zipLinearChains();\n seqGraph.removeSingletonOrphanVertices();\n seqGraph.removeVerticesNotConnectedToRefRegardlessOfEdgeDirection();\n seqGraph.simplifyGraph();\n seqGraph.removePathsNotConnectedToRef();\n seqGraph.simplifyGraph();\n\n final List<KBestHaplotype<SeqVertex, BaseEdge>> bestPaths = new GraphBasedKBestHaplotypeFinder<>(seqGraph).findBestHaplotypes(10);\n\n final OptionalInt altIndex = IntStream.range(0, bestPaths.size()).filter(n -> bestPaths.get(n).haplotype().basesMatch(alt)).findFirst();\n Assert.assertTrue(altIndex.isPresent());\n\n // ref path should not be pruned even if all reads are alt\n final OptionalInt refIndex = IntStream.range(0, bestPaths.size()).filter(n -> bestPaths.get(n).haplotype().basesMatch(ref)).findFirst();\n Assert.assertTrue(refIndex.isPresent());\n\n // the haplotype score is the sum of the log-10 of all branching fractions, so the alt haplotype score should come out to\n // around the log-10 of the allele fraction up to some fudge factor, assuming we didn't do any dumb pruning\n Assert.assertEquals(bestPaths.get(altIndex.getAsInt()).score(), Math.log10(altFraction), 0.5);\n Assert.assertTrue(bestPaths.size() < 15);\n }",
"public int a(alq paramalq, int paramInt1, int paramInt2, fn paramfn)\r\n/* 120: */ {\r\n/* 121:137 */ int i = 0;\r\n/* 122: */ amj localamj;\r\n/* 123: */ int k;\r\n/* 124:138 */ for (int j = 0; j < this.a.length; j++)\r\n/* 125: */ {\r\n/* 126:139 */ localamj = this.a[j];\r\n/* 127:140 */ if (localamj != null) {\r\n/* 128:143 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 129:146 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 130:149 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), true)))\r\n/* 131: */ {\r\n/* 132:153 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 133:154 */ i += k;\r\n/* 134:155 */ if (paramInt2 != 0)\r\n/* 135: */ {\r\n/* 136:156 */ this.a[j].b -= k;\r\n/* 137:157 */ if (this.a[j].b == 0) {\r\n/* 138:158 */ this.a[j] = null;\r\n/* 139: */ }\r\n/* 140:160 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 141:161 */ return i;\r\n/* 142: */ }\r\n/* 143: */ }\r\n/* 144: */ }\r\n/* 145: */ }\r\n/* 146: */ }\r\n/* 147: */ }\r\n/* 148: */ }\r\n/* 149:165 */ for (j = 0; j < this.b.length; j++)\r\n/* 150: */ {\r\n/* 151:166 */ localamj = this.b[j];\r\n/* 152:167 */ if (localamj != null) {\r\n/* 153:170 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 154:173 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 155:176 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), false)))\r\n/* 156: */ {\r\n/* 157:180 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 158:181 */ i += k;\r\n/* 159:182 */ if (paramInt2 != 0)\r\n/* 160: */ {\r\n/* 161:183 */ this.b[j].b -= k;\r\n/* 162:184 */ if (this.b[j].b == 0) {\r\n/* 163:185 */ this.b[j] = null;\r\n/* 164: */ }\r\n/* 165:187 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 166:188 */ return i;\r\n/* 167: */ }\r\n/* 168: */ }\r\n/* 169: */ }\r\n/* 170: */ }\r\n/* 171: */ }\r\n/* 172: */ }\r\n/* 173: */ }\r\n/* 174:193 */ if (this.f != null)\r\n/* 175: */ {\r\n/* 176:194 */ if ((paramalq != null) && (this.f.b() != paramalq)) {\r\n/* 177:195 */ return i;\r\n/* 178: */ }\r\n/* 179:197 */ if ((paramInt1 > -1) && (this.f.i() != paramInt1)) {\r\n/* 180:198 */ return i;\r\n/* 181: */ }\r\n/* 182:200 */ if ((paramfn != null) && (!cy.a(paramfn, this.f.o(), false))) {\r\n/* 183:201 */ return i;\r\n/* 184: */ }\r\n/* 185:204 */ j = paramInt2 <= 0 ? this.f.b : Math.min(paramInt2 - i, this.f.b);\r\n/* 186:205 */ i += j;\r\n/* 187:206 */ if (paramInt2 != 0)\r\n/* 188: */ {\r\n/* 189:207 */ this.f.b -= j;\r\n/* 190:208 */ if (this.f.b == 0) {\r\n/* 191:209 */ this.f = null;\r\n/* 192: */ }\r\n/* 193:211 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 194:212 */ return i;\r\n/* 195: */ }\r\n/* 196: */ }\r\n/* 197: */ }\r\n/* 198:217 */ return i;\r\n/* 199: */ }",
"public void fordFulkerson() {\r\n\r\n\r\n\t\twhile(true) {\r\n\t\t\tResidualGraph resGraph = new ResidualGraph(net);\r\n\t\t\tLinkedList<Edge> augmentingPath = resGraph.findAugmentingPath();\r\n\t\t\tif(augmentingPath.isEmpty()) {\r\n\t\t\t\tbreak; // found the max flow\r\n\t\t\t} else {\r\n\t\t\t\t// Find the minimum capacity\r\n\t\t\t\tint minCap = Integer.MAX_VALUE;\r\n\t\t\t\tfor (Edge e : augmentingPath) {\r\n\t\t\t\t\tif (e.getCap() < minCap) minCap = e.getCap();\r\n\t\t\t\t}\r\n\t\t\t\t// Edit the path according to what we've found in the augmenting path\r\n\t\t\t\tfor (Edge e : augmentingPath) {\r\n\t\t\t\t\t// if e is a forward edge:\r\n\t\t\t\t\tVertex source = e.getSourceVertex();\r\n\t\t\t\t\tVertex target = e.getTargetVertex();\r\n\t\t\t\t\tEdge originalEdge = net.getAdjMatrixEntry(source, target);\r\n\t\t\t\t\tif (net.getAdjList(source).contains(target) && originalEdge.getFlow() + minCap <= originalEdge.getCap()) {\r\n\t\t\t\t\t\toriginalEdge.setFlow(originalEdge.getFlow() + minCap);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\toriginalEdge = net.getAdjMatrixEntry(target, source);\r\n\t\t\t\t\t\toriginalEdge.setFlow(net.getAdjMatrixEntry(target, source).getFlow() - minCap);\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\tnet.printFlow();\r\n\t\t}\r\n\t}",
"private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }",
"public void DeriveFromProgramIterationBottomUp (boolean forIntersection, boolean online)\n\t{\n\t\tlevel++;\n\t\t//Reset();\n\t\t//long startTime = System.currentTimeMillis();\n\t\t//previouslyFoundRelevants.clear();\n\t\tSet<Atom> oldAtoms = new HashSet<Atom>(KeyMap.getInstance().Values());\n\t\t\n\t\tfor (int i = beginIdx; i < this.p.getRules().size(); i++)\n\t\t{\n\t\t\tRule rule = this.p.getRules().elementAt(i);\n\t\t\tif (false == forIntersection) \n\t\t\t{\n\t\t\t\tif (false == IsBodyEDB(rule) || true == this.addedInstAtomsInLastIteration.isEmpty()) //if body of rule relies on derived facts.\n\t\t\t\t{\n\t\t\t\t\tInstantiateAllRelevantsInRule(rule, forIntersection, online);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse if (rule.getDerivedInlevel() == level)\n\t\t\t{\n\t\t\t\tInstantiateAllRelevantsInRule(rule, forIntersection, online);\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tbeginIdx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*long end = System.currentTimeMillis();\n\t\tif ((end-startTime) > 100) \n\t\t{\n\t\t\tSystem.out.println(\"DeriveFromProgramIterationBottomUp:: time for iteration over all rules: \" + (end-startTime));\n\t\t\tSystem.out.println(\"DeriveFromProgramIterationBottomUp:: num of atoms added last iter = \" + this.addedInstAtomsInLastIteration.size());\n\t\t}*/\n\t\t\n\t\t//UpdateAddedAtomsMap ();\n\t\tif (true == online && false == this.treesWaiting.isEmpty()) \n\t\t{\n\t\t\tList<DerivationTree> list = new ArrayList<DerivationTree>(this.treesWaiting);\n\t\t\tCollections.sort(list);\n\t\t\tif (bestTreeThisStep == null)\n\t\t\t{\n\t\t\t\tfor (DerivationTree derivationTree : list) \n\t\t\t\t{\n\t\t\t\t\tif ( derivationTree.getDerivedFact().getName().contains(this.suffix) ) \n\t\t\t\t\t{\n\t\t\t\t\t\tthis.bestTreeThisStep = derivationTree;\n\t\t\t\t\t\tsuffix += \"_p_1\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tbestWeight = list.get(0).getWeight();\n\t\t\t//double worstWeight = list.get(list.size()-1).getWeight();\n\t\t\t/*for (DerivationTree tree : list)//this.treesThisStep.values()) \n\t\t\t{\n\t\t\t\tif (tree.getDerivedFact().toString().equals(\"dealsWith(Brazil,Botswana)\")) {\n\t\t\t\t\tSystem.out.println(\"dealsWith(Brazil,Botswana) tree weight: \" + tree.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t\tint numTimes = 0;\n\t\t\tdouble brokeW = 0;*/\n\t\t\tstartTrees = 0;\n\t\t\tfor (DerivationTree tree : list)\n\t\t\t{\n\t\t\t\tif (tree.getWeight() >= bestWeight && false == tree.getDerivedFact().didFindTop1())\n\t\t\t\t{\n\t\t\t\t\ttree.getDerivedFact().setFoundTop1(true);\n\t\t\t\t\tthis.atomsForDbOnline.add(tree.getDerivedFact());\n\t\t\t\t\t//numTimes++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.startTrees = list.indexOf(tree);\n\t\t\t\t\t//brokeW = tree.getWeight();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"num of times got in cond: \" + numTimes + \" max weight: \" + bestWeight + \" break weight: \" + brokeW);\n\t\t\t//System.out.println(\"size of remaining list: \" + (list.size() - numTimes));\n\t\t\t//this.treesThisStep.subList(0, firstRemove).clear();\n\t\t\tif (0 == startTrees) this.treesWaiting = new HashSet<DerivationTree>();\n\t\t\telse this.treesWaiting = new HashSet<DerivationTree>(list.subList(startTrees, list.size()));\n\t\t}\n\t\t\n\t\tif (false == online) \n\t\t{\n\t\t\tthis.addedInstAtomsInLastIteration.addAll(KeyMap.getInstance().Values());// = new HashSet<Atom>(KeyMap.getInstance().Values());\n\t\t\tthis.addedInstAtomsInLastIteration.removeAll(oldAtoms);\n\t\t\t//System.out.println(\"derived this time: \" + this.addedInstAtomsInLastIteration.size());\n\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tthis.addedInstAtomsInLastIteration = new HashSet<Atom>(this.atomsForDbOnline);\n\t\t\t//System.out.println(\"derived this time: \" + this.addedInstAtomsInLastIteration.size());\n\t\t}\n\t\t\n\t\tUpdateRelevants ();\n\t\t//System.out.println(\"atoms for DB size: \" + this.addedInstAtomsInLastIteration.size());\n\t}",
"protected ProbNet step (PNEdit bestEdition) throws NormalizeNullVectorException {\n\n /* If there have been any improvements on the score, we update\n * the learnedNet. */\n try{\n probNet.doEdit(bestEdition);\n } catch (ConstraintViolationException ex){\n /* If the edition was not allowed (ModelNetworkconstraint)\n * the algorithm just goes through the next iteration of the\n * loop, asking the cache for the next best edition.\n */\n }\n catch (Exception exception){\n exception.printStackTrace();\n }\n return probNet;\n }",
"private void advanceBeliefs(int b) {\n\t\tdouble sum = 0;\n\t\tdouble[][] newbel = new double[beliefs.length][beliefs[0].length];\n\t\tfor (int x =0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tdouble statesum = 0; // belief in each state is the sum of beliefs in possible previous state times the probability of the transition\n\t\t\t\tfor (int px = 0; px < beliefs.length; px++) {\n\t\t\t\t\tfor (int py = 0; py < beliefs[0].length; py++) {\n\t\t\t\t\t\tstatesum += beliefs[px][py] * world.transitionProbability(x, y, px, py, b);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnewbel[x][y] = statesum;\n\t\t\t\tsum += newbel[x][y];\n\t\t\t}\n\t\t}\n\t\t// now normalise them\n\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tnewbel[x][y] /= sum;\n\t\t\t}\n\t\t}\n\t\tbeliefs = newbel;\n\t}",
"private void optimiseEVProfile()\n\t{\n\t}",
"@Test\n public void testAdaptivePruningWithAdjacentBadEdges() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D, C);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, B);\n\n if (variantPresent) {\n graph.addVertices(E);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, E, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, 2.0,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(E));\n }\n }\n }",
"private void processSuperHighValue(Bid bid) {\n\t}",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n NucleotideSequence nucleotideSequence0 = mock(NucleotideSequence.class, new ViolatedAssumptionAnswer());\n doReturn(0L, 0L).when(nucleotideSequence0).getLength();\n QualitySequence qualitySequence0 = mock(QualitySequence.class, new ViolatedAssumptionAnswer());\n doReturn(0L).when(qualitySequence0).getLength();\n PhdBuilder phdBuilder0 = new PhdBuilder(\"positions can not be null\", nucleotideSequence0, qualitySequence0);\n PhdBuilder phdBuilder1 = phdBuilder0.fakePeaks();\n phdBuilder1.build();\n LinkedList<PhdReadTag> linkedList0 = new LinkedList<PhdReadTag>();\n PhdBuilder phdBuilder2 = phdBuilder0.readTags(linkedList0);\n phdBuilder1.copy();\n LinkedList<PhdWholeReadItem> linkedList1 = new LinkedList<PhdWholeReadItem>();\n phdBuilder2.wholeReadItems(linkedList1);\n phdBuilder2.fakePeaks();\n phdBuilder2.readTags(linkedList0);\n // Undeclared exception!\n try { \n phdBuilder2.fakePeaks(0, 0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // first peak position must be >0\n //\n verifyException(\"org.jcvi.jillion.assembly.consed.phd.PhdBuilder\", e);\n }\n }",
"public static void main(String[] args) {\r\n\t\t/** 1.000\r\n\t\t * bruteforceBE Asc runtime: 1072294\r\n\t\t * bruteforceBE Desc runtime: 17835245\r\n\t\t * improvedBE Asc runtime: 3562199\r\n\t\t * improvedBE Desc runtime: 794515\r\n\t\t * linearBE Asc runtime: 1680780\r\n\t\t * linearBE Desc runtime: 1629310\r\n\t\t *\r\n\t\t * 10.000\r\n\t\t * bruteforceBE Asc runtime: 3850878\r\n\t\t * bruteforceBE Desc runtime: 113789179\r\n\t\t * improvedBE Asc runtime: 11800873\r\n\t\t * improvedBE Desc runtime: 8166293\r\n\t\t * linearBE Asc runtime: 14381578\r\n\t\t * linearBE Desc runtime: 5897656\r\n\t\t *\r\n\t\t * 100.000\r\n\t\t * bruteforceBE Asc runtime: 19376301\r\n\t\t * bruteforceBE Desc runtime: 7801237491\r\n\t\t * improvedBE Asc runtime: 52015969\r\n\t\t * improvedBE Desc runtime: 33891001\r\n\t\t * linearBE Asc runtime: 43042990\r\n\t\t * linearBE Desc runtime: 10088763\r\n\t\t *\r\n\t\t * 200.000\r\n\t\t * bruteforceBE Asc runtime: 27567279\r\n\t\t * bruteforceBE Desc runtime: 30705593272\r\n\t\t * improvedBE Asc runtime: 87086775\r\n\t\t * improvedBE Desc runtime: 51012088\r\n\t\t * linearBE Asc runtime: 61726040\r\n\t\t * linearBE Desc runtime: 56062681\r\n\t\t */\r\n\t\tArrayList<Integer> ArrayUnsortAsc = new ArrayList<>();\r\n\t\tArrayList<Integer> ArrayUnsortDesc = new ArrayList<>();\r\n\t\tint n = 1000;\r\n\r\n\t\tfor(int i = 1; i <= n; i++ ) {\r\n\t\t\tArrayUnsortAsc.add(i);\r\n\t\t}\r\n\t\tfor(int j = n; j >= 1; j-- ) {\r\n\t\t\tArrayUnsortDesc.add(j);\r\n\t\t}\r\n\r\n\t\tlong beginning = 0, end = 0;\r\n\t\tlong runtime;\r\n\t\t//1a test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1b test\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortDesc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1c test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Desc runtime: \" + runtime);\r\n\r\n\t}",
"public static void experiment(String name) {\n \tString probName = \"NQueensProblem\";\n \tList<OptimizationAlgorithm> algs = new ArrayList<>();\n int[] ranges = new int[N];\n Random random = new Random(N);\n for (int i = 0; i < N; i++) {\n \tranges[i] = random.nextInt();\n }\n NQueensFitnessFunction ef = new NQueensFitnessFunction();\n Distribution odd = new DiscretePermutationDistribution(N);\n NeighborFunction nf = new SwapNeighbor();\n MutationFunction mf = new SwapMutation();\n CrossoverFunction cf = new SingleCrossOver();\n Distribution df = new DiscreteDependencyTree(.1); \n \n HillClimbingProblem hcp = new GenericHillClimbingProblem(ef, odd, nf);\n GeneticAlgorithmProblem gap = new GenericGeneticAlgorithmProblem(ef, odd, mf, cf);\n ProbabilisticOptimizationProblem pop = new GenericProbabilisticOptimizationProblem(ef, odd, df);\n \n RandomizedHillClimbing rhc = new RandomizedHillClimbing(hcp); \n SimulatedAnnealing sa = new SimulatedAnnealing(1E1, .1, hcp);\n StandardGeneticAlgorithm ga = new StandardGeneticAlgorithm(200, 0, 10, gap);\n MIMIC mimic = new MIMIC(200, 10, pop);\n \n algs.add(rhc);\n algs.add(sa);\n algs.add(ga);\n algs.add(mimic);\n Experiment newExp = new Experiment();\n \n newExp.experiments(algs, ef, name);\n \n // test temperature for SA\n String paramName = \"Temperature\";\n String algName = \"SA\";\n List<Double> params2 = new ArrayList<>();\n List<OptimizationAlgorithm> algsTest = new ArrayList<>();\n for (double i = 1.0; i < 100.5; i+=1.0){\n \tparams2.add(i);\n \tsa = new SimulatedAnnealing(i, .1, hcp);\n \talgsTest.add(sa);\n }\n newExp.optParams(algsTest, ef, paramName, null, params2, algName, probName);\n \n // test cooling rate for SA\n paramName = \"CoolingRate\";\n params2 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (double i = 0.01; i < 0.51; i+=0.005){\n \tparams2.add(i);\n \tsa = new SimulatedAnnealing(1E1, i, hcp);\n \talgsTest.add(sa);\n }\n newExp.optParams(algsTest, ef, paramName, null, params2, algName, probName);\n \n // test populationSize for GA\n paramName = \"populationSize\";\n algName = \"GA\";\n List<Integer> params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 10; i < 1001; i+=10){\n \tparams1.add(i);\n \tga = new StandardGeneticAlgorithm(i, 0, 10, gap);\n \talgsTest.add(ga);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test toMate for GA\n paramName = \"toMate\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 0; i < 100; i+=1){\n \tparams1.add(i);\n \tga = new StandardGeneticAlgorithm(200, i, 10, gap);\n \talgsTest.add(ga);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test toMutate for GA\n paramName = \"toMutate\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 10; i < 1001; i+=10){\n \tparams1.add(i);\n \tga = new StandardGeneticAlgorithm(200, 0, i, gap);\n \talgsTest.add(ga);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test samples for MIMIC\n paramName = \"samples\";\n algName = \"MIMIC\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 100; i < 1101; i += 10){\n \tparams1.add(i);\n \tmimic = new MIMIC(i, 10, pop);\n \talgsTest.add(mimic);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n // test tokeep for MIMIC\n paramName = \"tokeeep\";\n params1 = new ArrayList<>();\n algsTest = new ArrayList<>();\n for (int i = 1; i < 101; i+=1){\n \tparams1.add(i);\n \tmimic = new MIMIC(200, i, pop);\n \talgsTest.add(mimic);\n }\n newExp.optParams(algsTest, ef, paramName, params1, null, algName, probName);\n \n \n // test different algorithms with various NQueensProblems\n // set up algorithms\n algs = new ArrayList<>();\n ga = new StandardGeneticAlgorithm(150, 98, 70, gap);\n algs.add(rhc);\n algs.add(sa);\n algs.add(ga);\n algs.add(mimic);\n // set up different efs\n List<EvaluationFunction> efs = new ArrayList<>();\n for (int i = 0; i < 50; i++){\n \tef = new NQueensFitnessFunction();\n \tefs.add(ef);\n }\n newExp.voteBest(algs, efs, 2000, probName);\n \n }",
"@Test\n public void defensiveStrategy_blocked() throws IOException {\n Board f0 = new Board(\"------\"\n + \"-C----\"\n + \"------\"\n + \"------\"\n + \"PCP---\"\n + \"------\");\n\n assertTrue(f0.evaluate(true) > 10);\n\n // blockiert links\n Board f1 = new Board(\"C--CPP\"\n + \"------\"\n + \"------\"\n + \"------\"\n + \"------\"\n + \"------\");\n\n assertTrue(f1.evaluate(true) > 10);\n\n // blockiert vertikal\n Board f2 = new Board(\"C----P\"\n + \"-----C\"\n + \"-----P\"\n + \"------\"\n + \"------\"\n + \"------\");\n\n assertTrue(f2.evaluate(true) > 10);\n }",
"@Override\n\tpublic void makeDecision() {\n\t\tDouble weightedFrontProximity;\n\t\tif (algorithmData.receiveMessageData != null && algorithmData.previousDistance != null) {\n\t\t\tdouble delay = (Time.getTime() - algorithmData.receiveMessageData.getStartTime()) / 100000000;\n\t\t\t//calculate the distance us and our predecessor have travelled since message received\n\t\t\talgorithmData.predictedPredecessorMovement = algorithmData.predecessorSpeed * delay\n\t\t\t\t\t+ 0.5 * algorithmData.predecessorAcceleration * delay * delay;\n\t\t\talgorithmData.predictedMovement = algorithmData.previousSpeed * delay\n\t\t\t\t\t+ 0.5 * algorithmData.previousAcceleration * delay * delay;\n\t\t\talgorithmData.predictedFrontProximity = algorithmData.predictedPredecessorMovement\n\t\t\t\t\t- algorithmData.predictedMovement + algorithmData.previousDistance;\n\n\t\t\talgorithmData.chosenSpeed = algorithmData.predecessorChosenSpeed;\n\t\t\talgorithmData.chosenTurnRate = algorithmData.predecessorTurnRate;\n\t\t} else {\n\t\t\t//no message received or no previous distance\n\t\t\talgorithmData.predictedFrontProximity = null;\n\t\t\talgorithmData.chosenSpeed = algorithmData.speed;\n\t\t\talgorithmData.chosenTurnRate = algorithmData.turnRate;\n\t\t}\n\t\tif (algorithmData.frontProximity != null && algorithmData.frontProximity > maxSensorDist) {\n\t\t\talgorithmData.frontProximity = null;\n\t\t}\n\t\tweightedFrontProximity = weightFrontProximity(algorithmData.predictedFrontProximity,\n\t\t\t\talgorithmData.frontProximity);\n\n\t\t// update previous state variables so that they are correct in next time period\n\t\talgorithmData.previousDistance = weightedFrontProximity;\n\t\talgorithmData.previousSpeed = algorithmData.speed;\n\t\talgorithmData.previousAcceleration = algorithmData.acceleration;\n\n\t\tif (weightedFrontProximity != null) {\n\t\t\tif (weightedFrontProximity < buffDist) {\n\t\t\t\tif (algorithmData.chosenAcceleration >= 0) {\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration * weightedFrontProximity / buffDist;\n\t\t\t\t} else {\n\t\t\t\t\t// if braking then divide by value so deceleration decreases if gap too small\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration / (weightedFrontProximity / buffDist);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (algorithmData.chosenAcceleration >= 0) {\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration\n\t\t\t\t\t\t\t* (0.75 + weightedFrontProximity / (4* buffDist));\n\t\t\t\t} else {\n\t\t\t\t\t// if braking then divide by value so deceleration decreases if gap too small\n\t\t\t\t\talgorithmData.chosenAcceleration = algorithmData.chosenAcceleration\n\t\t\t\t\t\t\t/ (0.75 + weightedFrontProximity / (4* buffDist));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//no messages received and proximity sensor not working\n\t\t\talgorithmData.chosenAcceleration = 0;\n\t\t}\n\n\n\t}",
"@Test \n\tpublic void baysNeverZeroResult() {\n\t\tboolean nil = false;\n\t\t//word ids are only positive so -1 is testing a \"word not found\" case\n\t\tfor(int i = -1; i< 100; i++) {\n\t\t\tfor(NewsGroup g: groups) {\n\t\t\t\tif(g.bayesianEstimator(i) == 0)\n\t\t\t\t\tnil = true;\n\t\t\t}\n\t\t}\n\t\tassertFalse(nil);\n\t}",
"public double[] runOptimizer() {\n List<Integer> sents = new ArrayList<Integer>();\n for(int i=0; i<sentNum; i++)\n sents.add(i);\n \n if(needShuffle)\n Collections.shuffle(sents);\n \n double oraMetric, oraScore, predMetric, predScore;\n double[] oraPredScore = new double[4];\n double eta = 1.0; //learning rate, will not be changed if run percep\n double avgEta = 0; //average eta, just for analysis\n double loss = 0;\n double featNorm = 0;\n double featDiffVal;\n double sumMetricScore = 0;\n double sumModelScore = 0;\n String oraFeat = \"\";\n String predFeat = \"\";\n String[] oraPredFeat = new String[2];\n String[] vecOraFeat;\n String[] vecPredFeat;\n String[] featInfo;\n boolean first = true;\n //int processedSent = 0;\n Iterator it;\n Integer diffFeatId;\n double[] avgLambda = new double[initialLambda.length]; //only needed if averaging is required\n for(int i=0; i<initialLambda.length; i++)\n avgLambda[i] = 0.0;\n\n //update weights\n for(Integer s : sents) {\n //find out oracle and prediction\n if(first)\n findOraPred(s, oraPredScore, oraPredFeat, initialLambda, featScale);\n else\n findOraPred(s, oraPredScore, oraPredFeat, finalLambda, featScale);\n \n //the model scores here are already scaled in findOraPred\n oraMetric = oraPredScore[0];\n oraScore = oraPredScore[1];\n predMetric = oraPredScore[2];\n predScore = oraPredScore[3];\n oraFeat = oraPredFeat[0];\n predFeat = oraPredFeat[1];\n \n //update the scale\n if(needScale) { //otherwise featscale remains 1.0\n sumMetricScore += java.lang.Math.abs(oraMetric+predMetric);\n sumModelScore += java.lang.Math.abs(oraScore+predScore)/featScale; //restore the original model score\n \n if(sumModelScore/sumMetricScore > scoreRatio)\n featScale = sumMetricScore/sumModelScore;\n\n /* a different scaling strategy \n if( (1.0*processedSent/sentNum) < sentForScale ) { //still need to scale\n double newFeatScale = java.lang.Math.abs(scoreRatio*sumMetricDiff / sumModelDiff); //to make sure modelScore*featScale/metricScore = scoreRatio\n \n //update the scale only when difference is significant\n if( java.lang.Math.abs(newFeatScale-featScale)/featScale > 0.2 )\n featScale = newFeatScale;\n }*/\n }\n// processedSent++;\n\n HashMap<Integer, Double> allOraFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> allPredFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> featDiff = new HashMap<Integer, Double>();\n\n vecOraFeat = oraFeat.split(\"\\\\s+\");\n vecPredFeat = predFeat.split(\"\\\\s+\");\n \n for (int i = 0; i < vecOraFeat.length; i++) {\n featInfo = vecOraFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allOraFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n featDiff.put(diffFeatId, Double.parseDouble(featInfo[1]));\n }\n\n for (int i = 0; i < vecPredFeat.length; i++) {\n featInfo = vecPredFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allPredFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n\n if (featDiff.containsKey(diffFeatId)) //overlapping features\n featDiff.put(diffFeatId, featDiff.get(diffFeatId)-Double.parseDouble(featInfo[1]));\n else //features only firing in the 2nd feature vector\n featDiff.put(diffFeatId, -1.0*Double.parseDouble(featInfo[1]));\n }\n\n if(!runPercep) { //otherwise eta=1.0\n featNorm = 0;\n\n Collection<Double> allDiff = featDiff.values();\n for(it =allDiff.iterator(); it.hasNext();) {\n featDiffVal = (Double) it.next();\n featNorm += featDiffVal*featDiffVal;\n }\n \n //a few sanity checks\n if(! evalMetric.getToBeMinimized()) {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score+ora_metric > pred_score+pred_metric\n * pred_score-pred_metric > ora_score-ora_metric\n * => ora_metric > pred_metric */\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be greater than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for max-metric oracle selection or min-metric prediction selection, the oracle metric \" +\n \t\t\"score must be greater than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n } else {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score-ora_metric > pred_score-pred_metric\n * pred_score+pred_metric > ora_score+ora_metric\n * => ora_metric < pred_metric */\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be smaller than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for min-metric oracle selection or max-metric prediction selection, the oracle metric \" +\n \"score must be smaller than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n }\n \n if(predSelectMode==2) {\n if(predScore+1e-10 < oraScore) {\n System.err.println(\"WARNING: for max-model prediction selection, the prediction model score must be greater than oracle model score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n //cost - margin\n //remember the model scores here are already scaled\n loss = evalMetric.getToBeMinimized() ? //cost should always be non-negative \n (predMetric-oraMetric) - (oraScore-predScore)/featScale: \n (oraMetric-predMetric) - (oraScore-predScore)/featScale;\n \n if(loss<0)\n loss = 0;\n\n if(loss == 0)\n eta = 0;\n else\n //eta = C < loss/(featNorm*featScale*featScale) ? C : loss/(featNorm*featScale*featScale); //feat vector not scaled before\n eta = C < loss/(featNorm) ? C : loss/(featNorm); //feat vector not scaled before\n }\n \n avgEta += eta;\n\n Set<Integer> diffFeatSet = featDiff.keySet();\n it = diffFeatSet.iterator();\n\n if(first) {\n first = false;\n \n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = initialLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n else {\n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = finalLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n \n if(needAvg) {\n for(int i=0; i<avgLambda.length; i++)\n avgLambda[i] += finalLambda[i];\n }\n }\n \n if(needAvg) {\n for(int i=0; i<finalLambda.length; i++)\n finalLambda[i] = avgLambda[i]/sentNum;\n }\n \n avgEta /= sentNum;\n System.out.println(\"Average learning rate: \"+avgEta);\n\n // the intitialLambda & finalLambda are all trainable parameters\n //if (!trainMode.equals(\"3\")) // for mode 3, no need to normalize sparse\n // feature weights\n //normalizeLambda(finalLambda);\n //else\n //normalizeLambda_mode3(finalLambda);\n\n /*\n * for( int i=0; i<finalLambda.length; i++ ) System.out.print(finalLambda[i]+\" \");\n * System.out.println(); System.exit(0);\n */ \n\n double initMetricScore = computeCorpusMetricScore(initialLambda); // compute the initial corpus-level metric score\n double finalMetricScore = computeCorpusMetricScore(finalLambda); // compute final corpus-level metric score // the\n\n // prepare the printing info\n int numParamToPrint = 0;\n String result = \"\";\n\n if (trainMode.equals(\"1\") || trainMode.equals(\"4\")) {\n numParamToPrint = paramDim > 10 ? 10 : paramDim; // how many parameters\n // to print\n result = paramDim > 10 ? \"Final lambda(first 10): {\" : \"Final lambda: {\";\n\n for (int i = 1; i < numParamToPrint; i++)\n // in ZMERT finalLambda[0] is not used\n result += finalLambda[i] + \" \";\n } else {\n int sparseNumToPrint = 0;\n if (trainMode.equals(\"2\")) {\n result = \"Final lambda(regular feats + first 5 sparse feats): {\";\n for (int i = 1; i <= regParamDim; ++i)\n result += finalLambda[i] + \" \";\n\n result += \"||| \";\n\n sparseNumToPrint = 5 < (paramDim - regParamDim) ? 5 : (paramDim - regParamDim);\n\n for (int i = 1; i <= sparseNumToPrint; i++)\n result += finalLambda[regParamDim + i] + \" \";\n } else {\n result = \"Final lambda(first 10 sparse feats): {\";\n sparseNumToPrint = 10 < paramDim ? 10 : paramDim;\n\n for (int i = 1; i < sparseNumToPrint; i++)\n result += finalLambda[i] + \" \";\n }\n }\n\n output.add(result + finalLambda[numParamToPrint] + \"}\\n\" + \"Initial \"\n + evalMetric.get_metricName() + \": \" + initMetricScore + \"\\nFinal \"\n + evalMetric.get_metricName() + \": \" + finalMetricScore);\n\n // System.out.println(output);\n\n if (trainMode.equals(\"3\")) {\n // finalLambda = baseline(unchanged)+disc\n for (int i = 0; i < paramDim; i++)\n copyLambda[i + regParamDim + 1] = finalLambda[i];\n\n finalLambda = copyLambda;\n }\n\n return finalLambda;\n }",
"protected boolean isAcceptableBefore(double offeredutil) throws Exception {\n\t\treturn offeredutil * 1.03 >= utilitySpace.getUtility(myLastBid);\n\t}",
"public SolutionSet execute() throws JMException, ClassNotFoundException {\n int maxEvaluations ;\n int evaluations ;\n\n SolutionSet population ;\n SolutionSet offspringPopulation ;\n\n Solution betterIndividual ;\n\n Operator mutationOperator ;\n Comparator comparator ;\n Operator localSearchOperator ;\n\n\n comparator = new ObjectiveComparator(0) ; // Single objective comparator\n\n // Read the params\n maxEvaluations = ((Integer)this.getInputParameter(\"maxEvaluations\")).intValue();\n\n // Initialize the variables\n population = new SolutionSet(mu_) ;\n offspringPopulation = new SolutionSet(lambda_) ;\n\n evaluations = 0;\n\n // Read the operators\n mutationOperator = this.operators_.get(\"mutation\");\n localSearchOperator = (LocalSearch) operators_.get(\"improvement\");\n\n System.out.println(\"(\" + mu_ + \" + \" + lambda_+\")ES\") ;\n\n // Create 1-parent population of mu solutions\n Solution newIndividual;\n newIndividual = new Solution(problem_);\n problem_.evaluate(newIndividual);\n evaluations++;\n betterIndividual = new Solution(newIndividual);\n population.add(betterIndividual);\n\n // Main loop\n while (evaluations < maxEvaluations) {\n // STEP 1. Generate the offspring\n Solution offspring = new Solution(population.get(0)) ;\n mutationOperator.execute(offspring);\n /*Solution mutated_solution = (Solution) mutationOperator.execute(offspring);\n if(offspring.getObjective(0) < mutated_solution.getObjective(0))\n offspring = mutated_solution;*/\n problem_.evaluate(offspring);\n Solution local_offspring = (Solution) localSearchOperator.execute(offspring);\n offspring.setObjective(0, local_offspring.getObjective(0));\n offspringPopulation.add(offspring);\n evaluations++;\n\n if(comparator.compare(betterIndividual, offspringPopulation.get(0)) > 0) {\n betterIndividual = new Solution(offspringPopulation.get(0));\n population.clear();\n // STEP 4. Create the new mu population\n population.add(betterIndividual);\n }\n\n System.out.println(population.get(0).getObjective(0)) ;\n\n // STEP 6. Delete the offspring population\n offspringPopulation.clear() ;\n } // while\n\n // Return a population with the best individual\n SolutionSet resultPopulation = new SolutionSet(1) ;\n resultPopulation.add(population.get(0)) ;\n\n return resultPopulation ;\n }",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"public static void better() {\n System.out.println(\"I am 'efficient'\");\n }",
"private void updateAgilisaurusState() {\n this.age++;\n\n if (this.age == 30 && this.hasCapability(LifeStage.BABY)) {\n // grow up\n this.removeCapability(LifeStage.BABY);\n this.addCapability(LifeStage.ADULT);\n this.displayChar = 'D';\n }\n\n if (this.foodLevel > 0) {\n this.foodLevel--;\n }\n\n if (this.waterLevel > 0) {\n this.waterLevel--;\n }\n\n if (this.foodLevel < 30) {\n this.behaviour = new HungryBehaviour();\n }\n\n if (this.foodLevel > 50) {\n this.behaviour = new BreedBehaviour();\n }\n\n if (this.foodLevel == 0) {\n this.Starving();\n } else {\n this.starvationLevel = 0;\n }\n\n if (this.waterLevel < 30) {\n this.behaviour = new ThirstBehaviour();\n }\n\n if (this.waterLevel == 0) {\n this.Thirsting();\n } else {\n this.thirstLevel = 0;\n }\n }",
"private static void handlePolymorphismAlt() {\n for(Transition t : petrinet.getTransitions()) {\n Stack<Place> inputs = new Stack<>();\n Set<Flow> inEdges = t.getPresetEdges();\n for(Flow f : inEdges) {\n for(int i = 0; i < f.getWeight(); i++) {\n inputs.push(f.getPlace());\n }\n }\n Stack<Place> trueInputs = new Stack<>();\n generatePolymophism(t, 0, inputs, trueInputs);\n }\n }",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"public void resetBiasUncertaintyInNs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.resetBiasUncertaintyInNs():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.resetBiasUncertaintyInNs():void\");\n }",
"void think() {\n //get the output of the neural network\n decision = brain.output(vision);\n\n if (decision[0] > 0.8) {//output 0 is boosting\n boosting = true;\n } else {\n boosting = false;\n }\n if (decision[1] > 0.8) {//output 1 is turn left\n spin = -0.08f;\n } else {//cant turn right and left at the same time\n if (decision[2] > 0.8) {//output 2 is turn right\n spin = 0.08f;\n } else {//if neither then dont turn\n spin = 0;\n }\n }\n //shooting\n if (decision[3] > 0.8) {//output 3 is shooting\n shoot();\n }\n }",
"public void doOfflineComputation() {\n\t\toptimalPolicy = policyIteration();\n\n\t}",
"float getSpecialProb();",
"public void postSpeciation() {\n\t\tif (speciesTarget > 0) {\r\n\t\t\tadjustThreshold();\r\n\t\t}\r\n\r\n\t\t// remove dead species\r\n\t\tfor (int i = 0; i < speciesList.size(); i++) {\r\n\r\n\t\t\tspeciesList.get(i).updateBestFitness();\r\n\r\n\t\t\tif ((speciesList.get(i).size() < 1) || (speciesList.get(i).isStagnant())) {\r\n\t\t\t\tspeciesList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public List<Feature> viterbi(HiddenMarkovModel<AminoAcid, Feature> model, List<AminoAcid> observedSequence) {\n List<Map<Feature, Double>> pathProbs = new ArrayList<>();\n //Stores: index of time step - current hidden state - the most probable previous hidden state\n List<Map<Feature, Feature>> helperVars = new ArrayList<>();\n\n Map<Feature, Map<Feature, Double>> transitions = model.getTransitionMatrix();\n Map<Feature, Map<AminoAcid, Double>> emissions = model.getEmissionMatrix();\n\n for (int i = 0; i < observedSequence.size(); i++) {\n Map<Feature, Double> newPathProb = new HashMap<>();\n Map<Feature, Feature> newHelpVar = new HashMap<>();\n AminoAcid currAcid = observedSequence.get(i);\n\n //Generate values for all possible current types\n for (Feature currFeature : Feature.values()) {\n //For first observation, there is no previous type, so the probability is only the emission prob\n if (i == 0) {\n newPathProb.put(currFeature, Math.log(emissions.get(currFeature).get(currAcid)));\n //Ensure that the time step corresponds with list index\n newHelpVar.put(currFeature, null);\n }\n else {\n //Deduce the previous state which outputs the greatest probability\n Feature maxPrevFeature = null;\n double maxProbability = Double.NEGATIVE_INFINITY;\n for (Feature prevFeature : Feature.values()) {\n double currentProb = pathProbs.get(i-1).get(prevFeature)\n + Math.log(transitions.get(prevFeature).get(currFeature))\n + Math.log(emissions.get(currFeature).get(currAcid));\n if (currentProb > maxProbability || maxPrevFeature == null) {\n maxPrevFeature = prevFeature;\n maxProbability = currentProb;\n }\n }\n newPathProb.put(currFeature, maxProbability);\n newHelpVar.put(currFeature, maxPrevFeature);\n }\n }\n pathProbs.add(newPathProb);\n helperVars.add(newHelpVar);\n }\n\n //Now backtrack to obtain ordering with maximum probability\n LinkedList<Feature> result = new LinkedList<>();\n Feature prevAddedType = Feature.END;\n result.add(prevAddedType);\n for (int i = helperVars.size() -1; i > 0; i--) {\n result.addFirst(helperVars.get(i).get(prevAddedType));\n prevAddedType = helperVars.get(i).get(prevAddedType);\n }\n return result;\n }",
"public void missingInput() throws BadDescriptionException {\n //check 1\n if (!current_state.containsAll(next_state)) {\n throw new BadDescriptionException();\n }\n }",
"abstract public RandomRange getPlunderRange(Unit attacker);",
"@Test\n public void test_shortcut_needed_bidirectional() {\n CHPreparationGraph graph = CHPreparationGraph.edgeBased(5, 4, (in, via, out) -> in == out ? 10 : 0);\n int edge = 0;\n graph.addEdge(0, 1, edge++, 10, 10);\n graph.addEdge(1, 2, edge++, 10, 10);\n graph.addEdge(2, 3, edge++, 10, 10);\n graph.addEdge(3, 4, edge++, 10, 10);\n graph.prepareForContraction();\n EdgeBasedWitnessPathSearcher searcher = new EdgeBasedWitnessPathSearcher(graph);\n searcher.initSearch(0, 1, 2, new EdgeBasedWitnessPathSearcher.Stats());\n double weight = searcher.runSearch(3, 6, 20.0, 100);\n assertTrue(Double.isInfinite(weight));\n }",
"public void SOM() {\n // Pick an input vector randomly.\n // A input vector can't be picked twice in a row.\n ArrayList<Double> oldVector = new ArrayList<>();\n ArrayList<Double> vector;\n\n for (int t = 0; t < this.nbIterations; t++) {\n\n // Choose another entry vector than the previous one.\n do {\n int randomInput = (int) (Math.random() * this.input.size());\n vector = this.input.get(randomInput);\n } while (oldVector.equals(vector));\n\n // The old vector is replaced by the new one.\n oldVector = new ArrayList<>(vector);\n\n // Calculation of BMU (Best Matching Unit).\n Neuron BMU = this.getBMU(vector);\n\n // Update the BMU's neighbors.\n this.updateNeighbors(BMU, vector, t);\n\n // Update the screen.\n this.screen.repaint();\n // Sleep for the animation.\n try {\n Thread.sleep(10);\n }\n catch (InterruptedException e) {\n System.out.println(\"Erreur sleep : \" + e);\n }\n }\n }",
"@Test\n public static void tinyLBTest() {\n final double[] answers = {0.0, 0.004592032688529923, 0.04725537386564205,\n 0.1396230607626959, 0.2735831034867167, 0.4692424353373485};\n final double kappa = 2.0;\n assertTrue( 0.0 == approximateLowerBoundOnP(0, 0, kappa) );\n final long n = 5;\n for (long k = 0; k <= n; k++) {\n final double lb = approximateLowerBoundOnP(n, k, kappa);\n final double est = estimateUnknownP(n, k);\n assertTrue(lb <= est);\n assertTrue(Math.abs(lb - answers[(int) k]) < 1e-14);\n // System.out.printf (\"LB\\t%d\\t%d\\t%.1f\\t%.16g%n\", n, k, kappa, lb);\n }\n }",
"void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}",
"public abstract void calculateSufficientStatistics();",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"void decUsage() {\n incUsage(-1);\n }",
"boolean ayG() {\n /*\n r18 = this;\n monitor-enter(r18);\n r0 = r18;\n r2 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x000e;\n L_0x000b:\n r2 = 0;\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n L_0x000d:\n return r2;\n L_0x000e:\n r7 = new java.util.ArrayList;\t Catch:{ all -> 0x00b9 }\n r7.<init>();\t Catch:{ all -> 0x00b9 }\n r3 = 0;\n r8 = java.lang.System.nanoTime();\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r4 = r0.dvd;\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r2 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r6 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r6 = r6.size();\t Catch:{ all -> 0x00b9 }\n r10 = r2.listIterator(r6);\t Catch:{ all -> 0x00b9 }\n L_0x002c:\n r2 = r10.hasPrevious();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x006d;\n L_0x0032:\n r2 = r10.previous();\t Catch:{ all -> 0x00b9 }\n r2 = (com.fossil.duy) r2;\t Catch:{ all -> 0x00b9 }\n r12 = r2.ayy();\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r14 = r0.dvd;\t Catch:{ all -> 0x00b9 }\n r12 = r12 + r14;\n r12 = r12 - r8;\n r14 = 0;\n r6 = (r12 > r14 ? 1 : (r12 == r14 ? 0 : -1));\n if (r6 <= 0) goto L_0x004e;\n L_0x0048:\n r6 = r2.isAlive();\t Catch:{ all -> 0x00b9 }\n if (r6 != 0) goto L_0x005f;\n L_0x004e:\n r10.remove();\t Catch:{ all -> 0x00b9 }\n r7.add(r2);\t Catch:{ all -> 0x00b9 }\n r16 = r4;\n r4 = r3;\n r2 = r16;\n L_0x0059:\n r16 = r2;\n r3 = r4;\n r4 = r16;\n goto L_0x002c;\n L_0x005f:\n r2 = r2.isIdle();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x00dc;\n L_0x0065:\n r6 = r3 + 1;\n r2 = java.lang.Math.min(r4, r12);\t Catch:{ all -> 0x00b9 }\n r4 = r6;\n goto L_0x0059;\n L_0x006d:\n r0 = r18;\n r2 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r6 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r6 = r6.size();\t Catch:{ all -> 0x00b9 }\n r6 = r2.listIterator(r6);\t Catch:{ all -> 0x00b9 }\n L_0x007d:\n r2 = r6.hasPrevious();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x009f;\n L_0x0083:\n r0 = r18;\n r2 = r0.dvc;\t Catch:{ all -> 0x00b9 }\n if (r3 <= r2) goto L_0x009f;\n L_0x0089:\n r2 = r6.previous();\t Catch:{ all -> 0x00b9 }\n r2 = (com.fossil.duy) r2;\t Catch:{ all -> 0x00b9 }\n r8 = r2.isIdle();\t Catch:{ all -> 0x00b9 }\n if (r8 == 0) goto L_0x00da;\n L_0x0095:\n r7.add(r2);\t Catch:{ all -> 0x00b9 }\n r6.remove();\t Catch:{ all -> 0x00b9 }\n r2 = r3 + -1;\n L_0x009d:\n r3 = r2;\n goto L_0x007d;\n L_0x009f:\n r2 = r7.isEmpty();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x00bd;\n L_0x00a5:\n r2 = 1000000; // 0xf4240 float:1.401298E-39 double:4.940656E-318;\n r2 = r4 / r2;\n r8 = 1000000; // 0xf4240 float:1.401298E-39 double:4.940656E-318;\n r8 = r8 * r2;\n r4 = r4 - r8;\n r4 = (int) r4;\t Catch:{ InterruptedException -> 0x00bc }\n r0 = r18;\n r0.wait(r2, r4);\t Catch:{ InterruptedException -> 0x00bc }\n r2 = 1;\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n goto L_0x000d;\n L_0x00b9:\n r2 = move-exception;\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n throw r2;\n L_0x00bc:\n r2 = move-exception;\n L_0x00bd:\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n r2 = 0;\n r4 = r7.size();\n r3 = r2;\n L_0x00c4:\n if (r3 >= r4) goto L_0x00d7;\n L_0x00c6:\n r2 = r7.get(r3);\n r2 = (com.fossil.duy) r2;\n r2 = r2.getSocket();\n com.fossil.dvw.m9969a(r2);\n r2 = r3 + 1;\n r3 = r2;\n goto L_0x00c4;\n L_0x00d7:\n r2 = 1;\n goto L_0x000d;\n L_0x00da:\n r2 = r3;\n goto L_0x009d;\n L_0x00dc:\n r16 = r4;\n r4 = r3;\n r2 = r16;\n goto L_0x0059;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.fossil.duz.ayG():boolean\");\n }",
"public IChoice losesAgainst();",
"int[] predict(int paraUserIndex, int paraItemIndex, int paraK) {\n\t\tint[] tempDistribution = new int[5];\n\t\tIndicesOfFriendsRatedItem = new int[5];\n\t\t// Step 1. Find my friends\n\t\tint[] tempFriends = dataModel.uSecRels[paraUserIndex];\n\n\t\t// System.out.println(\"the friends is \" + Arrays.toString(tempFriends));\n\n\t\t// Step 1.1 If the user has not friends, we can't predict the object.\n\t\tif (tempFriends == null || tempFriends.length == 0) {\n\t\t\ttempDistribution = predictForNoneFriendUser(paraUserIndex, paraItemIndex, paraK);\n\t\t\treturn tempDistribution;\n\t\t} // Of if\n\n\t\t// Step 2. Find users to buy the items\n\t\tint[] tempUsers = dataModel.iTrRateInds[paraItemIndex];\n\n\t\t// System.out.println(\"the tempUsers is \" + Arrays.toString(tempUsers));\n\n\t\t// Step 3. Find my friends who rated the item.\n\t\tint[] tempIndicesOfFriendsRatedItem = SetOperator.interSection(tempFriends, tempUsers);\n\n\t\t// if the inter-section is null, we ask my friend one by one.\n\t\t// int a = 0;\n\t\t// while (tempIndicesOfFriendsRatedItem == null && a <\n\t\t// dataModel.uRelations[paraUserIndex].length) {\n\t\t// tempFriends = dataModel.uRelations[dataModel.uRelations[paraUserIndex][a]];\n\t\t// tempIndicesOfFriendsRatedItem = SetOperator.interSection(tempFriends,\n\t\t// tempUsers);\n\t\t//// if(tempIndicesOfFriendsRatedItem != null) {\n\t\t//// noWayCount1++;\n\t\t//// }//Of if\n\t\t// a++;\n\t\t// } // Of while\n\n\t\t// If the intersection is null, we can't predict the object.\n\t\tif (tempIndicesOfFriendsRatedItem == null) {\n\t\t\ttempDistribution = predictForNoneFriendUser(paraUserIndex, paraItemIndex, paraK);\n\t\t\treturn tempDistribution;\n\t\t} // Of if\n\n\t\t// Step 4. Compute the distribution of the predicting item\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < tempIndicesOfFriendsRatedItem.length; i++) {\n\t\t\tfor (int j = 0; j < dataModel.uRelations[paraUserIndex].length; j++) {\n\t\t\t\tif (tempIndicesOfFriendsRatedItem[i] == dataModel.uRelations[paraUserIndex][j]) {\n\t\t\t\t\tint tempIndex = dataModel.iTrRatings[paraItemIndex][tempIndicesOfFriendsRatedItem[i]];\n\t\t\t\t\ttempDistribution[tempIndex - 1]++;\n\t\t\t\t\tIndicesOfFriendsRatedItem[tempIndex - 1]++;\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint tempIndex = dataModel.iTrRatings[paraItemIndex][tempIndicesOfFriendsRatedItem[i]];\n\t\t\ttempDistribution[tempIndex - 1]++;\n\n\t\t} // Of for i\n\n\t\treturn tempDistribution;\n\t}",
"public void reproduceVirus() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < 1; i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}",
"private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}",
"protected abstract boolean useReasoner();",
"void ComputeFitnessBefore(){\n\t\t\t\tint i, pos;\n\t\t\t\t// individual t;\n\t\t\t\tdouble min, sum = 0, tm;\n\t\t\t\t// First Compute Raw fitness\n\t\t\t\tfor(i = 0; i < poplen; i++)\n\t\t\t\t{\n\t\t\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t\t\t}\n\t\t\t\t//tim individual co fitness be nhat\n\t\t\t\tmin = oldpop[0].fitness;\t\t\t\n\t\t\t\tsum = oldpop[0].fitness;\t\t\t\n\t\t\t\t\n\t\t\t\tfor(i = 1; i < poplen; i++) {\n\t\t\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\t\t\tmin = oldpop[i].fitness;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsum += oldpop[i].fitness;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// copy the best and average\n//\t\t\t\tbestBeforeFitness[gen]=min;\n//\t\t\t\tavgBeforeFitness[gen]=sum/poplen;\n//\t\t\t\tbestcurrent[gen] = new individual();\n//\t\t\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n//\t\t\t\taverage[gen] = sum /poplen;\t\t\t\n\t\t\t\t\n\t\t\t}",
"@SubL(source = \"cycl/inference/harness/inference-balanced-tactician-motivation.lisp\", position = 23525) \n public static final SubLObject balanced_strategy_problem_is_the_rest_of_a_removalP(SubLObject problem, SubLObject strategy) {\n {\n SubLObject set_contents_var = inference_datastructures_problem.problem_dependent_links(problem);\n SubLObject basis_object = set_contents.do_set_contents_basis_object(set_contents_var);\n SubLObject state = NIL;\n for (state = set_contents.do_set_contents_initial_state(basis_object, set_contents_var); (NIL == set_contents.do_set_contents_doneP(basis_object, state)); state = set_contents.do_set_contents_update_state(state)) {\n {\n SubLObject restriction_link = set_contents.do_set_contents_next(basis_object, state);\n if ((NIL != set_contents.do_set_contents_element_validP(state, restriction_link))) {\n if ((NIL != inference_datastructures_problem_link.problem_link_has_typeP(restriction_link, $kw9$RESTRICTION))) {\n {\n SubLObject non_focal_problem = inference_datastructures_problem_link.problem_link_supported_problem(restriction_link);\n SubLObject set_contents_var_13 = inference_datastructures_problem.problem_dependent_links(non_focal_problem);\n SubLObject basis_object_14 = set_contents.do_set_contents_basis_object(set_contents_var_13);\n SubLObject state_15 = NIL;\n for (state_15 = set_contents.do_set_contents_initial_state(basis_object_14, set_contents_var_13); (NIL == set_contents.do_set_contents_doneP(basis_object_14, state_15)); state_15 = set_contents.do_set_contents_update_state(state_15)) {\n {\n SubLObject join_ordered_link = set_contents.do_set_contents_next(basis_object_14, state_15);\n if ((NIL != set_contents.do_set_contents_element_validP(state_15, join_ordered_link))) {\n if ((NIL != inference_datastructures_problem_link.problem_link_has_typeP(join_ordered_link, $kw12$JOIN_ORDERED))) {\n if ((NIL != inference_worker_join_ordered.join_ordered_link_restricted_non_focal_linkP(join_ordered_link, restriction_link))) {\n if ((non_focal_problem == inference_worker_join_ordered.join_ordered_link_non_focal_problem(join_ordered_link))) {\n if (((NIL != inference_datastructures_problem_link.problem_link_openP(join_ordered_link))\n && (NIL != balanced_strategy_link_motivates_lookahead_problemP(strategy, join_ordered_link, $kw14$REMOVAL)))) {\n return T;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n return NIL;\n }",
"@Test\n public void defensiveStrategy_notBlocked() throws IOException {\n Board f0 = new Board(\"------\"\n + \"-C----\"\n + \"------\"\n + \"------\"\n + \"P-P---\"\n + \"------\");\n // nicht blockiert, daher selbe Bewertung fuer beide Strategien\n assertEquals(f0.evaluate(true), f0.evaluate(false));\n assertTrue(f0.evaluate(false) < 0);\n\n // ausgeglichene Vorteile beider Spieler\n Board f1 = new Board(\"C--P-P\"\n + \"-C----\"\n + \"------\"\n + \"------\"\n + \"------\"\n + \"------\");\n\n assertEquals(f1.evaluate(false), f1.evaluate(true));\n assertEquals(0, f1.evaluate(false));\n }",
"private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public void run() {\n\t\tArrays.fill(label, NOT_AN_INDEX);\r\n\t\t\r\n\t\t// while there is a u in V with considered[u]=0 and mate[u]=0 do\r\n\t\tstage: for (int u = 0; u < gOrig.numVertices(); u++ ) {\r\n\t\t\t// if(mate[u] == NOT_AN_INDEX){\r\n\t\t\tif (gOrig.vertex(u) == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (matching.matches() == gOrig.numVertices() / 2) {\r\n\t\t\t\t// we are done\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tSystem.out.print(String.format(\"considering vertex u%d\\n\", u));\r\n\t\t\tif ( ! matching.isMatched(u)) {\r\n\t\t\t\t\r\n\t\t\t\t// considered[u]=1,A={empty}\r\n\t\t\t\t// A = new WeightedDigraph(gOrig.numVertices()/2);\r\n\t\t\t\tA.clear();\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do exposed[v]=0\r\n\t\t\t\tArrays.fill(exposed, NOT_AN_INDEX);\r\n\t\t\t\t\r\n\t\t\t\t// Construct the auxiliary digraph\r\n\t\t\t\t\r\n\t\t\t\t// for all (v,w) in E do\r\n\t\t\t\tfor (int v = 0; v < gOrig.numVertices(); v++ ) {\r\n\t\t\t\t\tfor (Edge e : gOrig.eOuts(v)) {\r\n\t\t\t\t\t\tint w = e.right;\r\n\t\t\t\t\t\tassert e.left == v : \"vertex correspondence is wrong\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// if mate[w]=0 and w!=u then exposed[v]=w else if mate[w] !=v,0 then A=union(A,{v,mate[w]})\r\n\t\t\t\t\t\t// if(mate[w] == NOT_AN_INDEX && w != u){\r\n\t\t\t\t\t\t// exposed[v] = w;\r\n\t\t\t\t\t\t// }else if(mate[w] != v && mate[w] != NOT_AN_INDEX){\r\n\t\t\t\t\t\t// A.addEdge(new Edge(v,mate[w]));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( ! matching.isMatched(w) && w != u) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to exposed\\n\", v, w));\r\n\t\t\t\t\t\t\tif (exposed[v] == NOT_AN_INDEX) {\r\n\t\t\t\t\t\t\t\texposed[v] = w;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (matching.mate(w) != v && matching.isMatched(w)) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to A\\n\", v, matching.mate(w)));\r\n\t\t\t\t\t\t\tA.add(new Edge(v, matching.mate(w)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tDEBUG(String.format(\"Exposed vertices={%s}\\n\", printExposed()));\r\n\t\t\t\tif (exposed().size() == 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do seen[v]=0\r\n\t\t\t\tArrays.fill(seen, false);\r\n\t\t\t\t\r\n\t\t\t\t// Q={u}; label[u]=0; if exposed[u]!=0 then augment(u), goto stage;\r\n\t\t\t\tQ.clear();\r\n\t\t\t\tQ.add(u);\r\n\t\t\t\tArrays.fill(label, NOT_AN_INDEX);// unsure whether it was meant to clear label or just unset label[u] OLD_CODE=label[u] = NOT_AN_INDEX;\r\n\t\t\t\tif (isExposed(u)) {\r\n\t\t\t\t\taugment(u);\r\n\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// need to figure out how to handle blossom()\r\n\t\t\t\t\r\n\t\t\t\t// while Q != {empty} do\r\n\t\t\t\twhile ( ! Q.isEmpty()) {\r\n\t\t\t\t\tint v = Q.pop();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// forall unlabeled nodes w in V such that (v,w) in A\r\n\t\t\t\t\tfor (Edge e : A) {\r\n\t\t\t\t\t\tint w = e.left;\r\n\t\t\t\t\t\tif (e.right == v && label[w] == NOT_AN_INDEX && label[v] != w) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Q=union(Q,w), label[w]=v\r\n\t\t\t\t\t\t\tif ( ! Q.contains(w)) {\r\n\t\t\t\t\t\t\t\tQ.offer(w);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tcontinue; ///THIS CONTINUE WAS ADDED LATE AT NIGHT\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlabel[w] = v;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// seen[mate[w]] = 1;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tint mate = findMate(w);\r\n\t\t\t\t\t\t\t\tseen[mate] = true;\r\n\t\t\t\t\t\t\t}catch(Exception err){\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"error marking mate of %d as seen, mate not found\\n\", w));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if exposed[w]!=0 then augment(w) goto stage;\r\n\t\t\t\t\t\t\tif (isExposed(w)) {\r\n\t\t\t\t\t\t\t\taugment(w);\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\t\t\t\tcontinue stage;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if seen[w]=1 then blossom(w)\r\n\t\t\t\t\t\t\tif (seen[w]) {\r\n\t\t\t\t\t\t\t\tblossom(w);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// remove loops created by the blossoms\r\n\t\t\t\t\tremoveSelfLoops(A);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected boolean test2() { // testing all policies thru random sequence of page \r\n // (multiple) accesses and check for page faults and BHR\r\n \r\n System.out.print(\"\\n Starting Test 2 (testing all policies; should show difference from policy to policy)... \\n\");\r\n System.out.print(\"\\n Also, SHOULD show different values of BHR's for policies in each round... \\n\");\r\n System.out.print(\"\\n Lower # of page faults --> better replacement poliy... \\n\");\r\n System.out.println(\"\\n higher BHR values --> better replacement poliy... \\n\");\r\n \r\n\r\n // we choose this number to ensure #pages > #bufpool\r\n // will use a seq of page nums to pin and unpin\r\n boolean status = PASS;\r\n \r\n int numPages = Minibase.BufferManager.getNumUnpinned(); //buf frames\r\n int numDiskPages = numPages*BUF_SIZE_MULTIPLIER;\r\n \r\n //*System.out.print(\"numPages: buf and disk: \" + numPages + \" and \" + numDiskPages+\"\\n\");\r\n Page pg = new Page();\r\n PageId pid;\r\n PageId firstPid = new PageId();\r\n System.out.println(\" - Allocate all pages\\n\");\r\n try {\r\n firstPid = Minibase.BufferManager.newPage(pg, numDiskPages); //starting at 9\r\n } catch (Exception e) {\r\n System.err.print(\"*** Could not allocate \" + numDiskPages);\r\n System.err.print(\" new pages in the database.\\n\");\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n // unpin that first page... to simplify our loop\r\n try {\r\n Minibase.BufferManager.unpinPage(firstPid, UNPIN_CLEAN);\r\n } catch (Exception e) {\r\n System.err.print(\"*** Could not unpin the first new page.\\n\");\r\n e.printStackTrace();\r\n status = FAIL;\r\n }\r\n\r\n\r\n // now nothing is pinned; numPages in buffers and numDiskPages on disk\r\n \r\n System.out.print(\" - load pages in random order (as well as pin) to generate hits and page faults: \\n\");\r\n pid = new PageId();\r\n \r\n //just do round robin and see whether it makes a diff between LRU and clock\r\n System.out.println(\"entering round robin stage ...\\n\");\r\n int rpid;\r\n int rPage;\r\n Random randomPage = new Random();\r\n Random iter = new Random();\r\n Random pin = new Random();\r\n iter.setSeed(1347); //prime num\r\n pin.setSeed(1938);\r\n int it = MAX_ITERATIONS*BUF_SIZE_MULTIPLIER;\r\n for (int j = 1; j <= it; j++){\r\n \r\n for ( int i=0; i < numDiskPages; i++){\r\n \r\n pid.pid = firstPid.pid + i;\r\n \r\n for (int k = 1; k <= pin.nextInt(MAX_PIN_COUNT)+1; k++){\r\n try {\r\n Minibase.BufferManager.pinPage(pid, pg, PIN_DISKIO);\r\n \r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not pin new page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n } \r\n \r\n // Copy the page number + 99999 onto each page. It seems\r\n // unlikely that this bit pattern would show up there by\r\n // coincidence.\r\n int data = pid.pid + 99999;\r\n Convert.setIntValue(data, 0, pg.getData()); \r\n \r\n try {\r\n Minibase.BufferManager.unpinPage(pid, UNPIN_DIRTY);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not unpin dirty page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n } \r\n \r\n }\r\n \r\n }\r\n if (status == PASS){ \r\n //invoke print \r\n System.out.println(\" Test 2: Round Robin for \"+it+\" iterations\"); \r\n Minibase.BufferManager.printBhrAndRefCount();\r\n System.out.print(\"\\n++++++++++++++++++++++++++==============\\n\");\r\n } \r\n\r\n // randomly load pages, pin them and unpin them a large number of times\r\n // load pages in some order to generate page faults\r\n Random seq = new Random();\r\n seq.setSeed(999331); //another prime num;\r\n pin.setSeed(iter.nextInt(13447)+1);\r\n randomPage.setSeed(13); //another prime num; \r\n \r\n for (int j = 1; j <= MAX_ITERATIONS; j++){\r\n \r\n \r\n for ( int i=1; i <= seq.nextInt(MAX_SEQUENCE)+1; i++){\r\n \r\n rpid = randomPage.nextInt(numDiskPages)+1;\r\n pid.pid = firstPid.pid + rpid;\r\n \r\n for (int k = 1; k <= pin.nextInt(MAX_PIN_COUNT)+1; k++){\r\n try {\r\n Minibase.BufferManager.pinPage(pid, pg, PIN_DISKIO);\r\n \r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not pin new page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n } \r\n \r\n // Copy the page number + 99999 onto each page. It seems\r\n // unlikely that this bit pattern would show up there by\r\n // coincidence.\r\n int data = pid.pid + 99999;\r\n Convert.setIntValue(data, 0, pg.getData()); \r\n \r\n try {\r\n Minibase.BufferManager.unpinPage(pid, UNPIN_DIRTY);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not unpin dirty page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n } \r\n \r\n }\r\n if (status == PASS){ \r\n //invoke print \r\n System.out.println(\" Test 2: Iteration: \"+j); \r\n Minibase.BufferManager.printBhrAndRefCount();\r\n System.out.print(\"\\n++++++++++++++++++++++++++==============\\n\");\r\n } \r\n }\r\n \r\n if (status == PASS){\r\n System.out.println(\" Test 2 completed successfully.\\n\"); \r\n System.out.println(\"\\n compare page faults for each policy\\n\");\r\n }\r\n return status;\r\n }",
"@Test\n void testCustomBanzhaf() {\n final int quota = 10;\n final int[] votes = new int[] {3, 4, 5, 6};\n final double[] banzhaf = new double[votes.length];\n\n CalculatorParameters params = new CalculatorParameters();\n params.votes = votes;\n params.quota = quota;\n\n int n = votes.length;\n params.n = n;\n CalculatorBanzhaf calculator = new CalculatorBanzhaf(n);\n long start = System.nanoTime();\n\n calculator.calculate(params, banzhaf);\n for (int i = 0; i < votes.length; i++) {\n System.out.println(votes[i] + \" -> \" + banzhaf[i]);\n }\n System.out.println();\n\n long elapsed = System.nanoTime() - start;\n System.out.println(\"Calculated in \" + elapsed / 1000L + \" us\");\n }",
"public void evaluate_anti_fixedpoint() {\n // DES_action_type = 0;\n // JOptionPane.showMessageDialog(null, \"Evaluating the Anti-FP && Action-Type = \" +\n // DES_action_type);\n int[] last2_anti_fixedpoint_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n last2_anti_fixedpoint_rounds[i] = DES_anti_fixedpoint_sequence[9][i];\n last2_anti_fixedpoint_rounds[32 + i] = DES_anti_fixedpoint_sequence[8][i];\n }\n DES_anti_fixedpoint = select(last2_anti_fixedpoint_rounds, FP);\n\n for (int i = 0; i < 64; i++)\n DES_anti_fixedpoint[i] = 1 ^ DES_anti_fixedpoint[i];\n }",
"public abstract void recalcNormalizationExtrema();",
"UsabilityGoal createUsabilityGoal();",
"@Test\n public void BackstagePass_HandleSpecialCase() {\n GildedRose sut = new GildedRose(createItemArray(BACKSTAGE_PASS, 5, 40));\n sut.updateQuality();\n assertEquals(42, sut.items[0].quality);\n }"
] | [
"0.5865389",
"0.52983296",
"0.5298174",
"0.5288557",
"0.5286946",
"0.5259145",
"0.5204375",
"0.51925296",
"0.5187872",
"0.51338184",
"0.51148057",
"0.508005",
"0.5078387",
"0.5077074",
"0.5074551",
"0.5047387",
"0.50442535",
"0.5039547",
"0.5005193",
"0.4999824",
"0.49925786",
"0.49811566",
"0.49795866",
"0.4976129",
"0.496293",
"0.49095225",
"0.4909521",
"0.48761097",
"0.48566872",
"0.4845142",
"0.48386273",
"0.4834873",
"0.48332986",
"0.48230574",
"0.48217812",
"0.4818093",
"0.4812012",
"0.48088825",
"0.48068032",
"0.47913668",
"0.47900268",
"0.4785095",
"0.47809818",
"0.47758266",
"0.47730535",
"0.4771685",
"0.47596943",
"0.47553772",
"0.47542182",
"0.47518107",
"0.47514153",
"0.4749734",
"0.47295502",
"0.4720577",
"0.47145742",
"0.4703624",
"0.46992838",
"0.46939063",
"0.46879387",
"0.4685783",
"0.46850505",
"0.46833655",
"0.46731418",
"0.4671854",
"0.4671044",
"0.4670282",
"0.4669343",
"0.46692103",
"0.4664041",
"0.4662944",
"0.46624303",
"0.46611568",
"0.46591142",
"0.46582955",
"0.46539924",
"0.46532416",
"0.4653196",
"0.4653043",
"0.4650869",
"0.4649315",
"0.46437985",
"0.46429792",
"0.46402818",
"0.46400672",
"0.4639493",
"0.46367595",
"0.46350145",
"0.46328208",
"0.46297187",
"0.46288842",
"0.46282473",
"0.46277538",
"0.4625884",
"0.46255597",
"0.46254262",
"0.462146",
"0.46209693",
"0.46203882",
"0.46196774",
"0.46186647",
"0.46181256"
] | 0.0 | -1 |
Recommends using an UB algorithm. RiVal original step. | public static void recommend(final int nFolds, final String inPath, final String outPath) {
for (int i = 0; i < nFolds; i++) {
org.apache.mahout.cf.taste.model.DataModel trainModel;
org.apache.mahout.cf.taste.model.DataModel testModel;
try {
trainModel = new FileDataModel(new File(inPath + "train_" + i + ".csv"));
testModel = new FileDataModel(new File(inPath + "test_" + i + ".csv"));
} catch (IOException e) {
e.printStackTrace();
return;
}
GenericRecommenderBuilder grb = new GenericRecommenderBuilder();
String recommenderClass = "org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender";
String similarityClass = "org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity";
int neighborhoodSize = NEIGH_SIZE;
Recommender recommender = null;
try {
recommender = grb.buildRecommender(trainModel, recommenderClass, similarityClass, neighborhoodSize);
} catch (RecommenderException e) {
e.printStackTrace();
}
String fileName = "recs_" + i + ".csv";
LongPrimitiveIterator users;
try {
users = testModel.getUserIDs();
boolean createFile = true;
while (users.hasNext()) {
long u = users.nextLong();
assert recommender != null;
List<RecommendedItem> items = recommender.recommend(u, trainModel.getNumItems());
//
List<RecommenderIO.Preference<Long, Long>> prefs = new ArrayList<>();
for (RecommendedItem ri : items) {
prefs.add(new RecommenderIO.Preference<>(u, ri.getItemID(), ri.getValue()));
}
//
RecommenderIO.writeData(u, prefs, outPath, fileName, !createFile, null);
createFile = false;
}
} catch (TasteException e) {
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public static void tinyUBTest() {\n final double[] answers = {0.5307575646626514, 0.7264168965132833, 0.860376939237304,\n 0.952744626134358, 0.9954079673114701, 1.0};\n final double kappa = 2.0;\n assertTrue(1.0 == approximateUpperBoundOnP(0, 0, kappa));\n final long n = 5;\n for (long k = 0; k <= n; k++) {\n final double ub = approximateUpperBoundOnP(n, k, kappa);\n final double est = estimateUnknownP(n, k);\n assertTrue(ub >= est);\n assertTrue(Math.abs(ub - answers[(int) k]) < 1e-14);\n // System.out.printf (\"UB\\t%d\\t%d\\t%.1f\\t%.16g%n\", n, k, kappa, ub);\n }\n }",
"double find_min_takeoff_v_old_algorithm_aux (double min_lift, double max_drag, double speed, double speed_step, double pitch_init, double pitch_step) {\n double pitch = pitch_init;\n double pitch_limit = aoa_max*0.7;\n {\n trace(\"speed_step: \" + speed_step + \" pitch_step: \" + pitch_step);\n for (; speed < v_max; speed += speed_step) {\n velocity = speed;\n // if the startimg pitch guess when at this point was too high, \n // drag will be too big at this point; then reduce pitch\n while (pitch > aoa_min/2) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag)\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n else \n break; // while (pitch > aoa_min/2)\n } \n \n trace(\"for() speed: \" + speed + \" pitch: \" + pitch);\n for (;pitch < pitch_limit; pitch += pitch_step) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag) {\n // stop increasing pitch, won't work. need more speed\n trace(\"too much drag. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift());\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n break; // for (pitch...)\n }\n if (foil_lift() >= min_lift) {\n if (speed_step > 0.25) {\n trace(\"request reiterate. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift() + \" speed_step: \" + speed_step);\n return Math.max(0, velocity - speed_step); // request to reiterate\n } else {\n // done!\n make_min_takeoff_speed_info(min_lift, max_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + min_takeoff_speed_info);\n return -1;\n }\n } \n }\n // need to start from lowest pitch?\n if (pitch >= pitch_limit) pitch = pitch_init;\n }\n }\n return -2; // can not find solution\n }",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"private int computeBetterResponse(int player, GameObserver go) {\n int[] devOutcome = currentOutcome.clone();\n double aspirationPayoff = eGame.getPayoff(currentOutcome, player) + aspirationLevel;\n double bestPayoff = eGame.getPayoff(currentOutcome, player);\n int bestResponse = currentOutcome[player];\n\n ///System.out.println(\"Finding BR: \" + Arrays.toString(currentOutcome));\n\n // get the order in which to test best responses\n List<Integer> order = deviationTestOrder.getDeviationTestOrder(currentOutcome, player);\n\n// if (order.size() < nActs[player]-1) {\n// System.out.println(\"To few actions in order listing: \" + order.size());\n// }\n\n int itr = 0;\n for (int a : order) {\n // skip current action\n if (a == currentOutcome[player]) continue;\n devOutcome[player] = a;\n\n //System.out.println(\"Testing dev: \" + Arrays.toString(devOutcome));\n\n // check whether this profile is \"tabu\"\n if (tabu.getValue(devOutcome)) {\n //System.out.println(\"TABU\");\n continue;\n }\n\n // sample if necessary; flag not enough samples\n if (eGame.getNumSamples(devOutcome) == 0) {\n if (go.numObsLeft() <= 0) return NO_SAMPLES_FLAG;\n sampleAndUpdate(devOutcome, go);\n //System.out.println(\"SAMPLED\");\n }\n\n // check BR\n double devPayoff = eGame.getPayoff(devOutcome, player);\n\n// if (devPayoff > aspirationPayoff) {\n// //System.out.println(\"Aspiration met.\");\n// return a;\n// } else\n\n if (devPayoff > bestPayoff) {\n //System.out.println(\"Br, but not aspiration level\");\n bestPayoff = devPayoff;\n bestResponse = a;\n }\n\n itr++;\n if (itr > minDeviationsTested &&\n bestPayoff > aspirationPayoff) {\n return bestResponse;\n }\n\n }\n\n if (bestResponse != currentOutcome[player]) {\n //System.out.println(\"return non-aspiration BR\");\n return bestResponse;\n }\n //System.out.println(\"NO BR\");\n return NO_BR_FLAG;\n }",
"private static void badApproach() {\n\t\t\n\t\tList<Double> result = new ArrayList<>();\n\t\t\n\t\tThreadLocalRandom.current()\n\t\t\t.doubles(10_000).boxed()\n\t\t\t.forEach(\n\t\t\t\t\td -> NewMath.inv(d)\n\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\tinv -> NewMath.sqrt(inv)\n\t\t\t\t\t\t\t\t.ifPresent(\n\t\t\t\t\t\t\t\t\t\tsqrt -> result.add(sqrt)\n\t\t\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\n\t\tSystem.out.println(\"# result = \"+result.size());\n\t\t\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}",
"private void computeOutcomePrediction(GameObserver gameObs) {\n int nProfiles = eGame.getNumProfiles();\n while (gameObs.numObsLeft() > 0 &&\n eGame.getTotalNumSamples() < nProfiles) {\n\n int newBR = computeBetterResponse(currentPlayer, gameObs);\n\n // not enough samples to compute the next BR\n if (newBR == NO_SAMPLES_FLAG) {\n break;\n }\n\n // no BR for this player; try another player\n // if no players are left, we have found an equilibrium\n else if (newBR == NO_BR_FLAG) {\n if (lastPlayerWithBR == currentPlayer) {\n checkStability();\n selectRandomUnexploredProfile(gameObs);\n updateCurrentPlayer();\n } else {\n updateCurrentPlayer();\n }\n }\n\n // we have found a new BR\n else {\n // flag errors\n if (newBR < 0 || newBR > nActs[currentPlayer]) {\n throw new RuntimeException(\"Invalid BR in IBRD: \" + currentPlayer + \" \" + newBR);\n }\n\n // update the current profile and tabu list\n tabu.setValue(true, currentOutcome);\n currentOutcome[currentPlayer] = newBR;\n lastPlayerWithBR = currentPlayer;\n updateCurrentPlayer();\n }\n }\n\n // update \"global\" prediction based on all data so far\n updateGlobalOutcomePrediction();\n\n //System.out.println(\"Done with this iteration; no more samples.\");\n //System.out.println(\"Samples: \" + gameObs.getNumObs());\n }",
"public void computeWinnerDeterminationU()\r\n\t{\r\n\t\tif( _plans.size() == 0)\r\n\t\t{\r\n\t\t\t_allocation = new AllocationWoD();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t_randGenerator.setSeed(_seed);\r\n\t\t\r\n\t\tdouble maxExpectedUtility = 0.;\r\n\t\tint itsIdx = -1;\r\n\t\tint itsAtom = -1;\r\n\t\tfor(int i = 0; i < _plans.size(); ++i)\t\t\t\t\t\t\t\t\t// for every buyer\r\n\t\t\tfor(int j = 0; j < _plans.get(i).getNumberOfAtoms(); ++j)\t\t\t// for every plan he has value for\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get(i).getAtom(j));\r\n\t\t\t\tif(_paymentRule.equals(\"SecondPrice\"))\r\n\t\t\t\t\tplan.resolveWithSecondPrice();\r\n\t\t\t\telse if(_paymentRule.equals(\"FirstPrice\"))\r\n\t\t\t\t\tplan.resolveWithFirstPrice();\r\n\t\t\t\telse throw new RuntimeException(\"Cannot resolve the type: \" + _paymentRule);\r\n\t\t\t\t\r\n\t\t\t\tdouble expectedUtility = plan.computeExpectedValue() - plan.getPlanExpectedPayment();\r\n\t\t\t\t\r\n\t\t\t\tif( expectedUtility >= maxExpectedUtility )\r\n\t\t\t\t{\r\n\t\t\t\t\tmaxExpectedUtility = expectedUtility;\r\n\t\t\t\t\titsIdx = i;\r\n\t\t\t\t\titsAtom = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t_allocation = new AllocationWoD();\r\n\r\n\t\tif(itsIdx >= 0)\r\n\t\t{\r\n\t\t\tList<Integer> allocatedBundles = new LinkedList<Integer>();\r\n\t\t\tallocatedBundles.add(itsAtom);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get( itsIdx ).getAtom( itsAtom ));\r\n\t\t\t\t\r\n\t\t\t\tList<Integer> actuallyAllocatedTuples = new LinkedList<Integer>();\r\n\t\t\t\tfor(int i = 0; i < plan.getNumberOfFragments(); ++i)\r\n\t\t\t\t\tactuallyAllocatedTuples.add( plan.getMinNumberOfRecords(i) + _randGenerator.nextInt(plan.getMaxNumberOfRecords(i) - plan.getMinNumberOfRecords(i)) );\r\n\r\n\t\t\t\tif(plan.getAllocatedSellers().size() < 1)\r\n\t\t\t\t\tthrow new RuntimeException(\"No sellers in plan: \" + plan.toString());\r\n\t\t\t\t\r\n\t\t\t\tplan.setActuallyAllocatedRecords(actuallyAllocatedTuples);\r\n\t\t\t\tList<Integer> sellersInvolved = plan.getAllocatedSellers();\r\n\t\t\t\t\r\n\t\t\t\tList<ComplexSemanticWebType> allocatedPlans = new LinkedList<ComplexSemanticWebType>();\r\n\t\t\t\tallocatedPlans.add(plan);\r\n\t\t\t\t_allocation.addAllocatedAgent(plan.getAgentId(), sellersInvolved, allocatedBundles,\r\n\t\t\t\t\t\t\t\t\t\t\t plan.computeExpectedValue(), plan.computeExpectedCosts());\r\n\t\t\t\t_allocation.addAllocatedPlans(allocatedPlans, true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }",
"double getMissChance();",
"public abstract void BoostNerf(int boost);",
"abstract double rightProbability();",
"private void checkStability() {\n double maxDeviation = Double.NEGATIVE_INFINITY;\n\n DeviationIterator itr = new DeviationIterator(currentOutcome, nActs);\n while (itr.hasNext()) {\n int[] devOutcome = itr.next();\n\n // this shouldn't happen\n if (eGame.getNumSamples(devOutcome) <= 0) {\n System.out.println(\"BRD: checking equilibrium with unsampled deviations!\");\n System.out.println(\"Current: \" + Arrays.toString(currentOutcome));\n System.out.println(\"Unsampled: \" + Arrays.toString(devOutcome));\n return;\n }\n\n double devBenefit = eGame.getPayoff(devOutcome, itr.getDeviatingPlayer()) -\n eGame.getPayoff(currentOutcome, itr.getDeviatingPlayer());\n\n maxDeviation = Math.max(maxDeviation, devBenefit);\n\n // terminate early; not better than one we have already confirmed\n if (maxDeviation >= confirmedStability) return;\n }\n\n if (maxDeviation < confirmedStability) {\n confirmedStability = maxDeviation;\n mostStableConfirmed = currentOutcome.clone();\n if (samplesToConfirmEquilibrium < 0 &&\n confirmedStability <= 0) {\n samplesToConfirmEquilibrium = eGame.getTotalNumSamples();\n }\n }\n }",
"public void increase_BUIBYDryingFactor(){\r\n\tBUO=BUO+DF;\r\n}",
"private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}",
"private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }",
"void ComputeFitnessBefore(){\n\t\t\t\tint i, pos;\n\t\t\t\t// individual t;\n\t\t\t\tdouble min, sum = 0, tm;\n\t\t\t\t// First Compute Raw fitness\n\t\t\t\tfor(i = 0; i < poplen; i++)\n\t\t\t\t{\n\t\t\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t\t\t}\n\t\t\t\t//tim individual co fitness be nhat\n\t\t\t\tmin = oldpop[0].fitness;\t\t\t\n\t\t\t\tsum = oldpop[0].fitness;\t\t\t\n\t\t\t\t\n\t\t\t\tfor(i = 1; i < poplen; i++) {\n\t\t\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\t\t\tmin = oldpop[i].fitness;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsum += oldpop[i].fitness;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// copy the best and average\n//\t\t\t\tbestBeforeFitness[gen]=min;\n//\t\t\t\tavgBeforeFitness[gen]=sum/poplen;\n//\t\t\t\tbestcurrent[gen] = new individual();\n//\t\t\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n//\t\t\t\taverage[gen] = sum /poplen;\t\t\t\n\t\t\t\t\n\t\t\t}",
"public abstract void recalcNormalizationExtrema();",
"@Override\n\tpublic Double unreliability(Scanner scaner) {\n\t\treturn 0d;\n\t}",
"@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }",
"public void antiderivative () {\n antiderivative(0.0);\n }",
"abstract public RandomRange getPlunderRange(Unit attacker);",
"private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}",
"private double calculateUvi(){\n if ( uva != Integer.MAX_VALUE\n && uvb != Integer.MAX_VALUE\n && uvd != Integer.MAX_VALUE\n && uvcomp1 != Integer.MAX_VALUE\n && uvcomp2 != Integer.MAX_VALUE\n )\n {\n // These equations came from the \"Designing the VEML6075 into an Application\" document from Vishay\n double uvacomp = (uva - uvd) - VEML_A_COEF * (uvcomp1 - uvd) - VEML_B_COEF * (uvcomp2 - uvd);\n double uvbcomp = (uvb - uvd) - VEML_C_COEF * (uvcomp1 - uvd) - VEML_D_COEF * (uvcomp2 - uvd);\n\n return ( (uvbcomp * VEML_UVB_RESP) + (uvacomp * VEML_UVA_RESP) ) / 2.0;\n }\n\n return Double.NaN;\n }",
"@Test\n @Order(8)\n void taillardTestMoreIterations() {\n try {\n\n for (int i = 0; i < SearchTestUtil.taillardFilenames.length; i++) {\n int output;\n float sumTabu = 0;\n int minTabu = Integer.MAX_VALUE;\n float sumRecuit = 0;\n int minRecuit = Integer.MAX_VALUE;\n System.out.println(\"Run#\" + SearchTestUtil.taillardFilenames[i]);\n assignementProblem.taillardInitializer(SearchTestUtil.taillardFilenames[i]);\n assignementProblem.setNeighborsFunction(NEIGHBORHOOD_TYPE, assignementProblem.getAssignmentData().getLength());\n for (int j = 0; j < 10; j++) {\n assignementProblem.setInCombination(Combination.generateRandom(assignementProblem.getAssignmentData().getLength()));\n\n System.out.println(\"\\n \\t Test#\"+j);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumTabu += output;\n if (output < minTabu) minTabu = output;\n\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumRecuit += output;\n if (output < minRecuit) minRecuit = output;\n }\n\n\n System.out.println(\"\\tAverage tabu \" + sumTabu / 10);\n System.out.println(\"\\tMinimum found \" + minTabu);\n\n System.out.println(\"\\tAverage recuit \" + sumRecuit / 10);\n System.out.println(\"\\tMinimum found \" + minRecuit);\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public int a(alq paramalq, int paramInt1, int paramInt2, fn paramfn)\r\n/* 120: */ {\r\n/* 121:137 */ int i = 0;\r\n/* 122: */ amj localamj;\r\n/* 123: */ int k;\r\n/* 124:138 */ for (int j = 0; j < this.a.length; j++)\r\n/* 125: */ {\r\n/* 126:139 */ localamj = this.a[j];\r\n/* 127:140 */ if (localamj != null) {\r\n/* 128:143 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 129:146 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 130:149 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), true)))\r\n/* 131: */ {\r\n/* 132:153 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 133:154 */ i += k;\r\n/* 134:155 */ if (paramInt2 != 0)\r\n/* 135: */ {\r\n/* 136:156 */ this.a[j].b -= k;\r\n/* 137:157 */ if (this.a[j].b == 0) {\r\n/* 138:158 */ this.a[j] = null;\r\n/* 139: */ }\r\n/* 140:160 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 141:161 */ return i;\r\n/* 142: */ }\r\n/* 143: */ }\r\n/* 144: */ }\r\n/* 145: */ }\r\n/* 146: */ }\r\n/* 147: */ }\r\n/* 148: */ }\r\n/* 149:165 */ for (j = 0; j < this.b.length; j++)\r\n/* 150: */ {\r\n/* 151:166 */ localamj = this.b[j];\r\n/* 152:167 */ if (localamj != null) {\r\n/* 153:170 */ if ((paramalq == null) || (localamj.b() == paramalq)) {\r\n/* 154:173 */ if ((paramInt1 <= -1) || (localamj.i() == paramInt1)) {\r\n/* 155:176 */ if ((paramfn == null) || (cy.a(paramfn, localamj.o(), false)))\r\n/* 156: */ {\r\n/* 157:180 */ k = paramInt2 <= 0 ? localamj.b : Math.min(paramInt2 - i, localamj.b);\r\n/* 158:181 */ i += k;\r\n/* 159:182 */ if (paramInt2 != 0)\r\n/* 160: */ {\r\n/* 161:183 */ this.b[j].b -= k;\r\n/* 162:184 */ if (this.b[j].b == 0) {\r\n/* 163:185 */ this.b[j] = null;\r\n/* 164: */ }\r\n/* 165:187 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 166:188 */ return i;\r\n/* 167: */ }\r\n/* 168: */ }\r\n/* 169: */ }\r\n/* 170: */ }\r\n/* 171: */ }\r\n/* 172: */ }\r\n/* 173: */ }\r\n/* 174:193 */ if (this.f != null)\r\n/* 175: */ {\r\n/* 176:194 */ if ((paramalq != null) && (this.f.b() != paramalq)) {\r\n/* 177:195 */ return i;\r\n/* 178: */ }\r\n/* 179:197 */ if ((paramInt1 > -1) && (this.f.i() != paramInt1)) {\r\n/* 180:198 */ return i;\r\n/* 181: */ }\r\n/* 182:200 */ if ((paramfn != null) && (!cy.a(paramfn, this.f.o(), false))) {\r\n/* 183:201 */ return i;\r\n/* 184: */ }\r\n/* 185:204 */ j = paramInt2 <= 0 ? this.f.b : Math.min(paramInt2 - i, this.f.b);\r\n/* 186:205 */ i += j;\r\n/* 187:206 */ if (paramInt2 != 0)\r\n/* 188: */ {\r\n/* 189:207 */ this.f.b -= j;\r\n/* 190:208 */ if (this.f.b == 0) {\r\n/* 191:209 */ this.f = null;\r\n/* 192: */ }\r\n/* 193:211 */ if ((paramInt2 > 0) && (i >= paramInt2)) {\r\n/* 194:212 */ return i;\r\n/* 195: */ }\r\n/* 196: */ }\r\n/* 197: */ }\r\n/* 198:217 */ return i;\r\n/* 199: */ }",
"private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }",
"private void runBest() {\n }",
"public void calculateProbabilities(){\n\t}",
"protected ProbNet step (PNEdit bestEdition) throws NormalizeNullVectorException {\n\n /* If there have been any improvements on the score, we update\n * the learnedNet. */\n try{\n probNet.doEdit(bestEdition);\n } catch (ConstraintViolationException ex){\n /* If the edition was not allowed (ModelNetworkconstraint)\n * the algorithm just goes through the next iteration of the\n * loop, asking the cache for the next best edition.\n */\n }\n catch (Exception exception){\n exception.printStackTrace();\n }\n return probNet;\n }",
"public void rla() {\r\n\t\tint iter = 0;\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\titer++;\r\n\t\t\t\r\n\t\t\tHashMap<RouteState, ActionValue<RouteAction>> V0 = new HashMap<RouteState, ActionValue<RouteAction>> (V);\r\n\r\n\t\t\tfor (RouteState state : Q.keySet()) {\r\n\t\t\t\tfor (RouteAction action : Q.get(state).keySet()) {\t\t\t\r\n\t\t\t\t\tdouble value = R.get(state).get(action) + discountedSum(state, action);\r\n\t\t\t\t\tQ.get(state).put(action, value);\r\n\t\t\t\t}\r\n\t\t\t\tRouteAction bestAction = Q.get(state).entrySet().stream().max((entry1, entry2) -> entry1.getValue() > entry2.getValue() ? 1 : -1).get().getKey();\r\n\t\t\t\tDouble bestValue = Q.get(state).get(bestAction);\r\n\t\t\t\tActionValue<RouteAction> av = new ActionValue<RouteAction>(bestAction, bestValue);\r\n\r\n\t\t\t\tV.put(state, av);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (goodEnough(V0, V)) break;\r\n\t\t}\r\n\t\tSystem.out.println(\"Number of iterations: \" + iter);\r\n\t}",
"@Test\n public void testAdaptivePruningWithBadBubble() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n final SeqVertex F = new SeqVertex(\"F\");\n final SeqVertex G = new SeqVertex(\"G\");\n final SeqVertex H = new SeqVertex(\"H\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, E, F, G, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, F, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, G, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), E, C);\n\n if (variantPresent) {\n graph.addVertices(H);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, H, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_LOG_ODDS_THRESHOLD,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(H));\n }\n }\n }",
"@Override\n\tpublic double getTargetValueInCurrentBest() {\n\t\treturn 0;\n\t}",
"@Override\n public void computeSatisfaction() {\n\n }",
"public abstract void improveValueFunction(Vector<BeliefState> vBeliefPoints, Vector<BeliefState> vNewBeliefPoints);",
"static int testUlpCase(float f, float expected) {\n float minus_f = -f;\n int failures=0;\n\n failures+=Tests.test(\"Math.ulp(float)\", f,\n Math.ulp(f), expected);\n failures+=Tests.test(\"Math.ulp(float)\", minus_f,\n Math.ulp(minus_f), expected);\n failures+=Tests.test(\"StrictMath.ulp(float)\", f,\n StrictMath.ulp(f), expected);\n failures+=Tests.test(\"StrictMath.ulp(float)\", minus_f,\n StrictMath.ulp(minus_f), expected);\n return failures;\n }",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"private static AlleleFrequencyBacked.AlleleFrequencyRange computeAFrange(double[] alleleFrequencyProbs, int N, int bestAFguess, double fraction) {\n double totalProb = alleleFrequencyProbs[bestAFguess];\n int lowIndex = bestAFguess;\n int highIndex = bestAFguess;\n while ( totalProb < fraction ) {\n if ( lowIndex > 1 ) {\n lowIndex--;\n totalProb += alleleFrequencyProbs[lowIndex];\n }\n if ( highIndex < N ) {\n highIndex++;\n totalProb += alleleFrequencyProbs[highIndex];\n }\n }\n \n return new AlleleFrequencyBacked.AlleleFrequencyRange((double)lowIndex / (double)N, (double)highIndex / (double)N, fraction);\n }",
"public void evaluate_anti_fixedpoint() {\n // DES_action_type = 0;\n // JOptionPane.showMessageDialog(null, \"Evaluating the Anti-FP && Action-Type = \" +\n // DES_action_type);\n int[] last2_anti_fixedpoint_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n last2_anti_fixedpoint_rounds[i] = DES_anti_fixedpoint_sequence[9][i];\n last2_anti_fixedpoint_rounds[32 + i] = DES_anti_fixedpoint_sequence[8][i];\n }\n DES_anti_fixedpoint = select(last2_anti_fixedpoint_rounds, FP);\n\n for (int i = 0; i < 64; i++)\n DES_anti_fixedpoint[i] = 1 ^ DES_anti_fixedpoint[i];\n }",
"private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }",
"@Override\n\tpublic double getBestTargetValue() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double getFinalBestTargetValue() {\n\t\treturn 0;\n\t}",
"public boolean LocalImprovementDNF (TableVar Variables, TableDat Examples) {\r\n IndDNF solucion = new IndDNF(Variables.getNVars(), Variables);\r\n QualityMeasures res, new_res;\r\n int mejor, cambio;\r\n int[] indices = new int[Variables.getNVars()];\r\n float[] evalua = new float[Variables.getNVars()];\r\n boolean improvement = true;\r\n boolean retValue = false;\r\n int control;\r\n\r\n // Store the pos of the best guy in \"mejor\"\r\n mejor = poblac.getBestGuy();\r\n\r\n // Copy in \"solucion\" the rule to improve\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n solucion.setCromElemGene(i, j, poblac.getCromElemGene(mejor,i,j));\r\n\r\n // Evaluate de rule and get the measures\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; // Increment the number of trials\r\n res = solucion.getMedidas();\r\n\r\n control = 1;\r\n\r\n while ((improvement)&&(control<Variables.getNVars())) {\r\n improvement = false; // By now, there is no improvement\r\n for (int i=0; i<Variables.getNVars(); i++) {\r\n indices[i]=i;\r\n // It does not matter if the variable is discrete or continuous\r\n if (solucion.getCromElemGene(i,Variables.getNLabelVar(i))==0)\r\n // If variable does not actually takes part in the rule\r\n evalua[i] = -1;\r\n else {\r\n // The initial value is not stored cause we know the value is 1\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i),0);\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++;\r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n }\r\n else\r\n evalua[i]=-1;\r\n // Restore initial values of \"solucion\"\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i), 1);\r\n }\r\n }\r\n\r\n if (improvement) {\r\n Utils.OrCrecIndex (evalua,0,Variables.getNVars()-1,indices);\r\n cambio = indices[Variables.getNVars()-1];\r\n for (int j=0; j<=Variables.getNLabelVar(cambio); j++)\r\n solucion.setCromElemGene(cambio, j, 0);\r\n\r\n res.setSup(evalua[Variables.getNVars()-1]);\r\n // Important: take into account not to eliminate all the variables of the rule\r\n\r\n // If there is improvement, set return value to true\r\n retValue = true;\r\n control++;\r\n\r\n }\r\n } // End while \"improvement\"\r\n\r\n // Store the new rule if it was improved\r\n if (retValue==true){\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n poblac.setCromElemGene(mejor, i, j, solucion.getCromElemGene(i,j));\r\n poblac.setIndivEvaluated(mejor,false);\r\n }\r\n\r\n return retValue;\r\n\r\n }",
"static void testAProblem(Problem aProblem,Problem optimisedSortProblem){\n\t\t\t\tIndividual originalIndividual = new Individual(aProblem);\n\t\t\t\t//Individual.initialise(originalIndividual.ourProblem.getStrings());\n\t\t\t\toriginalIndividual.gpMaterial.printAll();\n\t\t\t\tIndividualEvaluator indEval = new ByteCodeIndividualEvaluator();\n\t\t\t\tindEval.evaluateIndNoTimeLimit(originalIndividual); // This is our reference individual\n\t\t\t\toriginalIndividual.ourProblem.setBaselineRuntimeAvg(originalIndividual.getRuntimeAvg());\n\t\t\t\t\n\t\t\t\t// create a variant to compare against\n\t\t\t\t//Problem optimisedSortProblem = new Sort1Optimised();\n\t\t\t\tIndividual sortVariant = new Individual(originalIndividual, optimisedSortProblem,null);\n\t\t\t\tindEval.evaluateIndNoTimeLimit(sortVariant);\n\t\t\t\tSystem.out.println(\"Variant \"+sortVariant +\" \"+ sortVariant.getFunctionalityErrorCount()+\" \"+ sortVariant.getRuntimeAvg());\n\t\t\t\tSystem.out.println(\"timeratio: \" + sortVariant.getTimeFitnessRatio()+ \" correctness \"+ sortVariant.getCorrectness());\n\t\t\t\tSystem.out.println(\"Fitness \" + sortVariant.getFitness()+\"\\n\");\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t *\t9 May 2014 (commented out 15 Jan 2015)\n\t\t\t\t * Added to test multithreaded evaluation,\n\t\t\t\t * create a generation of individuals, then evaluate the lot. \n\t\t\t\t * (not needed, bug found in multi-threaded eval, due to programs accessing static methods when collecting results\n\t\t\t\t */\n\t\t\t\t/*for ( int i = 1 ; i < 100 ; i++){\n\t\t\t\t\toptimisedSortProblem = new Sort1Optimised();\n\t\t\t\t\tsortVariant = new Individual(originalIndividual, optimisedSortProblem,null);\n\t\t\t\t\tindEval.evaluateIndNoTimeLimit(sortVariant);\n\t\t\t\t\tSystem.out.println(\"Variant \"+sortVariant +\" \"+ sortVariant.getFunctionalityScore()+\" \"+ sortVariant.getRuntimeAvg());\n\t\t\t\t\tSystem.out.println(\"timeratio: \" + sortVariant.getTimeFitnessRatio()+ \" correctness \"+ sortVariant.getCorrectness());\n\t\t\t\t\tSystem.out.println(\"Fitness \" + sortVariant.getFitness()+\"\\n\");\n\t\t\t\t}*/\n\t}",
"private void testWithBacktrackingInput(LcssAlgorithm algorithm) {\n\t}",
"public void setUnbiasedEstimate(boolean newValue) {\n m_unbiasedEstimate = newValue;\n }",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"float getSpecialProb();",
"private double getUnadjustedFitness(Computer computer){\n double score = 0;\n score += 6 * getMatchPercent(computer);\n if(computer.compatible() && sizeCompatability(computer))\n score += 9.5;\n int ramAmount =computer.ramAmount();\n if(ramAmount < 8)\n score -= (8 - ramAmount) * 2;\n else if(ramAmount > 8 && ramAmount < 17)\n score += .06 * (ramAmount - 8);\n else if(ramAmount > 17)\n score += .03 * (ramAmount - 8);\n\n if(computer.cpu.name.contains(\"Intel\") && computer.cpu.name.endsWith(\"K\")){\n if (!computer.motherboard.overclock()){\n score -= 6;\n }\n }\n\n if(computer.cpu.name.contains(\"Intel\") && !(computer.cpu.shortname.contains(\"-5\") || computer.cpu.shortname.contains(\"-6\"))){\n score -= 2;\n }\n if(computer.cpu.name.contains(\"GeForce\") && !(computer.gpu.name.contains(\"GTX 9\") || computer.gpu.name.contains(\"GTX 1\"))){\n score -= 2;\n }\n if(computer.bootDrive.size < 240)\n score -= settings.diskSize * 0.33;\n if(computer.bootDrive.size > 700)\n score += settings.diskSize * 5;\n else\n score += settings.diskSize * computer.bootDrive.size / 140;\n if(computer.secondaryDrive != null)\n score += settings.diskSize * computer.secondaryDrive.size / 1000;\n\n //Now ensure there's enough power, and give a bonus for there being ~300 watts more than needed;\n //there are 4.5 points to gain in powersupply, 10 points to lose\n int basePower = computer.powerConsumption();\n int ideal = basePower + 65;\n if(computer.power.watts < basePower)\n score -= 10;\n else if(computer.power.watts < ideal)\n score += (basePower - computer.power.watts) / 100;\n else\n score += 2.5 - (computer.power.watts - basePower) / 250;\n score += (3 - computer.power.tier) * .6;\n\n // Now motherboard, one point to gain, one to lose\n score += 2 - computer.motherboard.getQuality();\n\n double driveScore = ((computer.bootDrive.reads + computer.bootDrive.writes) / 2) / 88;\n driveScore -= 2;\n if(driveScore > 7.5){\n driveScore = 7.5;\n }\n score += driveScore;\n double rawCpu = ((1 - settings.multicore) / 3) * computer.cpu.singlecore + ((settings.multicore / 3) * (computer.cpu.multicore));\n double adjustedCpu = 26 + 40* ((settings.cpuIntensity / (settings.cpuIntensity + settings.gpuIntensity))* rawCpu - lowCpuScore()) / (maxCpuScore() - lowCpuScore());\n double rawGpu = computer.gpu.fps + (computer.gpu.threedmark / 100);\n double adjustedGpu = 17 + 40 * ((settings.gpuIntensity / (settings.cpuIntensity + settings.gpuIntensity)) * rawGpu - lowGpuScore()) / (maxGpuScore() - lowGpuScore());\n //Inflate the GPU score slightly\n // adjustedGpu * ((35 - adjustedGpu) / 35);\n score += adjustedGpu;\n score += adjustedCpu;\n\n return score;\n }",
"private int getU(int[] inputs, int[] original) {\n\t\tint u = 0; \n\t\tint u2 = 0;\n\t\tfor(int i = 0 ; i < inputs.length ; i++) {\n\t\t\tu += inputs[i];\n\t\t\tu2 += original[i];\n\t\t}\n\t\treturn u <= u2 ? u : u2;\n\t}",
"public double[] runOptimizer() {\n List<Integer> sents = new ArrayList<Integer>();\n for(int i=0; i<sentNum; i++)\n sents.add(i);\n \n if(needShuffle)\n Collections.shuffle(sents);\n \n double oraMetric, oraScore, predMetric, predScore;\n double[] oraPredScore = new double[4];\n double eta = 1.0; //learning rate, will not be changed if run percep\n double avgEta = 0; //average eta, just for analysis\n double loss = 0;\n double featNorm = 0;\n double featDiffVal;\n double sumMetricScore = 0;\n double sumModelScore = 0;\n String oraFeat = \"\";\n String predFeat = \"\";\n String[] oraPredFeat = new String[2];\n String[] vecOraFeat;\n String[] vecPredFeat;\n String[] featInfo;\n boolean first = true;\n //int processedSent = 0;\n Iterator it;\n Integer diffFeatId;\n double[] avgLambda = new double[initialLambda.length]; //only needed if averaging is required\n for(int i=0; i<initialLambda.length; i++)\n avgLambda[i] = 0.0;\n\n //update weights\n for(Integer s : sents) {\n //find out oracle and prediction\n if(first)\n findOraPred(s, oraPredScore, oraPredFeat, initialLambda, featScale);\n else\n findOraPred(s, oraPredScore, oraPredFeat, finalLambda, featScale);\n \n //the model scores here are already scaled in findOraPred\n oraMetric = oraPredScore[0];\n oraScore = oraPredScore[1];\n predMetric = oraPredScore[2];\n predScore = oraPredScore[3];\n oraFeat = oraPredFeat[0];\n predFeat = oraPredFeat[1];\n \n //update the scale\n if(needScale) { //otherwise featscale remains 1.0\n sumMetricScore += java.lang.Math.abs(oraMetric+predMetric);\n sumModelScore += java.lang.Math.abs(oraScore+predScore)/featScale; //restore the original model score\n \n if(sumModelScore/sumMetricScore > scoreRatio)\n featScale = sumMetricScore/sumModelScore;\n\n /* a different scaling strategy \n if( (1.0*processedSent/sentNum) < sentForScale ) { //still need to scale\n double newFeatScale = java.lang.Math.abs(scoreRatio*sumMetricDiff / sumModelDiff); //to make sure modelScore*featScale/metricScore = scoreRatio\n \n //update the scale only when difference is significant\n if( java.lang.Math.abs(newFeatScale-featScale)/featScale > 0.2 )\n featScale = newFeatScale;\n }*/\n }\n// processedSent++;\n\n HashMap<Integer, Double> allOraFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> allPredFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> featDiff = new HashMap<Integer, Double>();\n\n vecOraFeat = oraFeat.split(\"\\\\s+\");\n vecPredFeat = predFeat.split(\"\\\\s+\");\n \n for (int i = 0; i < vecOraFeat.length; i++) {\n featInfo = vecOraFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allOraFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n featDiff.put(diffFeatId, Double.parseDouble(featInfo[1]));\n }\n\n for (int i = 0; i < vecPredFeat.length; i++) {\n featInfo = vecPredFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allPredFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n\n if (featDiff.containsKey(diffFeatId)) //overlapping features\n featDiff.put(diffFeatId, featDiff.get(diffFeatId)-Double.parseDouble(featInfo[1]));\n else //features only firing in the 2nd feature vector\n featDiff.put(diffFeatId, -1.0*Double.parseDouble(featInfo[1]));\n }\n\n if(!runPercep) { //otherwise eta=1.0\n featNorm = 0;\n\n Collection<Double> allDiff = featDiff.values();\n for(it =allDiff.iterator(); it.hasNext();) {\n featDiffVal = (Double) it.next();\n featNorm += featDiffVal*featDiffVal;\n }\n \n //a few sanity checks\n if(! evalMetric.getToBeMinimized()) {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score+ora_metric > pred_score+pred_metric\n * pred_score-pred_metric > ora_score-ora_metric\n * => ora_metric > pred_metric */\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be greater than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for max-metric oracle selection or min-metric prediction selection, the oracle metric \" +\n \t\t\"score must be greater than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n } else {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score-ora_metric > pred_score-pred_metric\n * pred_score+pred_metric > ora_score+ora_metric\n * => ora_metric < pred_metric */\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be smaller than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for min-metric oracle selection or max-metric prediction selection, the oracle metric \" +\n \"score must be smaller than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n }\n \n if(predSelectMode==2) {\n if(predScore+1e-10 < oraScore) {\n System.err.println(\"WARNING: for max-model prediction selection, the prediction model score must be greater than oracle model score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n //cost - margin\n //remember the model scores here are already scaled\n loss = evalMetric.getToBeMinimized() ? //cost should always be non-negative \n (predMetric-oraMetric) - (oraScore-predScore)/featScale: \n (oraMetric-predMetric) - (oraScore-predScore)/featScale;\n \n if(loss<0)\n loss = 0;\n\n if(loss == 0)\n eta = 0;\n else\n //eta = C < loss/(featNorm*featScale*featScale) ? C : loss/(featNorm*featScale*featScale); //feat vector not scaled before\n eta = C < loss/(featNorm) ? C : loss/(featNorm); //feat vector not scaled before\n }\n \n avgEta += eta;\n\n Set<Integer> diffFeatSet = featDiff.keySet();\n it = diffFeatSet.iterator();\n\n if(first) {\n first = false;\n \n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = initialLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n else {\n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = finalLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n \n if(needAvg) {\n for(int i=0; i<avgLambda.length; i++)\n avgLambda[i] += finalLambda[i];\n }\n }\n \n if(needAvg) {\n for(int i=0; i<finalLambda.length; i++)\n finalLambda[i] = avgLambda[i]/sentNum;\n }\n \n avgEta /= sentNum;\n System.out.println(\"Average learning rate: \"+avgEta);\n\n // the intitialLambda & finalLambda are all trainable parameters\n //if (!trainMode.equals(\"3\")) // for mode 3, no need to normalize sparse\n // feature weights\n //normalizeLambda(finalLambda);\n //else\n //normalizeLambda_mode3(finalLambda);\n\n /*\n * for( int i=0; i<finalLambda.length; i++ ) System.out.print(finalLambda[i]+\" \");\n * System.out.println(); System.exit(0);\n */ \n\n double initMetricScore = computeCorpusMetricScore(initialLambda); // compute the initial corpus-level metric score\n double finalMetricScore = computeCorpusMetricScore(finalLambda); // compute final corpus-level metric score // the\n\n // prepare the printing info\n int numParamToPrint = 0;\n String result = \"\";\n\n if (trainMode.equals(\"1\") || trainMode.equals(\"4\")) {\n numParamToPrint = paramDim > 10 ? 10 : paramDim; // how many parameters\n // to print\n result = paramDim > 10 ? \"Final lambda(first 10): {\" : \"Final lambda: {\";\n\n for (int i = 1; i < numParamToPrint; i++)\n // in ZMERT finalLambda[0] is not used\n result += finalLambda[i] + \" \";\n } else {\n int sparseNumToPrint = 0;\n if (trainMode.equals(\"2\")) {\n result = \"Final lambda(regular feats + first 5 sparse feats): {\";\n for (int i = 1; i <= regParamDim; ++i)\n result += finalLambda[i] + \" \";\n\n result += \"||| \";\n\n sparseNumToPrint = 5 < (paramDim - regParamDim) ? 5 : (paramDim - regParamDim);\n\n for (int i = 1; i <= sparseNumToPrint; i++)\n result += finalLambda[regParamDim + i] + \" \";\n } else {\n result = \"Final lambda(first 10 sparse feats): {\";\n sparseNumToPrint = 10 < paramDim ? 10 : paramDim;\n\n for (int i = 1; i < sparseNumToPrint; i++)\n result += finalLambda[i] + \" \";\n }\n }\n\n output.add(result + finalLambda[numParamToPrint] + \"}\\n\" + \"Initial \"\n + evalMetric.get_metricName() + \": \" + initMetricScore + \"\\nFinal \"\n + evalMetric.get_metricName() + \": \" + finalMetricScore);\n\n // System.out.println(output);\n\n if (trainMode.equals(\"3\")) {\n // finalLambda = baseline(unchanged)+disc\n for (int i = 0; i < paramDim; i++)\n copyLambda[i + regParamDim + 1] = finalLambda[i];\n\n finalLambda = copyLambda;\n }\n\n return finalLambda;\n }",
"@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }",
"public void updateHopsForIBU(double ibu) {\n\t\tRecipeIngredient ri = getBitteringHops();\n\t\tHops h = (Hops) ri.getIngredient();\n\t\tdouble ob = (0.01335 * getIBU() * m_batchSize) / 0.30; // ob ~ Old Bitterness\n\t\tdouble nb = (0.01335 * ibu * m_batchSize) / 0.30; // nb ~ New Bitterness\n\t\t\n\t\t//TODO explain crazy algebra\n\t\tdouble newAmt = (nb - (ob - (ri.getAmount() * (h.getAlphaAcid() * (h.getBoilTime()/60) )))) / (h.getAlphaAcid() * (h.getBoilTime()/60));\n\t\t//TODO loop through hops or update slider underneath user. Could use bool return value for updating sliders.\n\t\tif (newAmt < 0) {newAmt = 0;} //No negative amounts.\n\t\tri.setAmount(newAmt);\n\t}",
"public double GetCurOffensiveBV( boolean UseRear, boolean UseTC, boolean UseAES, boolean UseRobotic ) {\n return GetOffensiveBV();\n }",
"private static void drukaf()\n\t{\n\t\tint a;\n\t\tint oplossing;\n\t\tfor(a=1; a<10; a++)\n\t\t{\n\t\t\tint b;\n\t\t\tfor(b=1; b<10; b++)\n\t\t\t{\n\t\t\t\toplossing = a*b;\n\t\t\t\tSystem.out.println(a + \" x \" + b + \" = \" + oplossing);\n\t\t\t}\t\n\t\t}\n\t}",
"abstract void uminus();",
"protected abstract void a(bru parambru);",
"private double bound(int iter, Solution next) {\n return Math.exp((-1.0 * (next.getValue() - bestSol.getValue())) / denominator(iter));\n }",
"@Override\r\n\t\t\tpublic void populationUpdate(PopulationData<? extends Solution> data) {\n//\t\t\t\tbuffer.append(data.getPopulationSize());\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tdouble fit = data.getBestCandidateFitness();\r\n//\t\t\t\tSystem.out.println(fit);\r\n\t\t\t\tbuffer.delete(0, buffer.length());\r\n\t\t\t\tbuffer.append(fit);\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tif (Run10FastExternalizer.initialFitness.getDbl() == -1.0) {\r\n\t\t\t\t\tRun10FastExternalizer.initialFitness.setDbl(fit);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (fit == 0.0){\r\n\t\t\t\t\tArrayList<Student> studentsCopy = new ArrayList<>();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: students){\r\n\t\t\t\t\t\tstudentsCopy.add(student.clone());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: studentsCopy){\r\n\t\t\t\t\t\tstudent.register(data.getBestCandidate().getBlocks());\r\n//\t\t\t\t\t\tSystem.out.println(student.getSchedule());\r\n//\t\t\t\t\t\tbuffer.append(student.getSchedule().toString());\r\n//\t\t\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\t\tsb.append(student.getSchedule().toString());\r\n\t\t\t\t\t\tsb.append(\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tsuperValue = sb.toString();\r\n\t\t\t\t}\r\n\t\t\t}",
"@LargeTest\n public void testVignetteApproximateRelaxed() {\n TestAction ta = new TestAction(TestName.VIGNETTE_APPROXIMATE_RELAXED);\n runTest(ta, TestName.VIGNETTE_APPROXIMATE_RELAXED.name());\n }",
"public abstract double evaluateFitness();",
"@Test\n public void badChoicePunisher() {\n Edge[] edgelist = {new Edge(new int[] {1, 7}), new Edge(new int[] {1, 8}),\n new Edge(new int[] {7, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist, 8, 2);\n\n\n Edge[] edgelist1 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist1, 7, 1);\n\n Edge[] edgelist2 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5}), new Edge(new int[] {2, 8})};\n timeMethod(edgelist2, 8, 2);\n\n Edge[] edgelist3 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist3, 7, 1);\n }",
"@Test\n public void BackstagePass_HandleSpecialCase() {\n GildedRose sut = new GildedRose(createItemArray(BACKSTAGE_PASS, 5, 40));\n sut.updateQuality();\n assertEquals(42, sut.items[0].quality);\n }",
"public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"public void testPAUMChunkLearnng() throws IOException, GateException {\n // Initialisation\n System.out.print(\"Testing the PAUM method on chunk learning...\");\n File chunklearningHome = new File(new File(learningHome, \"test\"),\n \"chunklearning\");\n String configFileURL = new File(chunklearningHome,\n \"engines-paum.xml\").getAbsolutePath();\n String corpusDirName = new File(chunklearningHome, \"data-ontonews\")\n .getAbsolutePath();\n //Remove the label list file, feature list file and chunk length files.\n String wdResults = new File(chunklearningHome,\n ConstantParameters.SUBDIRFORRESULTS).getAbsolutePath();\n emptySavedFiles(wdResults);\n String inputASN = \"Key\";\n loadSettings(configFileURL, corpusDirName, inputASN, inputASN);\n // Set the evaluation mode\n RunMode runM=RunMode.EVALUATION;\n learningApi.setLearningMode(runM);\n controller.execute();\n // Using the evaluation mode for testing\n EvaluationBasedOnDocs evaluation = learningApi.getEvaluation();\n // Compare the overall results with the correct numbers\n /*assertEquals(evaluation.macroMeasuresOfResults.correct, 3);\n assertEquals(evaluation.macroMeasuresOfResults.partialCor, 1);\n assertEquals(evaluation.macroMeasuresOfResults.spurious, 19);\n assertEquals(evaluation.macroMeasuresOfResults.missing, 68);*/\n assertEquals(\"Wrong value for correct: \", 52, (int)Math.floor(evaluation.macroMeasuresOfResults.correct));\n assertEquals(\"Wrong value for partial: \", 12, (int)Math.floor(evaluation.macroMeasuresOfResults.partialCor));\n assertEquals(\"Wrong value for spurious: \", 24, (int)Math.floor(evaluation.macroMeasuresOfResults.spurious));\n assertEquals(\"Wrong value for missing: \", 30, (int)Math.floor(evaluation.macroMeasuresOfResults.missing));\n // Remove the resources\n clearOneTest();\n System.out.println(\"completed\");\n }",
"private float testMethod() {\n {\n int lI0 = (-1456058746 << mI);\n mD = ((double)(int)(double) mD);\n for (int i0 = 56 - 1; i0 >= 0; i0--) {\n mArray[i0] &= (Boolean.logicalOr(((true ? ((boolean) new Boolean((mZ))) : mZ) || mArray[i0]), (mZ)));\n mF *= (mF * mF);\n if ((mZ ^ true)) {\n mF *= ((float)(int)(float) 267827331.0f);\n mZ ^= ((false & ((boolean) new Boolean(false))) | mZ);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n mZ &= ((mArray[279]) | ((boolean) new Boolean(true)));\n mD -= (--mD);\n for (int i2 = 56 - 1; i2 >= 0; i2--) {\n mF /= (mF - mF);\n mI = (Math.min(((int) new Integer(mI)), (766538816 * (++mI))));\n mF += (mZ ? (mB.a()) : ((! mZ) ? -752042357.0f : (++mF)));\n mJ |= ((long) new Long((-2084191070L + (mJ | mJ))));\n lI0 |= ((int) new Integer(((int) new Integer(mI))));\n if (((boolean) new Boolean(false))) {\n mZ &= (mZ);\n mF *= (mF--);\n mD = (Double.POSITIVE_INFINITY);\n mF += ((float)(int)(float) (-2026938813.0f * 638401585.0f));\n mJ = (--mJ);\n for (int i3 = 56 - 1; i3 >= 0; i3--) {\n mI &= (- mI);\n mD = (--mD);\n mArray[426] = (mZ || false);\n mF -= (((this instanceof Main) ? mF : mF) + 976981405.0f);\n mZ &= ((mZ) & (this instanceof Main));\n }\n mZ ^= (Float.isFinite(-1975953895.0f));\n } else {\n mJ /= ((long) (Math.nextDown(-1519600008.0f)));\n mJ <<= (Math.round(1237681786.0));\n }\n }\n mArray[i0] &= (false || ((1256071300.0f != -353296391.0f) ? false : (mZ ^ mArray[i0])));\n mF *= (+ ((float) mD));\n for (int i2 = 0; i2 < 576; i2++) {\n mD *= ((double) lI0);\n lI0 = (lI0 & (Integer.MIN_VALUE));\n mF -= (--mF);\n }\n if ((this instanceof Main)) {\n mZ ^= ((boolean) new Boolean(true));\n } else {\n {\n int lI1 = (mZ ? (--lI0) : 1099574344);\n mJ >>= (Math.incrementExact(mJ));\n mJ = (~ -2103354070L);\n }\n }\n }\n } else {\n mJ *= (- ((long) new Long(479832084L)));\n mJ %= (Long.MAX_VALUE);\n mD /= (--mD);\n if ((mI > ((mBX.x()) << mI))) {\n {\n long lJ0 = (mJ--);\n mI >>>= (mBX.x());\n }\n mF = (+ 505094603.0f);\n mD *= (((boolean) new Boolean((! false))) ? mD : 1808773781.0);\n mI *= (Integer.MIN_VALUE);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n if (((boolean) new Boolean(false))) {\n mD += ((double)(float)(double) -1051436901.0);\n } else {\n mF -= ((float)(int)(float) (Float.min(mF, (mF--))));\n }\n for (int i2 = 0; i2 < 576; i2++) {\n mJ -= ((long) new Long(-1968644857L));\n mJ ^= (+ (mC.s()));\n }\n }\n } else {\n mF -= ((- mF) + -2145489966.0f);\n }\n mD -= (mD++);\n mD = (949112777.0 * 1209996119.0);\n }\n mZ &= (Boolean.logicalAnd(true, ((mZ) & (((boolean) new Boolean(true)) && true))));\n }\n }\n return ((float) 964977619L);\n }",
"public static final double internalRateOfReturn (\n double irrEstimate,\n double [ ] cashFlows )\n //////////////////////////////////////////////////////////////////////\n {\n double irr = irrEstimate;\n\n double delta = -irr * 0.1;\n\n double oldNpv = 0.0;\n\n while ( true )\n {\n double npv = netPresentValue ( irr, cashFlows );\n\n if ( npv == 0.0 )\n {\n return irr;\n }\n\n if ( oldNpv < 0.0 )\n {\n if ( npv > 0.0 )\n {\n delta *= -0.9;\n }\n else if ( npv > oldNpv )\n {\n delta *= 1.1;\n }\n else if ( npv < oldNpv )\n {\n delta = -delta;\n }\n else\n {\n delta = 0.0;\n }\n }\n else if ( oldNpv > 0.0 )\n {\n if ( npv < 0.0 )\n {\n delta *= -0.9;\n }\n else if ( npv < oldNpv )\n {\n delta *= 1.1;\n }\n else if ( npv > oldNpv )\n {\n delta = -delta;\n }\n else\n {\n delta = 0.0;\n }\n }\n\n/*\nSystem.out.println ( \"irr = \" + irr + \", oldNpv = \" + oldNpv + \", npv = \" + npv + \", delta = \" + delta );\n\ntry{\nnew BufferedReader ( new InputStreamReader ( System.in ) ).readLine ( );\n}catch (Exception x ) { }\n*/\n\n if ( delta == 0.0 )\n {\n return irr;\n }\n\n irr += delta;\n\n oldNpv = npv;\n }\n }",
"@Override\r\n\tpublic int computeNextVal(boolean prediction, Instance inst) {\n\t\treturn 0;\r\n\t}",
"private void processLowValue(Bid bid) {\n\t}",
"@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }",
"public void setBiasUncertaintyInNs(double r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.setBiasUncertaintyInNs(double):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.setBiasUncertaintyInNs(double):void\");\n }",
"protected void o()\r\n/* 156: */ {\r\n/* 157:179 */ int i = 15 - aib.b(this);\r\n/* 158:180 */ float f = 0.98F + i * 0.001F;\r\n/* 159: */ \r\n/* 160:182 */ this.xVelocity *= f;\r\n/* 161:183 */ this.yVelocity *= 0.0D;\r\n/* 162:184 */ this.zVelocity *= f;\r\n/* 163: */ }",
"@Override\n public DRFLPSolution algorithm(DRFLPInstance instance) {\n try {\n List<Future<DRFLPSolution>> futures = new ArrayList<>();\n RandomManager.reinitialize(RandomType.LEGACY, 0, this.n);\n for (int i = 0; i < n; i++) {\n int _i = i;\n futures.add(executor.submit(() -> {\n RandomManager.reset(_i);\n return alg.algorithm(instance);\n }));\n }\n var results = ConcurrencyUtil.awaitAll(futures);\n DRFLPSolution best = null;\n for(var solution: results){\n if(solution.isBetterThan(best)){\n best = solution;\n }\n }\n return best;\n } finally {\n executor.shutdown();\n }\n }",
"@SubL(source = \"cycl/inference/harness/inference-balanced-tactician-motivation.lisp\", position = 24008) \n public static final SubLObject balanced_strategy_problem_is_the_rest_of_an_early_removalP(SubLObject problem, SubLObject strategy) {\n {\n SubLObject set_contents_var = inference_datastructures_problem.problem_dependent_links(problem);\n SubLObject basis_object = set_contents.do_set_contents_basis_object(set_contents_var);\n SubLObject state = NIL;\n for (state = set_contents.do_set_contents_initial_state(basis_object, set_contents_var); (NIL == set_contents.do_set_contents_doneP(basis_object, state)); state = set_contents.do_set_contents_update_state(state)) {\n {\n SubLObject restriction_link = set_contents.do_set_contents_next(basis_object, state);\n if ((NIL != set_contents.do_set_contents_element_validP(state, restriction_link))) {\n if ((NIL != inference_datastructures_problem_link.problem_link_has_typeP(restriction_link, $kw9$RESTRICTION))) {\n {\n SubLObject non_focal_problem = inference_datastructures_problem_link.problem_link_supported_problem(restriction_link);\n SubLObject set_contents_var_16 = inference_datastructures_problem.problem_dependent_links(non_focal_problem);\n SubLObject basis_object_17 = set_contents.do_set_contents_basis_object(set_contents_var_16);\n SubLObject state_18 = NIL;\n for (state_18 = set_contents.do_set_contents_initial_state(basis_object_17, set_contents_var_16); (NIL == set_contents.do_set_contents_doneP(basis_object_17, state_18)); state_18 = set_contents.do_set_contents_update_state(state_18)) {\n {\n SubLObject join_ordered_link = set_contents.do_set_contents_next(basis_object_17, state_18);\n if ((NIL != set_contents.do_set_contents_element_validP(state_18, join_ordered_link))) {\n if ((NIL != inference_datastructures_problem_link.problem_link_has_typeP(join_ordered_link, $kw12$JOIN_ORDERED))) {\n if ((NIL != inference_worker_join_ordered.join_ordered_link_restricted_non_focal_linkP(join_ordered_link, restriction_link))) {\n if ((non_focal_problem == inference_worker_join_ordered.join_ordered_link_non_focal_problem(join_ordered_link))) {\n if ((NIL != balanced_strategy_chooses_to_propagate_new_root_motivation_to_restricted_non_focal_problemP(strategy, problem, join_ordered_link))) {\n return T;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n return NIL;\n }",
"private void optimiseEVProfile()\n\t{\n\t}",
"static double reliability(vmnode vm, jobnode[] jobs, int[] assigned, int ind) {\n double pow, bw, mem;\n pow = bw = mem = 0;\n\n for (int i = 0; i < jobs.length; i++) {\n if (assigned[i] == ind) {\n pow = pow + 1.0 * jobs[i].pow;\n bw = bw + 1.0 * jobs[i].bw;\n }\n }\n pow = 0.5 * (vm.powavail * 1.0 / pow);\n bw = 0.3 * (vm.bwavail * 1.0 / bw);\n mem = 0.2 * (vm.memavail + vm.memused) / vm.memused;\n if (vm.memused == 0.0) {\n return 1000000.0;\n }\n return (pow + bw + mem);\n }",
"@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}",
"public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }",
"private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }",
"private void processSuperHighValue(Bid bid) {\n\t}",
"protected double suggestionResidual(double[] params, double weight) {\n double residual = 0.0;\n \n if (mSuggestSkewnessValueEnabled) {\n residual += Math.pow(params[0] - mSuggestedSkewnessValue, 2.0);\n }\n \n if (mSuggestHorizontalFocalLengthEnabled) {\n residual += Math.pow(\n params[1] - mSuggestedHorizontalFocalLengthValue, 2.0);\n }\n \n if (mSuggestVerticalFocalLengthEnabled) {\n residual += Math.pow(\n params[2] - mSuggestedVerticalFocalLengthValue, 2.0);\n }\n \n if (mSuggestAspectRatioEnabled) {\n double aspectRatio = params[2] / params[1];\n residual += Math.pow(aspectRatio - mSuggestedAspectRatioValue, 2.0);\n }\n \n if (mSuggestPrincipalPointEnabled) {\n if (mResidualPrincipalPoint == null) {\n mResidualPrincipalPoint = new InhomogeneousPoint2D(\n params[3], params[4]);\n } else {\n mResidualPrincipalPoint.setInhomogeneousCoordinates(\n params[3], params[4]);\n }\n \n residual += Math.pow(mResidualPrincipalPoint.distanceTo(\n mSuggestedPrincipalPointValue), 2.0);\n }\n \n if (mSuggestRotationEnabled) {\n if (mResidualRotation == null) {\n mResidualRotation = new Quaternion(params[5], params[6], \n params[7], params[8]);\n } else {\n mResidualRotation.setA(params[5]);\n mResidualRotation.setB(params[6]);\n mResidualRotation.setC(params[7]);\n mResidualRotation.setD(params[8]);\n }\n mResidualRotation.normalize();\n mSuggestedRotationValue.normalize();\n residual += Math.pow(mResidualRotation.getA() - \n mSuggestedRotationValue.getA(), 2.0) + \n Math.pow(mResidualRotation.getB() - \n mSuggestedRotationValue.getB(), 2.0) +\n Math.pow(mResidualRotation.getC() - \n mSuggestedRotationValue.getC(), 2.0) +\n Math.pow(mResidualRotation.getD() - \n mSuggestedRotationValue.getD(), 2.0); \n }\n \n if (mSuggestCenterEnabled) {\n if (mResidualCenter == null) {\n mResidualCenter = new InhomogeneousPoint3D(\n params[9], params[10], params[11]);\n } else {\n mResidualCenter.setInhomogeneousCoordinates(\n params[9], params[10], params[11]);\n }\n residual += Math.pow(\n mResidualCenter.distanceTo(mSuggestedCenterValue), 2.0);\n }\n \n return weight * residual;\n }",
"public void driver() {\r\n \t// At the last time point assume exponentials are largely decayed and most of what is\r\n \t// left is the constant a[0] term.\r\n gues[0] = ySeries[ySeries.length-1];\r\n for (int i = 0; i < (a.length-1)/2; i++) {\r\n \tgues[2*i+1] = 1.0;\r\n \tgues[2*i+2] = -1.0;\r\n }\r\n super.driver();\r\n }",
"public void calculateUtilityValue(Problem prob, int row, int col, Policy pol)\n\t\t{\n\t\t\tdouble maxActionVal = Double.MIN_VALUE;\n\t\t\tint maxAction;\n\t\t\tint chosenAction=0;\n\t\t\tfor(int i=0; i < ACTION_COUNT; i++)\n\t\t\t{\n\t\t\t\tdouble newSampleVal = 0;\n\n\t\t\t\t\n\t\t\t\tif(isOutOfBound(i, row, col))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tfor(int j=0; j < prob.moveProbs.length ; j++ )\n\t\t\t\t{\n\n\t\t\t\t\tint nextStateVal=0;\n\n\t\t\t\t\tif( i == UP || i == DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tnextStateVal = fetchNextStateRowOrColumn(j+1, i, row);\n\t\t\t\t\t\tnewSampleVal += prob.moveProbs[j] * utilities[nextStateVal][col];\n\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnextStateVal = fetchNextStateRowOrColumn(j+1, i, col);\n\t\t\t\t\t\tnewSampleVal += prob.moveProbs[j] * utilities[row][nextStateVal];\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(newSampleVal > maxActionVal)\n\t\t\t\t{\n\t\t\t\t\tmaxActionVal = newSampleVal;\n\t\t\t\t\tchosenAction = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tutilities[row][col] = rewards[row][col] + DISCOUNT_FACTOR * maxActionVal;\n\t\t\tif(prob.map.get(row).get(col).equals(\"G\") || prob.map.get(row).get(col).equals(\"P\"))\n\t\t\t{\n\t\t\t\tpol.bestActions[row][col] = prob.map.get(row).get(col);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpol.bestActions[row][col] = DIRECTION[chosenAction];\n\t\t\t}\n\t\t}",
"@Test(dataProvider = \"chainPrunerData\")\n public void testAdaptivePruning(final int kmerSize, final byte[] ref, final byte[] alt, final double altFraction, final double errorRate, final int depthPerAlignmentStart, final double logOddsThreshold) {\n final RandomGenerator rng = RandomGeneratorFactory.createRandomGenerator(new Random(kmerSize + FastMath.round(10000*(errorRate + altFraction))));\n final ReadThreadingGraph graph = new ReadThreadingGraph(kmerSize);\n graph.addSequence(ref, true);\n final List<byte[]> reads = IntStream.range(0, ref.length)\n .mapToObj(start -> IntStream.range(0, depthPerAlignmentStart).mapToObj(n -> generateReadWithErrors(rng.nextDouble() < altFraction ? alt : ref, start, errorRate, rng)))\n .flatMap(s -> s).collect(Collectors.toList());\n\n reads.forEach(read -> graph.addSequence(read, false));\n\n\n // note: these are the steps in ReadThreadingAssembler::createGraph\n graph.buildGraphIfNecessary();\n\n final ChainPruner<MultiDeBruijnVertex, MultiSampleEdge> pruner = new AdaptiveChainPruner<>(0.001,\n logOddsThreshold, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n final SmithWatermanAligner aligner = SmithWatermanJavaAligner.getInstance();\n graph.recoverDanglingTails(1, 3, false, aligner, DANGLING_END_SW_PARAMETERS);\n graph.recoverDanglingHeads(1, 3, false, aligner, DANGLING_END_SW_PARAMETERS);\n graph.removePathsNotConnectedToRef();\n\n final SeqGraph seqGraph = graph.toSequenceGraph();\n seqGraph.zipLinearChains();\n seqGraph.removeSingletonOrphanVertices();\n seqGraph.removeVerticesNotConnectedToRefRegardlessOfEdgeDirection();\n seqGraph.simplifyGraph();\n seqGraph.removePathsNotConnectedToRef();\n seqGraph.simplifyGraph();\n\n final List<KBestHaplotype<SeqVertex, BaseEdge>> bestPaths = new GraphBasedKBestHaplotypeFinder<>(seqGraph).findBestHaplotypes(10);\n\n final OptionalInt altIndex = IntStream.range(0, bestPaths.size()).filter(n -> bestPaths.get(n).haplotype().basesMatch(alt)).findFirst();\n Assert.assertTrue(altIndex.isPresent());\n\n // ref path should not be pruned even if all reads are alt\n final OptionalInt refIndex = IntStream.range(0, bestPaths.size()).filter(n -> bestPaths.get(n).haplotype().basesMatch(ref)).findFirst();\n Assert.assertTrue(refIndex.isPresent());\n\n // the haplotype score is the sum of the log-10 of all branching fractions, so the alt haplotype score should come out to\n // around the log-10 of the allele fraction up to some fudge factor, assuming we didn't do any dumb pruning\n Assert.assertEquals(bestPaths.get(altIndex.getAsInt()).score(), Math.log10(altFraction), 0.5);\n Assert.assertTrue(bestPaths.size() < 15);\n }",
"@Test\n public static void tinyLBTest() {\n final double[] answers = {0.0, 0.004592032688529923, 0.04725537386564205,\n 0.1396230607626959, 0.2735831034867167, 0.4692424353373485};\n final double kappa = 2.0;\n assertTrue( 0.0 == approximateLowerBoundOnP(0, 0, kappa) );\n final long n = 5;\n for (long k = 0; k <= n; k++) {\n final double lb = approximateLowerBoundOnP(n, k, kappa);\n final double est = estimateUnknownP(n, k);\n assertTrue(lb <= est);\n assertTrue(Math.abs(lb - answers[(int) k]) < 1e-14);\n // System.out.printf (\"LB\\t%d\\t%d\\t%.1f\\t%.16g%n\", n, k, kappa, lb);\n }\n }",
"private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}",
"private void doEpsilon(){\n\t\tcurrentState = \"q0\";\n\t}",
"public abstract void betaReduce();",
"protected Double avoidResultHeuristicValue(AvoidResult r) {\n\t\tdouble adjustedSteps = 100-slowestArrivalStep(r.getPaths());\n\t\t// bonus points if we don't crash\n\t\tint noCrashFactor = 250;\n\t\tint globalCollisionCrashFactor = r.getNextGlobalCollision() == null ? 200 : 0;\n\t\tif(r.getNextCollision() != null) { \n\t\t\tnoCrashFactor = 0;\n\t\t}\n\t\t\n\t\treturn adjustedSteps + noCrashFactor + globalCollisionCrashFactor; \n\t}",
"int[] predict(int paraUserIndex, int paraItemIndex, int paraK) {\n\t\tint[] tempDistribution = new int[5];\n\t\tIndicesOfFriendsRatedItem = new int[5];\n\t\t// Step 1. Find my friends\n\t\tint[] tempFriends = dataModel.uSecRels[paraUserIndex];\n\n\t\t// System.out.println(\"the friends is \" + Arrays.toString(tempFriends));\n\n\t\t// Step 1.1 If the user has not friends, we can't predict the object.\n\t\tif (tempFriends == null || tempFriends.length == 0) {\n\t\t\ttempDistribution = predictForNoneFriendUser(paraUserIndex, paraItemIndex, paraK);\n\t\t\treturn tempDistribution;\n\t\t} // Of if\n\n\t\t// Step 2. Find users to buy the items\n\t\tint[] tempUsers = dataModel.iTrRateInds[paraItemIndex];\n\n\t\t// System.out.println(\"the tempUsers is \" + Arrays.toString(tempUsers));\n\n\t\t// Step 3. Find my friends who rated the item.\n\t\tint[] tempIndicesOfFriendsRatedItem = SetOperator.interSection(tempFriends, tempUsers);\n\n\t\t// if the inter-section is null, we ask my friend one by one.\n\t\t// int a = 0;\n\t\t// while (tempIndicesOfFriendsRatedItem == null && a <\n\t\t// dataModel.uRelations[paraUserIndex].length) {\n\t\t// tempFriends = dataModel.uRelations[dataModel.uRelations[paraUserIndex][a]];\n\t\t// tempIndicesOfFriendsRatedItem = SetOperator.interSection(tempFriends,\n\t\t// tempUsers);\n\t\t//// if(tempIndicesOfFriendsRatedItem != null) {\n\t\t//// noWayCount1++;\n\t\t//// }//Of if\n\t\t// a++;\n\t\t// } // Of while\n\n\t\t// If the intersection is null, we can't predict the object.\n\t\tif (tempIndicesOfFriendsRatedItem == null) {\n\t\t\ttempDistribution = predictForNoneFriendUser(paraUserIndex, paraItemIndex, paraK);\n\t\t\treturn tempDistribution;\n\t\t} // Of if\n\n\t\t// Step 4. Compute the distribution of the predicting item\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < tempIndicesOfFriendsRatedItem.length; i++) {\n\t\t\tfor (int j = 0; j < dataModel.uRelations[paraUserIndex].length; j++) {\n\t\t\t\tif (tempIndicesOfFriendsRatedItem[i] == dataModel.uRelations[paraUserIndex][j]) {\n\t\t\t\t\tint tempIndex = dataModel.iTrRatings[paraItemIndex][tempIndicesOfFriendsRatedItem[i]];\n\t\t\t\t\ttempDistribution[tempIndex - 1]++;\n\t\t\t\t\tIndicesOfFriendsRatedItem[tempIndex - 1]++;\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint tempIndex = dataModel.iTrRatings[paraItemIndex][tempIndicesOfFriendsRatedItem[i]];\n\t\t\ttempDistribution[tempIndex - 1]++;\n\n\t\t} // Of for i\n\n\t\treturn tempDistribution;\n\t}",
"private int roulette()\r\n {\r\n\treturn spinTheWheel();\r\n }",
"boolean ayG() {\n /*\n r18 = this;\n monitor-enter(r18);\n r0 = r18;\n r2 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x000e;\n L_0x000b:\n r2 = 0;\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n L_0x000d:\n return r2;\n L_0x000e:\n r7 = new java.util.ArrayList;\t Catch:{ all -> 0x00b9 }\n r7.<init>();\t Catch:{ all -> 0x00b9 }\n r3 = 0;\n r8 = java.lang.System.nanoTime();\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r4 = r0.dvd;\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r2 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r6 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r6 = r6.size();\t Catch:{ all -> 0x00b9 }\n r10 = r2.listIterator(r6);\t Catch:{ all -> 0x00b9 }\n L_0x002c:\n r2 = r10.hasPrevious();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x006d;\n L_0x0032:\n r2 = r10.previous();\t Catch:{ all -> 0x00b9 }\n r2 = (com.fossil.duy) r2;\t Catch:{ all -> 0x00b9 }\n r12 = r2.ayy();\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r14 = r0.dvd;\t Catch:{ all -> 0x00b9 }\n r12 = r12 + r14;\n r12 = r12 - r8;\n r14 = 0;\n r6 = (r12 > r14 ? 1 : (r12 == r14 ? 0 : -1));\n if (r6 <= 0) goto L_0x004e;\n L_0x0048:\n r6 = r2.isAlive();\t Catch:{ all -> 0x00b9 }\n if (r6 != 0) goto L_0x005f;\n L_0x004e:\n r10.remove();\t Catch:{ all -> 0x00b9 }\n r7.add(r2);\t Catch:{ all -> 0x00b9 }\n r16 = r4;\n r4 = r3;\n r2 = r16;\n L_0x0059:\n r16 = r2;\n r3 = r4;\n r4 = r16;\n goto L_0x002c;\n L_0x005f:\n r2 = r2.isIdle();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x00dc;\n L_0x0065:\n r6 = r3 + 1;\n r2 = java.lang.Math.min(r4, r12);\t Catch:{ all -> 0x00b9 }\n r4 = r6;\n goto L_0x0059;\n L_0x006d:\n r0 = r18;\n r2 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r0 = r18;\n r6 = r0.dve;\t Catch:{ all -> 0x00b9 }\n r6 = r6.size();\t Catch:{ all -> 0x00b9 }\n r6 = r2.listIterator(r6);\t Catch:{ all -> 0x00b9 }\n L_0x007d:\n r2 = r6.hasPrevious();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x009f;\n L_0x0083:\n r0 = r18;\n r2 = r0.dvc;\t Catch:{ all -> 0x00b9 }\n if (r3 <= r2) goto L_0x009f;\n L_0x0089:\n r2 = r6.previous();\t Catch:{ all -> 0x00b9 }\n r2 = (com.fossil.duy) r2;\t Catch:{ all -> 0x00b9 }\n r8 = r2.isIdle();\t Catch:{ all -> 0x00b9 }\n if (r8 == 0) goto L_0x00da;\n L_0x0095:\n r7.add(r2);\t Catch:{ all -> 0x00b9 }\n r6.remove();\t Catch:{ all -> 0x00b9 }\n r2 = r3 + -1;\n L_0x009d:\n r3 = r2;\n goto L_0x007d;\n L_0x009f:\n r2 = r7.isEmpty();\t Catch:{ all -> 0x00b9 }\n if (r2 == 0) goto L_0x00bd;\n L_0x00a5:\n r2 = 1000000; // 0xf4240 float:1.401298E-39 double:4.940656E-318;\n r2 = r4 / r2;\n r8 = 1000000; // 0xf4240 float:1.401298E-39 double:4.940656E-318;\n r8 = r8 * r2;\n r4 = r4 - r8;\n r4 = (int) r4;\t Catch:{ InterruptedException -> 0x00bc }\n r0 = r18;\n r0.wait(r2, r4);\t Catch:{ InterruptedException -> 0x00bc }\n r2 = 1;\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n goto L_0x000d;\n L_0x00b9:\n r2 = move-exception;\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n throw r2;\n L_0x00bc:\n r2 = move-exception;\n L_0x00bd:\n monitor-exit(r18);\t Catch:{ all -> 0x00b9 }\n r2 = 0;\n r4 = r7.size();\n r3 = r2;\n L_0x00c4:\n if (r3 >= r4) goto L_0x00d7;\n L_0x00c6:\n r2 = r7.get(r3);\n r2 = (com.fossil.duy) r2;\n r2 = r2.getSocket();\n com.fossil.dvw.m9969a(r2);\n r2 = r3 + 1;\n r3 = r2;\n goto L_0x00c4;\n L_0x00d7:\n r2 = 1;\n goto L_0x000d;\n L_0x00da:\n r2 = r3;\n goto L_0x009d;\n L_0x00dc:\n r16 = r4;\n r4 = r3;\n r2 = r16;\n goto L_0x0059;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.fossil.duz.ayG():boolean\");\n }",
"public boolean LocalImprovementCAN (TableVar Variables, TableDat Examples) {\r\n\r\n Individual solucion = new IndCAN(Variables.getNVars());\r\n QualityMeasures res, new_res;\r\n int best, initialvalue, cambio;\r\n int[] indices = new int[Variables.getNVars()];\r\n float[] evalua = new float[Variables.getNVars()];\r\n boolean improvement = true;\r\n boolean retValue = false;\r\n int control;\r\n \r\n // Store the pos of the best guy\r\n best = poblac.getBestGuy();\r\n \r\n // Copy the rule to improve\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n solucion.setCromElem(i, this.poblac.getCromElem(best,i));\r\n\r\n // Evaluate de rule and get the measures\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++;\r\n res = solucion.getMedidas();\r\n control = 0;\r\n\r\n while (improvement) {\r\n improvement = false; // By now, there is no improvement\r\n for (int i=0; i<Variables.getNVars(); i++) {\r\n indices[i]=i;\r\n if (Variables.getType(i)=='e') {\r\n // Discrete Variable\r\n if (solucion.getCromElem(i)==(Variables.getMax(i)+1)){\r\n // If variable does not actually takes part in the rule\r\n evalua[i] = -1;\r\n } else {\r\n initialvalue = solucion.getCromElem(i);\r\n solucion.setCromElem(i, (int)Variables.getMax(i)+1);\t// Mark Doesn't take part\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; \r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n } else {\r\n evalua[i]=-1;\r\n }\r\n // Restore initial values\r\n solucion.setCromElem(i, initialvalue);\r\n }\r\n } else {\r\n // Continuous variable\r\n if (solucion.getCromElem(i)==(Variables.getNLabelVar(i))){\r\n // If variable does not take part\r\n evalua[i] = -1;\r\n } else {\r\n initialvalue = solucion.getCromElem(i);\r\n solucion.setCromElem(i, (int)Variables.getNLabelVar(i));\t// Mark does not take part\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; \r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n } else {\r\n evalua[i]=-1;\r\n }\r\n // Restore initial values\r\n solucion.setCromElem(i, initialvalue);\r\n }\r\n }\r\n }\r\n \r\n if (improvement) {\r\n // Sorts in ascendent order to minimise\r\n // \"evalua\" contents the support of each modification; seeking for the better\r\n Utils.OrCrecIndex (evalua,0,Variables.getNVars()-1,indices);\r\n cambio = indices[Variables.getNVars()-1];\r\n if (Variables.getType(cambio)=='e')\r\n solucion.setCromElem(cambio, (int)Variables.getMax(cambio)+1);\r\n else\r\n solucion.setCromElem(cambio, (int)Variables.getNLabelVar(cambio));\r\n res.setSup(evalua[Variables.getNVars()-1]);\r\n \r\n // If there is improvement, set return value to true\r\n retValue = true;\r\n \r\n }\r\n } // End while\r\n\r\n for(int i=0; i<Variables.getNVars(); i++){\r\n if(solucion.getCromElem(i)==Variables.getNLabelVar(i))\r\n control++;\r\n }\r\n\r\n // Store the new rule if it was improved\r\n if ((retValue==true)&&(control!=Variables.getNVars())){\r\n\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n poblac.setCromElem(best, i, solucion.getCromElem(i));\r\n\r\n // Mark the rule as not evaluated\r\n poblac.setIndivEvaluated(best,false);\r\n }\r\n \r\n return retValue;\r\n\r\n }",
"private static void BicingsimulatedAnnealingSearch(int num, int n_est, int nbicis, int nfurgo, int d1, int cas, String Cas, String H, String D, int s) {\n\n\n try {\n\n double MedT = 0;\n //double MedN = 0;\n //double MedB = 0;\n int iteraciones = 100;\n Estado Bicing = new Estado(n_est,nbicis,nfurgo,d1,s,1);\n Bicing.setList_cdesp(iteraciones);\n long StartTime = System.nanoTime();\n Problem problem = new Problem(Bicing, new sucesoresA(), new isGoal(), new Heuristic_Function());\n SimulatedAnnealingSearch search = new SimulatedAnnealingSearch(iteraciones, 1000, 125, 0.00001D);\n SearchAgent agent = new SearchAgent(problem, search);\n List L = search.getPathStates();\n Properties properties = agent.getInstrumentation();\n long EndTime = System.nanoTime();\n Estado E = (Estado) search.getGoalState();\n long time = ((EndTime - StartTime) / 1000000);\n MedT += time;\n //MedB += E.getganancia();\n // MedN += Integer.parseInt(properties.getProperty((String)properties.keySet().iterator().next()));\n // MedB /= num;\n // MedN /= num;\n // MedT /= num;\n //MedB = (Math.round(MedB*100.0)/100.0);\n Writer output;\n output = new BufferedWriter(new FileWriter(\"Estadisticas_\" + Cas + \"_D\" + D + \"_H\" + H + \"S.txt\", true));\n double [] vec = E.getearnings();\n for (int i = 0 ; i < iteraciones; ++i) {\n String S = \"\" + vec[i];\n S = S + '\\n';\n output.append(S);\n }\n output.close();\n\n /*for (int i = 0; i < E.getN_furgo(); ++i) {\n System.out.println(\"Recorrido por furgoneta \" + i + \" \" + E.getIFurgo(i).getLong_t());\n }*/\n //printEstado(E);\n //System.out.println();\n //System.out.println(E.getganancia());\n //printActions(agent.getActions());\n //printInstrumentation(agent.getInstrumentation());\n } catch (Exception var4) {\n var4.printStackTrace();\n }\n\n }",
"public void resetBiasUncertaintyInNs() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.resetBiasUncertaintyInNs():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.resetBiasUncertaintyInNs():void\");\n }",
"private void advanceBeliefs(int b) {\n\t\tdouble sum = 0;\n\t\tdouble[][] newbel = new double[beliefs.length][beliefs[0].length];\n\t\tfor (int x =0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tdouble statesum = 0; // belief in each state is the sum of beliefs in possible previous state times the probability of the transition\n\t\t\t\tfor (int px = 0; px < beliefs.length; px++) {\n\t\t\t\t\tfor (int py = 0; py < beliefs[0].length; py++) {\n\t\t\t\t\t\tstatesum += beliefs[px][py] * world.transitionProbability(x, y, px, py, b);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnewbel[x][y] = statesum;\n\t\t\t\tsum += newbel[x][y];\n\t\t\t}\n\t\t}\n\t\t// now normalise them\n\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tnewbel[x][y] /= sum;\n\t\t\t}\n\t\t}\n\t\tbeliefs = newbel;\n\t}",
"public double getDescent() throws PDFNetException {\n/* 894 */ return GetDescent(this.a);\n/* */ }",
"private void calc_q0(double[] llr) {\n\t\tfor (int i=noffs; i<llr.length; i++)\n\t\t\tq0[i-noffs] = Math.exp(llr[i]) / (1 + Math.exp(llr[i])); // beliefs\t\t\t\n\t}",
"@Test\n public void testInbreedingCoeffForMultiallelicVC() {\n VariantContext test1 = makeVC(\"1\",Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s2\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s3\", T, C, 7099, 2530, 7099, 3056, 0, 14931),\n makeG(\"s4\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s5\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s6\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s7\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s8\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s9\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s10\", Aref, T, 2530, 0, 7099, 366, 3056, 14931));\n\n final AS_InbreedingCoeff testClass1 = new AS_InbreedingCoeff();\n final double ICresult1 = testClass1.calculateIC(test1, T);\n Assert.assertEquals(ICresult1, -0.4285714, DELTA_PRECISION, \"Pass\");\n final double ICresult1b = testClass1.calculateIC(test1, C);\n Assert.assertEquals(ICresult1b, -0.05263, DELTA_PRECISION, \"Pass\");\n\n //make sure that hets with different alternate alleles all get counted\n VariantContext test2 = makeVC(\"2\", Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, C, 4878, 1623, 11297, 0, 7970, 8847),\n makeG(\"s2\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s3\", Aref, T, 3382, 0, 6364, 1817, 5867, 12246),\n makeG(\"s4\", Aref, T, 2488, 0, 9110, 3131, 9374, 12505),\n makeG(\"s5\", Aref, C, 4530, 2006, 18875, 0, 6847, 23949),\n makeG(\"s6\", Aref, T, 5325, 0, 18692, 389, 16014, 24570),\n makeG(\"s7\", Aref, T, 2936, 0, 29743, 499, 21979, 38630),\n makeG(\"s8\", Aref, T, 6902, 0, 8976, 45, 5844, 9061),\n makeG(\"s9\", Aref, T, 5732, 0, 10876, 6394, 11408, 17802),\n makeG(\"s10\", Aref, T, 2780, 0, 25045, 824, 23330, 30939));\n\n final AS_InbreedingCoeff testClass2 = new AS_InbreedingCoeff();\n final double ICresult2 = testClass2.calculateIC(test2, T);\n Assert.assertEquals(ICresult2, -0.666666, DELTA_PRECISION, \"Pass\");\n final double ICresult2b = testClass2.calculateIC(test2, C);\n Assert.assertEquals(ICresult2b, -0.111129, DELTA_PRECISION, \"Pass\");\n }"
] | [
"0.5842457",
"0.55284095",
"0.5347937",
"0.534463",
"0.53140646",
"0.5242372",
"0.5221243",
"0.520257",
"0.51934546",
"0.5125386",
"0.5117165",
"0.50800085",
"0.5070388",
"0.5057851",
"0.5039086",
"0.5031912",
"0.502062",
"0.5014984",
"0.50127894",
"0.49875814",
"0.49743205",
"0.4968248",
"0.49660861",
"0.49644697",
"0.49410966",
"0.4936948",
"0.49367848",
"0.4932334",
"0.49258456",
"0.49225464",
"0.49194372",
"0.491525",
"0.49001202",
"0.48959744",
"0.48835567",
"0.48821867",
"0.4880795",
"0.4873141",
"0.4867979",
"0.48669827",
"0.48632738",
"0.4854046",
"0.4853468",
"0.48393",
"0.48352414",
"0.4831461",
"0.48267326",
"0.4826014",
"0.48201707",
"0.48189646",
"0.4814412",
"0.48116305",
"0.4810469",
"0.4804976",
"0.4803244",
"0.48021692",
"0.47887668",
"0.4788033",
"0.47771108",
"0.47715068",
"0.47711208",
"0.47679096",
"0.47644806",
"0.47633827",
"0.47622937",
"0.47573328",
"0.4756759",
"0.47532758",
"0.47513884",
"0.47495797",
"0.47475564",
"0.4744069",
"0.47417474",
"0.47368023",
"0.4736236",
"0.4734637",
"0.47286326",
"0.47272292",
"0.47261834",
"0.47244218",
"0.47092116",
"0.47074577",
"0.47042716",
"0.47001147",
"0.4696597",
"0.4694888",
"0.46872953",
"0.4685634",
"0.46851262",
"0.46850702",
"0.4681264",
"0.46768373",
"0.4674711",
"0.4673806",
"0.46729463",
"0.4672459",
"0.46721232",
"0.46702096",
"0.46669677",
"0.46668208",
"0.46645406"
] | 0.0 | -1 |
Prepares the strategies to be evaluated with the recommenders already generated. | @SuppressWarnings("unchecked")
public static void prepareStrategy(final int nFolds, final String splitPath, final String recPath, final String outPath) {
for (int i = 0; i < nFolds; i++) {
File trainingFile = new File(splitPath + "train_" + i + ".csv");
File testFile = new File(splitPath + "test_" + i + ".csv");
File recFile = new File(recPath + "recs_" + i + ".csv");
DataModelIF<Long, Long> trainingModel;
DataModelIF<Long, Long> testModel;
DataModelIF<Long, Long> recModel;
try {
trainingModel = new SimpleParser().parseData(trainingFile);
testModel = new SimpleParser().parseData(testFile);
recModel = new SimpleParser().parseData(recFile);
} catch (IOException e) {
e.printStackTrace();
return;
}
Double threshold = REL_TH;
String strategyClassName = "net.recommenders.rival.evaluation.strategy.UserTest";
EvaluationStrategy<Long, Long> strategy = null;
try {
strategy = (EvaluationStrategy<Long, Long>) (Class.forName(strategyClassName)).getConstructor(DataModelIF.class, DataModelIF.class, double.class).
newInstance(trainingModel, testModel, threshold);
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | ClassNotFoundException | InvocationTargetException e) {
e.printStackTrace();
}
DataModelIF<Long, Long> modelToEval = DataModelFactory.getDefaultModel();
for (Long user : recModel.getUsers()) {
assert strategy != null;
for (Long item : strategy.getCandidateItemsToRank(user)) {
if (!Double.isNaN(recModel.getUserItemPreference(user, item))) {
modelToEval.addPreference(user, item, recModel.getUserItemPreference(user, item));
}
}
}
try {
DataModelUtils.saveDataModel(modelToEval, outPath + "strategymodel_" + i + ".csv", true, "\t");
} catch (FileNotFoundException | UnsupportedEncodingException e) {
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initModelEntities(final Collection<String> strategiesElems_) {\n\t\tthis.strategies = new ArrayList<String>();\n\t\tfinal Iterator<String> iteStrategies = strategiesElems_.iterator();\n\t\twhile (iteStrategies.hasNext()) {\n\t\t\tfinal String strategyElement = iteStrategies.next();\n\t\t\tthis.strategies.add(strategyElement);\n\t\t}\n\t}",
"public void prepareForFeaturesAndOrderCollection() throws Exception {\n\n LOG.info(\" - Preparing phrases...\");\n readPhrases(false);\n collectNumberProps(m_srcPhrs, m_trgPhrs, true, true); \n collectTypeProp(m_srcPhrs, m_trgPhrs); \n\n collectContextEqs();\n prepareSeedDictionary(m_contextSrcEqs, m_contextTrgEqs);\n prepareTranslitDictionary(m_contextSrcEqs);\n filterContextEqs();\n\n collectContextAndTimeProps(m_srcPhrs, m_trgPhrs);\n collectOrderProps(m_srcPhrs, m_trgPhrs);\n }",
"public void prepare() {\n this.shifts = new ArrayList<>();\n this.rates = new ArrayList<>();\n // bootstrap shifts and rates\n this.prepareShifts();\n this.prepareRates();\n }",
"public scala.collection.Seq<org.apache.spark.sql.catalyst.planning.GenericStrategy<org.apache.spark.sql.execution.SparkPlan>> extraStrategies () { throw new RuntimeException(); }",
"@Override\n\tpublic void agentSetup() {\n\n\t\t// load the class names of each object\n\t\tString os = dagent.getOfferingStrategy().getClassname();\n\t\tString as = dagent.getAcceptanceStrategy().getClassname();\n\t\tString om = dagent.getOpponentModel().getClassname();\n\t\tString oms = dagent.getOMStrategy().getClassname();\n\n\t\t// createFrom the actual objects using reflexion\n\n\t\tofferingStrategy = BOAagentRepository.getInstance().getOfferingStrategy(os);\n\t\tacceptConditions = BOAagentRepository.getInstance().getAcceptanceStrategy(as);\n\t\topponentModel = BOAagentRepository.getInstance().getOpponentModel(om);\n\t\tomStrategy = BOAagentRepository.getInstance().getOMStrategy(oms);\n\n\t\t// init the components.\n\t\ttry {\n\t\t\topponentModel.init(negotiationSession, dagent.getOpponentModel().getParameters());\n\t\t\topponentModel.setOpponentUtilitySpace(fNegotiation);\n\t\t\tomStrategy.init(negotiationSession, opponentModel, dagent.getOMStrategy().getParameters());\n\t\t\tofferingStrategy.init(negotiationSession, opponentModel, omStrategy,\n\t\t\t\t\tdagent.getOfferingStrategy().getParameters());\n\t\t\tacceptConditions.init(negotiationSession, offeringStrategy, opponentModel,\n\t\t\t\t\tdagent.getAcceptanceStrategy().getParameters());\n\t\t\tacceptConditions.setOpponentUtilitySpace(fNegotiation);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// remove the reference to the information object such that the garbage\n\t\t// collector can remove it.\n\t\tdagent = null;\n\t}",
"private void prepareDeal(){\n\t\tdeck.shuffle();\n\t\tplayers.clear(); //Remove any possible rubbish\n\t\tfor(Player p : seatPlayers){\n\t\t\tif(p != null){\n\t\t\t\tList<BlackjackHand> hands = new ArrayList<>();\n\t\t\t\tBlackjackHand hand = new BlackjackHandPlayer();\n\t\t\t\thands.add(hand);\n\t\t\t\thistoricalActions.put(hand, new ArrayList<>());\n\t\t\t\tplayers.put(p, hands);\n\t\t\t}\n\t\t}\n\t\tdealerHand = new BlackjackHandDealer();\n\t}",
"private void computeStrategy(int player) {\n strategy = new MixedStrategy(nActs[player], 0d);\n double[] stratPayoffs = SolverUtils.computePureStrategyPayoffs(eGame, player, predictedOutcome, false);\n strategy.setBestResponse(stratPayoffs);\n }",
"protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}",
"@Override\n protected abstract Regressor[] getLearnerSetups();",
"@SuppressWarnings(\"unchecked\")\n\tprivate void setRules() {\n\t\tthis.result = Result.START;\n\t\t// Create all initial rule executors, and shuffle them if needed.\n\t\tthis.rules = new LinkedList<>();\n\t\tModule module = getModule();\n\t\tfor (Rule rule : module.getRules()) {\n\t\t\tRuleStackExecutor executor = (RuleStackExecutor) getExecutor(rule, getSubstitution());\n\t\t\texecutor.setContext(module);\n\t\t\tthis.rules.add(executor);\n\t\t}\n\t\tif (getRuleOrder() == RuleEvaluationOrder.RANDOM || getRuleOrder() == RuleEvaluationOrder.RANDOMALL) {\n\t\t\tCollections.shuffle((List<RuleStackExecutor>) this.rules);\n\t\t}\n\t}",
"public void makeFirstRound() {\n Strategy tactics = null;\n ArrayList<Producer> auxProducerList = new ArrayList<>(listOfProducers.getList());\n for (Distributor dst : listOfDistributors.getList()) {\n if (dst.getSubscribedproducers().isEmpty()) {\n int auxNeededPower = dst.getEnergyNeededKW();\n if (dst.getProducerStrategy().equals(\"GREEN\")) {\n tactics = new GreenStrategy();\n } else if (dst.getProducerStrategy().equals(\"PRICE\")) {\n tactics = new PriceStrategy();\n } else if (dst.getProducerStrategy().equals(\"QUANTITY\")) {\n tactics = new QuantityStrategy();\n }\n tactics.sorter(auxProducerList);\n for (Producer p : auxProducerList) {\n if (!(p.getMaxDistributors() == p.getCurrDistributors())) {\n dst.addSubscribedproducer(p);\n p.addDistIDs(dst.getId());\n p.addObserver(dst);\n p.setCurrDistributors(p.getCurrDistributors() + 1);\n auxNeededPower -= p.getEnergyPerDistributor();\n if (auxNeededPower < 0) {\n break;\n }\n }\n }\n }\n }\n\n Distributor bestDist = listOfDistributors.getBestDistinRound();\n\n for (Consumer auxcons : listOfConsumers.getList()) {\n auxcons.setBudget(auxcons.getInitialBudget() + auxcons.getMonthlyIncome());\n auxcons.setIdofDist(bestDist.getId());\n auxcons.setMonthstoPay(bestDist.getContractLength());\n auxcons.setToPay(bestDist.getContractPrice());\n bestDist.addSubscribedconsumer(auxcons);\n if (auxcons.getBudget() >= auxcons.getToPay()) {\n auxcons.addtoBudget(-auxcons.getToPay());\n auxcons.reduceMonths();\n bestDist.addBudget(auxcons.getToPay());\n } else {\n auxcons.setDuepayment(auxcons.getToPay());\n auxcons.reduceMonths();\n }\n if (auxcons.getMonthstoPay() == 0) {\n auxcons.setIdofDist(-1);\n }\n }\n\n for (Distributor d : listOfDistributors.getList()) {\n if (d.isBankrupt()) {\n continue;\n }\n d.reduceBudget();\n if (d.getBudget() < 0) {\n d.setBankrupt(true);\n }\n }\n }",
"@Before\n\t public void setUp() {\n\t\trs = new LinearRateStrategy();\n\n\t }",
"private static HintStrategyTable createHintStrategies() {\n return createHintStrategies(HintStrategyTable.builder());\n }",
"public void initRetrievalPlans() {\n for (RetrievalPlan retrievalPlan : this.getRetrievalPlans().values()) {\n retrievalPlan.init();\n }\n }",
"public void prepare() {\n\t}",
"private void initialize() {\n\n // \n // 1) Driver to run Seed Tracker.\n //\n if (!strategyResource.startsWith(\"/\")) {\n strategyResource = \"/org/hps/recon/tracking/strategies/\" + strategyResource;\n }\n List<SeedStrategy> sFinallist = StrategyXMLUtils.getStrategyListFromInputStream(this.getClass().getResourceAsStream(strategyResource));\n StraightTracker stFinal = new StraightTracker(sFinallist, this._useHPSMaterialManager, this.includeMS);\n// stFinal.setApplySectorBinning(_applySectorBinning);\n stFinal.setUseDefaultXPlane(false);\n stFinal.setDebug(this.debug);\n stFinal.setIterativeConfirmed(_iterativeConfirmed);\n stFinal.setMaterialManagerTransform(CoordinateTransformations.getTransform());\n stFinal.setInputCollectionName(stInputCollectionName);\n stFinal.setTrkCollectionName(trackCollectionName);\n stFinal.setBField(bfield);\n stFinal.setTrackFittingAlgorithm(new StraightTrackAxialFitter());\n if (debug) {\n stFinal.setDiagnostics(new SeedTrackerDiagnostics());\n }\n // stFinal.setSectorParams(false); //this doesn't actually seem to do anything\n stFinal.setSectorParams(1, 10000);\n add(stFinal);\n//\n// if (rmsTimeCut > 0) {\n// stFinal.setTrackCheck(new HitTimeTrackCheck(rmsTimeCut));\n// }\n }",
"private void applyPresets() {\n applyAutoTrigger(AUTO_TRIGGER_PRESET.load(mPresetDict));\n applyPreferredTarget(PREFERRED_TARGET_PRESET.load(mPresetDict));\n applyEndingBehavior(ENDING_BEHAVIOR_PRESET.load(mPresetDict));\n applyAutoStartOnDisconnectDelay(AUTOSTART_ON_DISCONNECT_DELAY_PRESET.load(mPresetDict));\n applyEndingHoveringAltitude(ENDING_HOVERING_ALTITUDE_PRESET.load(mPresetDict));\n applyMinAltitude(MIN_ALTITUDE_PRESET.load(mPresetDict));\n }",
"public void prepare() {\r\n\t\tmyPreviousBet = 0;\r\n\t\tmyCurrentBet = 0;\r\n\t\tstage = 0;\r\n\t\tposition = -1;\r\n\t\tintel.reset();\r\n\t\tfor (int i = 0; i < boards.length; i++)\r\n\t\t\tboards[i] = \"UNKNOWN\";\r\n\t}",
"public interface RecommendationStrategy {\n\tRecommendationResultsHolder getRecommendationResults(Product product, String type);\n\n}",
"public void prepare()\n\t{\n\t\tsuper.prepare();\n\t}",
"@Override\n\tpublic void prepare(TopologyContext context) {\n\t\t\n\t}",
"public void prepareNextPhase() {\n if (evaluatedCells != null) {\n log.info(\"Preparing Next Phase \" + evaluatedCells.size());\n for (Cell cell : evaluatedCells) {\n cell.prepareNextPhase();\n }\n evaluatedCells.clear();\n }\n }",
"protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null)\n\t\t\t\t;\n\t\t\telse if (name.equals(\"SRI_Authorization_ID\"))\n\t\t\t\tp_SRI_Authorization_ID = para[i].getParameterAsInt();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\t\n\t\tm_AD_Client_ID = getAD_Client_ID();\n\t\t\n\t\tif (p_SRI_Authorization_ID == 0)\n\t\t\tp_SRI_Authorization_ID = getRecord_ID();\n\n\t}",
"public List<String> prioritize(List<TestCase> tests, int typeOfTechnique) throws EmptySetOfTestCaseException{\n\t\tTechniqueCreator creator = new TechniqueCreator();\n\t\tTechnique technique = creator.create(typeOfTechnique);\n\t\treturn technique.prioritize(tests);\n\t}",
"private void setNextStrategy() {\n setCurrentStrategy(getCurrentStrategy().next(_feedId,\n _start,\n _first,\n _last));\n }",
"public void prepare() {\n for (IMixinPlatformAgent agent : this.agents) {\n MixinContainer.logger.debug(\"Processing prepare() for {}\", agent);\n agent.prepare();\n }\n }",
"protected void resolveAndPopulateCredentialsAndAlgorithms(@Nonnull final EncryptionParameters params, \n @Nonnull final CriteriaSet criteria, @Nonnull final Predicate<String> whitelistBlacklistPredicate) {\n \n // Pre-resolve these for efficiency\n final List<Credential> keyTransportCredentials = getEffectiveKeyTransportCredentials(criteria);\n final List<String> keyTransportAlgorithms =\n getEffectiveKeyTransportAlgorithms(criteria, whitelistBlacklistPredicate);\n log.trace(\"Resolved effective key transport algorithms: {}\", keyTransportAlgorithms);\n \n final List<Credential> dataEncryptionCredentials = getEffectiveDataEncryptionCredentials(criteria);\n final List<String> dataEncryptionAlgorithms = getEffectiveDataEncryptionAlgorithms(criteria, \n whitelistBlacklistPredicate);\n log.trace(\"Resolved effective data encryption algorithms: {}\", dataEncryptionAlgorithms);\n \n // Select the data encryption algorithm, and credential if exists\n if (dataEncryptionCredentials.isEmpty()) {\n // This is probably the most typical case\n params.setDataEncryptionAlgorithm(resolveDataEncryptionAlgorithm(null, dataEncryptionAlgorithms));\n } else {\n for (final Credential dataEncryptionCredential : dataEncryptionCredentials) {\n final String dataEncryptionAlgorithm = resolveDataEncryptionAlgorithm(dataEncryptionCredential, \n dataEncryptionAlgorithms);\n if (dataEncryptionAlgorithm != null) {\n params.setDataEncryptionCredential(dataEncryptionCredential);\n params.setDataEncryptionAlgorithm(dataEncryptionAlgorithm);\n break;\n } else {\n log.debug(\"Unable to resolve data encryption algorithm for credential with key type '{}', \" \n + \"considering other credentials\", \n CredentialSupport.extractEncryptionKey(dataEncryptionCredential).getAlgorithm());\n }\n }\n }\n \n final KeyTransportAlgorithmPredicate keyTransportPredicate = resolveKeyTransportAlgorithmPredicate(criteria);\n \n // Select key encryption cred and algorithm\n for (final Credential keyTransportCredential : keyTransportCredentials) {\n final String keyTransportAlgorithm = resolveKeyTransportAlgorithm(keyTransportCredential,\n keyTransportAlgorithms, params.getDataEncryptionAlgorithm(), keyTransportPredicate);\n \n if (keyTransportAlgorithm != null) {\n params.setKeyTransportEncryptionCredential(keyTransportCredential);\n params.setKeyTransportEncryptionAlgorithm(keyTransportAlgorithm);\n break;\n } else {\n log.debug(\"Unable to resolve key transport algorithm for credential with key type '{}', \" \n + \"considering other credentials\", \n CredentialSupport.extractEncryptionKey(keyTransportCredential).getAlgorithm());\n }\n }\n \n resolveAndPopulateRSAOAEPParams(params, criteria, whitelistBlacklistPredicate);\n \n // Auto-generate data encryption cred if configured and possible\n processDataEncryptionCredentialAutoGeneration(params);\n }",
"@Override\n public void init(NegotiationInfo info)\n {\n super.init(info);\n\n // initializes User Model and Opponent Model\n userModelInterface = new UserModelInterfaceImpl(this);\n utilitySpace = userModelInterface.estimateUtilitySpace();\n\n // search all outcomes and sort\n sortedOutcomeSpace = new SortedOutcomeSpace(utilitySpace);\n feasibleBids = sortedOutcomeSpace.getAllOutcomes();\n\n // initializes acceptance and offering strategy\n acceptanceStrategy = new DefaultAcceptanceStrategyImpl(this);\n offeringStrategy = new DefaultOfferingStrategyBasedOpponentImpl(this);\n }",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@BeforeAll\n public void prepare() {\n }",
"void prepareForExecution(boolean alwaysPopulateWorkGraph);",
"@Override\n public void prepare(Map conf) {\n this.idToAssignment = new ConcurrentHashMap<>();\n this.idToName = new ConcurrentHashMap<>();\n this.nameToId = new ConcurrentHashMap<>();\n }",
"protected org.apache.spark.sql.catalyst.rules.RuleExecutor<org.apache.spark.sql.execution.SparkPlan> prepareForExecution () { throw new RuntimeException(); }",
"protected void initializeExecutionRandomness() {\r\n\r\n\t}",
"Strategy createStrategy();",
"public static void initBenchmark(ExperimentRunner benchmark) {\n RelationSequence relGen = new PercentFilledRelationGenerationStrategy(1, 1, 20, 20, 1, 0.1);\n benchmark.runExperiment(relGen);\n }",
"private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }",
"private void applyBestRepairPlan(){\n\t\t\n\t\tSet<OWLAxiom> best_repair=null;\n\t\t\t\t\n\t\tdouble min_conf = 10000;\n\t\tdouble conf;\n\t\t\n\t\tmappingVisitor.setDeleteAxiom(false);//used in confidence\n\t\t\n\t\tfor (Set<OWLAxiom> repair : repair_plans){\n\t\t\t\n\t\t\tconf = getConfidence4Plan(repair);\n\t\t\t\n\t\t\tif (min_conf > conf){\n\t\t\t\tmin_conf = conf;\n\t\t\t\tbest_repair = repair;\n\t\t\t}\n\t\t}\n\t\t\n\t\tmappingVisitor.setDeleteAxiom(true);\n\t\t\n\t\tfor (OWLAxiom ax : best_repair){\t\t\t\n\t\t\tax.accept(mappingVisitor);\n\t\t\t//It also deletes axiom from structures\n\t\t\t//TODO add to conflicts\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static interface PredictorSelectionStrategy {\n /**\n * Injects kernel to kernel-MA according to predictor internal data.\n */\n public void injectKernel(final Predictor predictor);\n\n /**\n * Maximum size of kernels\n */\n public int kernelSize();\n\n /**\n * Creates a brand new predictor.\n */\n public PredictorListener buildPredictor();\n }",
"protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\t\n\t\t\tif (name.equals(\"Action\"))\n\t\t\t\tp_Action = para[i].getParameterAsString();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tp_Hospitalization_ID=getRecord_ID();\n\t}",
"private void prepareScanner() {\r\n\t\tbcLocator = new BCLocator();\r\n\t\tbcGenerator = new BCGenerator();\r\n\t}",
"protected void initDefaultStrategies() {\n\t\tRedisSerializer<String> keySerializer = new StringRedisSerializer();\n\t\tRedisSerializer<Object> valueSerializer = new JacksonSerializer();\n\t\tsetSerializer(valueSerializer);\n\t\tsetStringSerializer(keySerializer);\n\t}",
"protected void initReplanners() {\n\n\t\tTravelTime travelTime = this.lookupTravelTime;\n\t\t\n\t\tOnlyTimeDependentTravelDisutilityFactory travelCostFactory = new OnlyTimeDependentTravelDisutilityFactory();\n\t\t\n\t\tLinkReplanningMap linkReplanningMap = this.withinDayControlerListener.getLinkReplanningMap();\n\t\tMobsimDataProvider mobsimDataProvider = this.withinDayControlerListener.getMobsimDataProvider();\n\t\tthis.duringLegIdentifier = new LeaveLinkIdentifierFactory(linkReplanningMap, mobsimDataProvider).createIdentifier();\n\t\tthis.selector.addIdentifier(duringLegIdentifier, pDuringLegReplanning);\n\t\tthis.duringLegReplannerFactory = new CostNavigationRouteFactory(this.scenario, this.lookupNetwork, this.withinDayControlerListener.getWithinDayEngine(), \n\t\t\t\tcostNavigationTravelTimeLogger, travelCostFactory, travelTime, this.withinDayControlerListener.getLeastCostPathCalculatorFactory());\n\t\tthis.duringLegReplannerFactory.addIdentifier(this.duringLegIdentifier);\n\t\tthis.withinDayControlerListener.getWithinDayEngine().addDuringLegReplannerFactory(this.duringLegReplannerFactory);\n\t}",
"@Override\r\n\tpublic void prepare(Map stormConf, String schedulerLocalDir) {\n\r\n\t}",
"public void prepareForEnumeration() {\n if (isPreparer()) {\n for (NodeT node : nodeTable.values()) {\n // Prepare each node for traversal\n node.initialize();\n if (!this.isRootNode(node)) {\n // Mark other sub-DAGs as non-preparer\n node.setPreparer(false);\n }\n }\n initializeDependentKeys();\n initializeQueue();\n }\n }",
"private void setAttributesIntoStrategy() {\n ResolverStrategy strategy = _resolverStrategy;\n strategy.setProperty(\n ResolverStrategy.PROPERTY_LOAD_PACKAGE_MAPPINGS, \n _loadPackageMappings);\n strategy.setProperty(\n ResolverStrategy.PROPERTY_USE_INTROSPECTION, _useIntrospector);\n strategy.setProperty(\n ResolverStrategy.PROPERTY_MAPPING_LOADER, _mappingLoader);\n strategy.setProperty(\n ResolverStrategy.PROPERTY_INTROSPECTOR, _introspector);\n }",
"public BasicStrategy() {\r\n if (pairTable == null) {\r\n createPairTable();\r\n }\r\n if (aceTable == null) {\r\n createAceTable();\r\n }\r\n if (totalTable == null) {\r\n createTotalTable();\r\n }\r\n }",
"@Before\n public void prepare() {\n MetaStore metadb = prepareTestDB();\n testObj = new SdbSchemeRewriter(metadb.getAllDBs().get(0));\n }",
"public void updateDecoyStrategy() {\n\t\tlogger.info(\"\\tformDecoyStrategy \" + formDecoyStrategy);\n\t\t\n\t\t// compare the used strategy for FDRData and reset (if necessary)\n\t\tproteinModeller.updateFDRData(\n\t\t\t\tDecoyStrategy.getStrategyByString(formDecoyStrategy),\n\t\t\t\tformDecoyPattern, formFDRThreshold);\n\t\t\n\t\tproteinModeller.updateDecoyStates();\n\t\t\n\t\tneedsRecaching = true;\n\t}",
"private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}",
"public void prepareRematch() {\r\n\t\tgame.prepareRematch();\r\n\t}",
"public void setup() {\n doors = new ArrayList<>();\n doors.add(new Door(Contains.GOAT));\n doors.add(new Door(Contains.GOAT));\n doors.add(new Door(Contains.CAR));\n Collections.shuffle(doors);\n stage = Stage.BEGINNING;\n }",
"protected void resolveAndPopulateCredentialsAndAlgorithms(@Nonnull final EncryptionParameters params, \n @Nonnull final CriteriaSet criteria, @Nonnull final Predicate<String> includeExcludePredicate) {\n \n // Pre-resolve these for efficiency\n final List<Credential> keyTransportCredentials = getEffectiveKeyTransportCredentials(criteria);\n final List<String> keyTransportAlgorithms =\n getEffectiveKeyTransportAlgorithms(criteria, includeExcludePredicate);\n log.trace(\"Resolved effective key transport algorithms: {}\", keyTransportAlgorithms);\n \n final List<Credential> dataEncryptionCredentials = getEffectiveDataEncryptionCredentials(criteria);\n final List<String> dataEncryptionAlgorithms = getEffectiveDataEncryptionAlgorithms(criteria, \n includeExcludePredicate);\n log.trace(\"Resolved effective data encryption algorithms: {}\", dataEncryptionAlgorithms);\n \n // Select the data encryption algorithm, and credential if exists\n if (dataEncryptionCredentials.isEmpty()) {\n // This is probably the most typical case\n params.setDataEncryptionAlgorithm(resolveDataEncryptionAlgorithm(null, dataEncryptionAlgorithms));\n } else {\n for (final Credential dataEncryptionCredential : dataEncryptionCredentials) {\n assert dataEncryptionCredential != null;\n if (checkAndProcessKeyAgreement(params, criteria, dataEncryptionCredential, dataEncryptionAlgorithms,\n CollectionSupport.emptyList())) {\n return;\n }\n \n final String dataEncryptionAlgorithm = resolveDataEncryptionAlgorithm(dataEncryptionCredential, \n dataEncryptionAlgorithms);\n if (dataEncryptionAlgorithm != null) {\n params.setDataEncryptionCredential(dataEncryptionCredential);\n params.setDataEncryptionAlgorithm(dataEncryptionAlgorithm);\n break;\n }\n if (log.isDebugEnabled()) {\n final Key key = CredentialSupport.extractEncryptionKey(dataEncryptionCredential); \n log.debug(\"Unable to resolve data encryption algorithm for credential with key type '{}', \" \n + \"considering other credentials\", key != null ? key.getAlgorithm() : null);\n }\n }\n }\n \n final KeyTransportAlgorithmPredicate keyTransportPredicate = resolveKeyTransportAlgorithmPredicate(criteria);\n \n // Select key encryption cred and algorithm\n for (final Credential keyTransportCredential : keyTransportCredentials) {\n assert keyTransportCredential != null;\n if (checkAndProcessKeyAgreement(params, criteria, keyTransportCredential, dataEncryptionAlgorithms,\n keyTransportAlgorithms)) {\n return;\n }\n \n final String keyTransportAlgorithm = resolveKeyTransportAlgorithm(keyTransportCredential,\n keyTransportAlgorithms, params.getDataEncryptionAlgorithm(), keyTransportPredicate);\n \n if (keyTransportAlgorithm != null) {\n params.setKeyTransportEncryptionCredential(keyTransportCredential);\n params.setKeyTransportEncryptionAlgorithm(keyTransportAlgorithm);\n break;\n }\n if (log.isDebugEnabled()) {\n final Key key = CredentialSupport.extractEncryptionKey(keyTransportCredential);\n log.debug(\"Unable to resolve key transport algorithm for credential with key type '{}', \" \n + \"considering other credentials\", key != null ? key.getAlgorithm() : null);\n }\n }\n \n resolveAndPopulateRSAOAEPParams(params, criteria, includeExcludePredicate);\n \n // Auto-generate data encryption cred if configured and possible\n processDataEncryptionCredentialAutoGeneration(params);\n }",
"private void seedSuppliers() throws IOException, JAXBException {\n this.supplierService.seed();\n }",
"public void prepareForDeferredProcessing() {\n\n }",
"protected void prepare()\r\n\t{\r\n\t\tProcessInfoParameter[] para = getParameter();\r\n\t\tfor (int i = 0; i < para.length; i++)\r\n\t\t{\r\n\t\t\tString name = para[i].getParameterName();\r\n\t\t\tif (name.equals(\"DeleteOldImported\"))\r\n\t\t\t\tp_deleteOldImported = \"Y\".equals(para[i].getParameter());\r\n\t\t\telse if (name.equals(\"IsValidateOnly\"))\r\n\t\t\t\tp_IsValidateOnly = para[i].getParameterAsBoolean();\r\n\t\t\telse\r\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\r\n\t\t}\r\n\r\n\t\tm_AD_Client_ID = getProcessInfo().getAD_Client_ID();\r\n\r\n\t}",
"public static void calculateFitness(StrategyPool sp)\r\n\t{\r\n\t\tfor(int i = 0; i<sp.pool.size() ; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j <sp.pool.size() ; j++)\r\n\t\t\t{\r\n\t\t\t\tif(i == j)\r\n\t\t\t\t\t; //do nothing\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n//\t\t\t\t\tSystem.out.println(\"Playing Strategy \" +i +\" against \" +j );\r\n\t\t\t\t\tStrategy p1 = sp.pool.get(i);\r\n\t\t\t\t\tStrategy p2 = sp.pool.get(j);\r\n\t\t\t\t\tint winner = 0;\r\n\t\t\t\t\tfor(int k = 0; k<1000 ; k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\twinner = new Game().play(p1,p2);\r\n\t\t\t\t\t\t\tif(winner == 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tp1.addDrawCount();\r\n\t\t\t\t\t\t\t\tp2.addDrawCount();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(winner == 1)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tp1.addWinCount();\r\n\t\t\t\t\t\t\t\tp2.addLostCount();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(winner ==2)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tp1.addLostCount();\r\n\t\t\t\t\t\t\t\tp2.addWinCount();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//switch positions\r\n\t\t\t\t\tp2 = sp.pool.get(i);\r\n\t\t\t\t\tp1 = sp.pool.get(j);\r\n\r\n//\t\t\t\t\tSystem.out.println(\"Playing Strategy \" +j +\" against \" +i );\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int k = 0; k<1000 ; k++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\twinner = new Game().play(p1,p2);\r\n\t\t\t\t\t\tif(winner == 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tp1.addDrawCount();\r\n\t\t\t\t\t\t\tp2.addDrawCount();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(winner == 1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tp1.addWinCount();\r\n\t\t\t\t\t\t\tp2.addLostCount();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(winner ==2)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tp1.addLostCount();\r\n\t\t\t\t\t\t\tp2.addWinCount();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n }",
"@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }",
"@Override\n protected LearningPerformanceEvaluator<Example<Instance>> [] getRegressionEvaluatorSetups() {\n \tLearningPerformanceEvaluator<Example<Instance>> value = new BasicRegressionPerformanceEvaluator();\n \tLearningPerformanceEvaluator<Example<Instance>> [] ret = new BasicRegressionPerformanceEvaluator[this.numberTests];\n for (int i = 0; i < this.numberTests; i++) {\n ret[i] = (LearningPerformanceEvaluator<Example<Instance>> ) value.copy();\n }\n return ret;\n }",
"protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null)\n\t\t\t\t;\n\t\t\telse if (name.equals(\"M_Requisition_ID\"))\n\t\t\t\tp_M_RequisitionFrom_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t}",
"public abstract void prepare();",
"abstract void prepare();",
"public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {\r\n this.conf = stormConf;\r\n this.context = context;\r\n this.collector = collector;\r\n }",
"protected void doPrepare(final Map stormConf, final TopologyContext context, final OutputCollector collector) {\n }",
"static HintStrategyTable createHintStrategies(HintStrategyTable.Builder builder) {\n return builder\n .hintStrategy(\"no_hash_join\", HintPredicates.JOIN)\n .hintStrategy(\"time_zone\", HintPredicates.SET_VAR)\n .hintStrategy(\"REPARTITION\", HintPredicates.SET_VAR)\n .hintStrategy(\"index\", HintPredicates.TABLE_SCAN)\n .hintStrategy(\"properties\", HintPredicates.TABLE_SCAN)\n .hintStrategy(\n \"resource\", HintPredicates.or(\n HintPredicates.PROJECT, HintPredicates.AGGREGATE,\n HintPredicates.CALC, HintPredicates.VALUES,\n HintPredicates.FILTER, HintPredicates.TABLE_FUNCTION_SCAN))\n .hintStrategy(\"AGG_STRATEGY\",\n HintStrategy.builder(HintPredicates.AGGREGATE)\n .optionChecker(\n (hint, errorHandler) -> errorHandler.check(\n hint.listOptions.size() == 1\n && (hint.listOptions.get(0).equalsIgnoreCase(\"ONE_PHASE\")\n || hint.listOptions.get(0).equalsIgnoreCase(\"TWO_PHASE\")),\n \"Hint {} only allows single option, \"\n + \"allowed options: [ONE_PHASE, TWO_PHASE]\",\n hint.hintName)).build())\n .hintStrategy(\"use_hash_join\",\n HintPredicates.or(\n HintPredicates.and(HintPredicates.CORRELATE, temporalJoinWithFixedTableName()),\n HintPredicates.and(HintPredicates.JOIN, joinWithFixedTableName())))\n .hintStrategy(\"breakable\", HintPredicates.SETOP)\n .hintStrategy(\"async_merge\", HintPredicates.SORT)\n .hintStrategy(\"mini_batch\",\n HintPredicates.and(HintPredicates.WINDOW, HintPredicates.PROJECT))\n .hintStrategy(\"fast_snapshot\", HintPredicates.SNAPSHOT)\n .hintStrategy(\"use_merge_join\",\n HintStrategy.builder(\n HintPredicates.and(HintPredicates.JOIN, joinWithFixedTableName()))\n .excludedRules(EnumerableRules.ENUMERABLE_JOIN_RULE).build())\n .hintStrategy(\n \"preserved_project\", HintStrategy.builder(\n HintPredicates.PROJECT).excludedRules(CoreRules.FILTER_PROJECT_TRANSPOSE).build())\n .build();\n }",
"@Before\n\tpublic void initialize() {\n\t\tnullParserSQLGenerator = new SQLStringGenerator(null);\n\t\toneArgParserSQLGenerator = new SQLStringGenerator(new OneArgParser());\n\t}",
"protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"AD_Client_ID\"))\n\t\t\t\tm_AD_Client_ID = 1000000;\n\t\t\telse if (name.equals(\"AD_Org_ID\"))\n\t\t\t\tm_AD_Org_ID = 1000000;\n\t\t\telse if (name.equals(\"DeleteOldImported\"))\n\t\t\t;//\tm_deleteOldImported = \"Y\".equals(para[i].getParameter());\n\t\t\telse if (name.equals(\"DocAction\"))\n\t\t;//\t\tm_docAction = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t}",
"private void initialisePools() {\r\n Integer[] bigPoolInts = {25, 50, 75, 100};\r\n Integer[] smallPoolInts = {1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10};\r\n bigPool = new ArrayList<Integer>( Arrays.asList(bigPoolInts) );\r\n smallPool = new ArrayList<Integer>(Arrays.asList(smallPoolInts));\r\n //mix them up\r\n Collections.shuffle( bigPool );\r\n Collections.shuffle( smallPool );\r\n }",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"public static List<StrategyAgent> createAgents() {\n\t\tdouble ratioAlt = parameters.getRatioAltruistic();\n\t\tint numberAlt = (int)Math.floor(parameters.getNAgents() * ratioAlt);\n\t\t\n\t\tList<StrategyAgent> agents = new ArrayList<StrategyAgent>();\n\t\tfor (int i = 0; i < numberAlt; i++) {\n\t\t\tStrategyAgent agent = new StrategyAgent(lastID, 0, parameters.getEtaN(), parameters.getEtaS(),\n\t\t\t\t\tparameters.getFeatures(), parameters.getNNoLearning(), parameters.getAlphabetSize(),\n\t\t\t\t\tStrategyType.ALTRUISTIC, parameters.getMemorySize());\n\t\t\tagent.architecture.ontology = Utils.getSingletonOntology();\n\t\t\tagents.add(agent);\n\t\t\tlastID++;\n\t\t}\n\t\tfor (int i = numberAlt; i < parameters.getNAgents(); i++){\n\t\t\tStrategyAgent agent = new StrategyAgent(lastID, 0, parameters.getEtaN(), parameters.getEtaS(),\n\t\t\t\t\tparameters.getFeatures(), parameters.getNNoLearning(), parameters.getAlphabetSize(),\n\t\t\t\t\tStrategyType.MUTUALISTIC, parameters.getMemorySize());\n\t\t\tagent.architecture.ontology = Utils.getSingletonOntology();\n\t\t\tagents.add(agent);\n\t\t\tlastID++;\n\t\t}\n\t\tCollections.shuffle(agents);\n\t\treturn agents;\n\t}",
"@Override\n\tpublic void prepare() {\n\t}",
"protected void initParameterGenerators() {\n Map<String, List<Annotation>> methodAnnotationMap = initMethodAnnotationByParameterName();\n\n // 2.create ParameterGenerators by method parameters, merge annotations with method annotations\n initMethodParameterGenerators(methodAnnotationMap);\n\n // 3.create ParameterGenerators remains method annotations\n initRemainMethodAnnotationsParameterGenerators(methodAnnotationMap);\n }",
"public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n\r\n }",
"@Override\n\tprotected void setup(Reducer<LongWritable, Text, Text, Text>.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tsuper.setup(context);\n\t\tminPnts=Long.parseLong(context.getConfiguration().get(\"minPnts\"));\n\t\tepsilon=Double.parseDouble(context.getConfiguration().get(\"epsilon\"));\n\t\toutput = new MultipleOutputs<Text,Text>(context);\n\t\tPath[] cacheFilesLocal = DistributedCache.getLocalCacheFiles(context.getConfiguration());\n\t\tfor (Path eachPath : cacheFilesLocal) {\n\t\t\t\n\t\t\tloadPartition(eachPath, context);\n\t\t\t\n\t\t}\n\t}",
"@PostConstruct\n public void init() {\n this.facts.addAll(checkExtractor.obtainFactList());\n this.facts.addAll(facebookExtractor.obtainFactList());\n this.facts.addAll(googleExtractor.obtainFactList());\n this.facts.addAll(linkedinExtractor.obtainFactList());\n this.facts.addAll(twitterExtractor.obtainFactList());\n\n this.checkHeader = this.utils.generateDatasetHeader(this.checkExtractor.obtainFactList());\n this.facebookHeader = this.utils.generateDatasetHeader(this.facebookExtractor.obtainFactList());\n this.googleHeader = this.utils.generateDatasetHeader(this.googleExtractor.obtainFactList());\n this.linkedinHeader = this.utils.generateDatasetHeader(this.linkedinExtractor.obtainFactList());\n this.twitterHeader = this.utils.generateDatasetHeader(this.twitterExtractor.obtainFactList());\n }",
"protected abstract void createInnerEstimatorsIfNeeded();",
"public void prepareForSpeciation() {\n\t\tfor (Species s : speciesList) {\r\n\t\t\ts.assignRep();\r\n\t\t}\r\n\r\n\t\t// clear the old species list\r\n\t\tfor (Species s : speciesList) {\r\n\t\t\ts.clearMembers();\r\n\t\t}\r\n\t}",
"@Override\n protected void preSequencePreparations() {\n //initializing the HTML sequence report:\n htmlReport = new HtmlSequenceReport(scenarioCount, sequenceCount);\n // updating scenarioCount based on existing HTML files - sequence 1 gets the correct scenarioCount:\n scenarioCount = htmlReport.getScenarioCount();\n }",
"public void initWithPelletReasoner()\r\n\t{\r\n\t\tcredits();\r\n\t\tONT_MODEL = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);\t\r\n\t}",
"@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }",
"@Before\n public void setup() {\n ApiAuthProviders authProviders = ApiAuthProviders.builder()\n .cognitoUserPoolsAuthProvider(new FakeCognitoAuthProvider())\n .oidcAuthProvider(new FakeOidcAuthProvider())\n .build();\n decorator = new AuthRuleRequestDecorator(authProviders);\n }",
"public void askFirstPredictions(){\n //Ask host\n if(initialPredictionCount == 0){\n Log.d(\"WizardApp\", \"Ask host: \" + GameConfig.getInstance().getPlayers()[0] + \" for stiches.\");\n askForStiches(GameConfig.getInstance().getPlayers()[initialPredictionCount]);\n initialPredictionCount++;\n currentPlayer++;\n }\n //Ask clients\n else if(initialPredictionCount > 0 && initialPredictionCount < players.size()){\n Log.d(\"WizardApp\", \"Ask player: \" + initialPredictionCount + \" for stiches.\");\n askForStiches(GameConfig.getInstance().getPlayers()[initialPredictionCount]);\n initialPredictionCount++;\n currentPlayer++;\n }\n //All players asked, go to next state\n else{\n Log.d(\"WizardApp\", \"Initial predictions are done now.\");\n gameActivity.setInitialPrediction(false);\n status = RoundStatus.waitingForCard;\n currentPlayer=0;\n checkNextStep();\n }\n }",
"@Override\n\tpublic void prepare() {\n\t\t\n\t}",
"public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {\n\t\tthis.collector = collector;\n\n\t}",
"public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {\n\t\tthis.collector = collector;\n\t}",
"@Before\n\tpublic void setUp() {\n\t\tprocessor = new ParseBigDecimal();\n\t\tprocessor2 = new ParseBigDecimal(ENGLISH_SYMBOLS);\n\t\tprocessor3 = new ParseBigDecimal(GERMAN_SYMBOLS);\n\t\tprocessorChain = new ParseBigDecimal(new IdentityTransform());\n\t\tprocessorChain2 = new ParseBigDecimal(ENGLISH_SYMBOLS, new IdentityTransform());\n\t\tprocessorChain3 = new ParseBigDecimal(GERMAN_SYMBOLS, new IdentityTransform());\n\t}",
"private GardenerStrategyHelpers() {\n }",
"protected void setUp() throws Exception {\r\n comparator = new ComponentCompetitionFulfillmentPredictionPrizeComparator(0.8, 1.2, 10000);\r\n super.setUp();\r\n }",
"@Before\n\tpublic void setup() {\n\t\tinit(rule.getProcessEngine());\n\t}",
"public void prepare() {\n long millis, nanos;\n TestCaseImpl tc = _testCase;\n \n nanos = Util.currentTimeNanos();\n prepare(tc);\n nanos = Util.currentTimeNanos() - nanos;\n tc.setDoubleParam(Constants.ACTUAL_PREPARE_TIME, \n Util.nanosToMillis(nanos));\n }",
"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 }",
"public void initBufferStrategy() {\n // Triple-buffering\n createBufferStrategy(3);\n bufferStrategy = getBufferStrategy();\n }",
"public void runOptimizations() {\n\t\tOptInfo info = new OptInfo();\n\t\tfor (int i = 0; i < mainOpts.size(); i++) {\n\t\t\t//Extract the operator in the vector and convert it into a\n\t\t\t//SearchStrategy type. The object that is loaded into the\n\t\t\t//SearchStrategy type is not SearchStrategy as it is an\n\t\t\t//abstract class but a class that inherits off of\n\t\t\t//SearchStrategy such as FirstBestIntraOpt, FirstBestInterOpt\n\t\t\t//and so on. the opt.run method runs the run method\n\t\t\t//from the inheriting class such as FirstBestIntraOpt.\n\t\t\tSearchStrategy opt = (SearchStrategy) mainOpts.elementAt(i);\n\t\t\tSettings.printDebug(Settings.COMMENT, \"Running \" + opt);\n\n\t\t\t//The opt.run method called is dependent on the object that\n\t\t\t//was created in the mainOpts. If the object was BestBestIntraSearch\n\t\t\t//then the run method in BestBestIntraSearch is called.\n\t\t\toptInformation.add(opt.toString() + \" \" + opt.run(mainDepots));\n\t\t\tSettings.printDebug(Settings.COMMENT,\n\t\t\t\t\topt.toString() + \" Stats: \" +\n\t\t\t\t\t\t\tmainDepots.getSolutionString());\n\t\t}\n\t}",
"public void initAllCalculators(){\n for(int i=0; i< calculators.length; i++){\n initRow(i);\n }\n }",
"private StrategyChainBuilder() {\n\t}",
"protected void prepareUninstallation() {\n\t\t//\n\t}",
"public void setAllGeneratorVariables(int voters, byte ratings, int parties, ElectionType type, int districts){\n this.voters = voters;\n this.ratings = ratings;\n this.parties = parties;\n this.type = type;\n this.districts = districts;\n recalculateVotes(new ActionEvent());\n }",
"public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }",
"private void prepareRates() {\n // set the Currency as GBP (symbol) which is applicable in all rates\n Currency gbp = Currency.getInstance(\"GBP\");\n rates.add(new Rate(\"Morning\", gbp, 15d, LocalTime.of(5, 0), LocalTime.of(10, 0)));\n rates.add(new Rate(\"Evening\", gbp, 18d, LocalTime.of(16, 30), LocalTime.of(20, 0)));\n rates.add(new Rate(\"Night\", gbp, 20d, LocalTime.of(20, 0), LocalTime.of(23, 0)));\n rates.add(new Rate(\"Default\", gbp, 10d, null, null));\n }"
] | [
"0.6329999",
"0.5739692",
"0.57129675",
"0.5571761",
"0.55425686",
"0.5487731",
"0.5403286",
"0.5397956",
"0.5278479",
"0.5158581",
"0.5121787",
"0.5084718",
"0.5080898",
"0.5077817",
"0.50607514",
"0.5037881",
"0.50302464",
"0.5012148",
"0.5011203",
"0.49685088",
"0.4963341",
"0.49529514",
"0.49416614",
"0.49350023",
"0.49200058",
"0.4892907",
"0.4887827",
"0.48637792",
"0.48337907",
"0.48230678",
"0.48068708",
"0.4805375",
"0.48046312",
"0.48035353",
"0.47973657",
"0.47896934",
"0.4786134",
"0.47767282",
"0.47729874",
"0.4770793",
"0.4770583",
"0.47675717",
"0.47659376",
"0.47607312",
"0.47562474",
"0.47533274",
"0.47394878",
"0.47241202",
"0.47231644",
"0.47198668",
"0.47193736",
"0.47162244",
"0.47143117",
"0.47124076",
"0.47038072",
"0.468924",
"0.46577895",
"0.46492594",
"0.464657",
"0.4646461",
"0.46336865",
"0.46228632",
"0.4622044",
"0.46215045",
"0.46214223",
"0.4620578",
"0.4620239",
"0.4617533",
"0.46114388",
"0.46064934",
"0.46031618",
"0.45980105",
"0.4595985",
"0.4593915",
"0.45914903",
"0.45815456",
"0.457691",
"0.45734248",
"0.45724988",
"0.45679462",
"0.4545426",
"0.45412856",
"0.45361504",
"0.45341069",
"0.45295596",
"0.4529192",
"0.45282423",
"0.45264784",
"0.45226026",
"0.45207924",
"0.45105478",
"0.450813",
"0.45067057",
"0.4500071",
"0.44968733",
"0.44929513",
"0.4491955",
"0.4486693",
"0.44799104",
"0.44797984"
] | 0.5875318 | 1 |
Evaluates the recommendations generated in previous steps. | public static void evaluate(final int nFolds, final String splitPath, final String recPath) {
double ndcgRes = 0.0;
double precisionRes = 0.0;
double rmseRes = 0.0;
for (int i = 0; i < nFolds; i++) {
File testFile = new File(splitPath + "test_" + i + ".csv");
File recFile = new File(recPath + "recs_" + i + ".csv");
DataModelIF<Long, Long> testModel = null;
DataModelIF<Long, Long> recModel = null;
try {
testModel = new SimpleParser().parseData(testFile);
recModel = new SimpleParser().parseData(recFile);
} catch (IOException e) {
e.printStackTrace();
}
NDCG<Long, Long> ndcg = new NDCG<>(recModel, testModel, new int[]{AT});
ndcg.compute();
ndcgRes += ndcg.getValueAt(AT);
RMSE<Long, Long> rmse = new RMSE<>(recModel, testModel);
rmse.compute();
rmseRes += rmse.getValue();
Precision<Long, Long> precision = new Precision<>(recModel, testModel, REL_TH, new int[]{AT});
precision.compute();
precisionRes += precision.getValueAt(AT);
}
System.out.println("NDCG@" + AT + ": " + ndcgRes / nFolds);
System.out.println("RMSE: " + rmseRes / nFolds);
System.out.println("P@" + AT + ": " + precisionRes / nFolds);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}",
"private String[] evaluate()\n {\n //there must be some recommender selected by the user on the UI\n if (selectedRecommenderPanel.getObject() == null\n || selectedRecommenderPanel.getObject().getTool() == null) {\n LOG.error(\"Please select a recommender from the list\");\n return null;\n }\n\n //get all the source documents related to the project\n Map<SourceDocument, AnnotationDocument> listAllDocuments = documentService\n .listAllDocuments(project, userDao.getCurrentUser());\n\n //create a list of CAS from the pre-annotated documents of the project\n List<CAS> casList = new ArrayList<>();\n listAllDocuments.forEach((source, annotation) -> {\n try {\n CAS cas = documentService.createOrReadInitialCas(source);\n casList.add(cas);\n }\n catch (IOException e1) {\n LOG.error(\"Unable to render chart\", e1);\n return;\n }\n });\n \n IncrementalSplitter splitStrategy = new IncrementalSplitter(TRAIN_PERCENTAGE,\n INCREMENT, LOW_SAMPLE_THRESHOLD);\n\n @SuppressWarnings(\"rawtypes\")\n RecommendationEngineFactory factory = recommenderRegistry\n .getFactory(selectedRecommenderPanel.getObject().getTool());\n RecommendationEngine recommender = factory.build(selectedRecommenderPanel.getObject());\n \n if (recommender == null) {\n LOG.warn(\"Unknown Recommender selected\");\n return null;\n }\n \n if (!evaluate) {\n return getEvaluationScore(evaluationResults);\n }\n\n evaluationResults = new ArrayList<EvaluationResult>();\n \n // create a list of comma separated string of scores from every iteration of\n // evaluation.\n while (splitStrategy.hasNext()) {\n splitStrategy.next();\n\n try {\n EvaluationResult evaluationResult = recommender.evaluate(casList, splitStrategy);\n \n if (evaluationResult.isEvaluationSkipped()) {\n LOG.warn(\"Evaluation skipped. Chart cannot to be shown\");\n continue;\n }\n\n evaluationResults.add(evaluationResult);\n }\n catch (RecommendationException e) {\n LOG.error(e.toString(),e);\n continue;\n }\n }\n\n return getEvaluationScore(evaluationResults);\n }",
"public void recalc() {\n\t\tMapping mapping = getConsumerProductMatrix();\n\t\tif (mapping == null) {\n\t\t\treturn; // there is nobody to calculate recommendation for\n\t\t}\n\t\tSparseMatrix<Float64> Ct = makeC(mapping.matrix).transpose();\n\t\tSparseMatrix<Float64> B = makeB(mapping.matrix);\n\t\tSparseMatrix<Float64> CR0 = makeCR0(mapping.matrix.getNumberOfRows());\n\n\t\tSparseMatrix<Float64> PR = null;\n\t\tSparseMatrix<Float64> CR = CR0;\n\n\t\tint iterations =\n\t\t\tConfigService.CONFIG_SERVICE.getConfig(\n\t\t\t\tServerConfigKey.RECOMMENDATION_ITERATIONS).get();\n\t\tfor (int i = 0; i < iterations; i++) {\n\t\t\tPR = CR.times(B);\n\t\t\tCR = PR.times(Ct).plus(CR0);\n\t\t}\n\n\t\tsaveRecommendations(mapping, PR);\n\t}",
"public abstract double evaluateFitness();",
"private void evaluateProbabilities()\n\t{\n\t}",
"public void evaluate() {\r\n Statistics.evaluate(this);\r\n }",
"public void evaluate() {\n int score = sequence.getScore();\n // sequence has already been evaluated\n if (score > 0) {\n sequence.setScore(score);\n return;\n }\n \n int sum = 0;\n for (SingleConstraint c : singleConstraints) {\n sum += c.sumOfPenalties();\n }\n for (PairConstraint c : pairConstraints) {\n sum += c.sumOfPenalties();\n }\n sequence.setScore(sum);\n int bestSequenceScore = bestSequence.getScore();\n if (bestSequenceScore < 0 || sum < bestSequenceScore) {\n bestSequence = sequence;\n System.out.format(\"New best sequence: %s (Score: %d)\\n\", sequence,\n sequence.getScore());\n }\n }",
"public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }",
"protected abstract void evaluate(Vector target, List<Vector> predictions);",
"@Override\n public void doEvaluation(Individual sample, boolean isTrain) {\n mainEvaluator.doEvaluation(sample, isTrain);\n }",
"int getEvaluations();",
"public void evaluate() {\n for (Chromosome chromo : chromosomes) {\n double chromoGH = chromo.getTotalGH();\n if (chromo.isValid()) {\n this.validChromosomes++;\n if (chromoGH > this.getBestScore()) {\n this.bestScore = chromoGH;\n this.setBestChromo(chromo);\n }\n }\n //Log.debugMsg(chromo.getTotalGH().toString());\n// this.map.put(chromoGH, chromo);\n }\n }",
"public void evaluate ( String predictionFileName ) \n\t\t\t\tthrows IOException\t\n\t{\n\t\tdouble MAE = 0.0, RMSE = 0.0;\n\t\tint countRatings = 0, countTotal = 0;\n\t\t\t\t\n\t\tBufferedWriter wr = new BufferedWriter(new FileWriter(predictionFileName));\n\t\tfor (Integer user : dao.getTestUsers())\t{\n\t\t\tfor (Integer item : dao.getTestItems(user))\t{\n\t\t\t\tcountTotal++;\n\t\t\t\tdouble P = predict(user, item);\n\t\t\t\t// A prediction of -INF is used to indicate that the prediction cannot be made\n\t\t\t\tif (P == Double.NEGATIVE_INFINITY)\n\t\t\t\t\tcontinue;\n\t\t\t\tcountRatings++;\n\t\t\t\tdouble R = dao.getTestRating(user, item);\n\t\t\t\tdouble tmp = P - R;\n\t\t\t\tMAE += Math.abs(tmp);\n\t\t\t\tRMSE += tmp * tmp;\n\t\t\t\twr.write(String.format(\"%d %d %f %f\\n\", user, item, R, P));\n\t\t\t}\n\t\t}\n\t\twr.flush();\n\t\twr.close();\n\n\t\tSystem.out.println(\"Recommender evaluation on test data...\");\n\t\tif (countRatings == 0)\n\t\t\tSystem.out.println(\"Coverage : 0%\");\n\t\telse {\n\t\t\tMAE /= countRatings;\n\t\t\tRMSE = Math.sqrt(RMSE / countRatings);\n\t\t\tSystem.out.printf(\"Coverage %f%%\\n\", (countRatings * 100.0) / countTotal);\n\t\t\tSystem.out.printf(\"MAE : %f\\n\", MAE);\n\t\t\tSystem.out.printf(\"RMSE : %f\\n\", RMSE);\n\t\t}\t\t\n\t}",
"public void evaluate(String sampleFile, String validationFile, String featureDefFile, double percentTrain) {\n/* 761 */ List<RankList> trainingData = new ArrayList<>();\n/* 762 */ List<RankList> testData = new ArrayList<>();\n/* 763 */ int[] features = prepareSplit(sampleFile, featureDefFile, percentTrain, normalize, trainingData, testData);\n/* 764 */ List<RankList> validation = null;\n/* */ \n/* */ \n/* 767 */ if (!validationFile.isEmpty()) {\n/* */ \n/* 769 */ validation = readInput(validationFile);\n/* 770 */ if (normalize) {\n/* 771 */ normalize(validation, features);\n/* */ }\n/* */ } \n/* 774 */ RankerTrainer trainer = new RankerTrainer();\n/* 775 */ Ranker ranker = trainer.train(this.type, trainingData, validation, features, this.trainScorer);\n/* */ \n/* 777 */ double rankScore = evaluate(ranker, testData);\n/* */ \n/* 779 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* 780 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 782 */ System.out.println(\"\");\n/* 783 */ ranker.save(modelFile);\n/* 784 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }",
"public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }",
"@Override\n public void doEvaluation(ArrayList<Individual> sample, boolean isTrain, GeneticAlgorithm<Individual> GA) {\n for (Individual ind : sample) {\n if (!ind.isEvaluated()) {\n mainEvaluator.doEvaluation(ind, isTrain);\n GA.TrialsPlusPlus();\n ind.setNEval((int) GA.getTrials());\n }\n }\n\n if (isTrain) {\n // Now, apply the decay factor to all individuals in the population\n for (Individual ind : sample) {\n if (!ind.isEmpty()) {\n ArrayDeque<Boolean> aux = appearance.get(ind);\n if (aux != null) {\n Iterator<Boolean> iterator = aux.iterator();\n\n int exponent = -1;\n double decayFactor = 1.0;\n\n // Calculate the decay factor of this individual\n while (iterator.hasNext()) {\n if (!iterator.next()) {\n // The element was present, add to the decay factor\n decayFactor -= Math.pow(2, exponent);\n }\n exponent--;\n }\n\n // Now, get indivual's objectives and apply the dacay factor to all of them\n for (QualityMeasure obj : (ArrayList<QualityMeasure>) ind.getObjs()) {\n if (obj.getValue() >= 0) {\n obj.setValue(obj.getValue() * decayFactor);\n } else {\n // if the value is negative, to make it worst we need to divide\n obj.setValue(obj.getValue() / decayFactor);\n }\n }\n }\n }\n }\n // Once applied the decay factor, update the time structure, adding the new individuals.\n //updateAppearance(sample, GA.getCurrentClass());\n }\n }",
"public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }",
"private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }",
"public void evaluate(String sampleFile, String featureDefFile, int nFold, float tvs, String modelDir, String modelFile) {\n/* 854 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 855 */ List<List<RankList>> validationData = new ArrayList<>();\n/* 856 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* */ \n/* 860 */ List<RankList> samples = readInput(sampleFile);\n/* */ \n/* */ \n/* 863 */ int[] features = readFeature(featureDefFile);\n/* 864 */ if (features == null) {\n/* 865 */ features = FeatureManager.getFeatureFromSampleVector(samples);\n/* */ }\n/* 867 */ FeatureManager.prepareCV(samples, nFold, tvs, trainingData, validationData, testData);\n/* */ \n/* */ \n/* 870 */ if (normalize)\n/* */ {\n/* 872 */ for (int j = 0; j < nFold; j++) {\n/* */ \n/* 874 */ normalizeAll(trainingData, features);\n/* 875 */ normalizeAll(validationData, features);\n/* 876 */ normalizeAll(testData, features);\n/* */ } \n/* */ }\n/* */ \n/* 880 */ Ranker ranker = null;\n/* 881 */ double scoreOnTrain = 0.0D;\n/* 882 */ double scoreOnTest = 0.0D;\n/* 883 */ double totalScoreOnTest = 0.0D;\n/* 884 */ int totalTestSampleSize = 0;\n/* */ \n/* 886 */ double[][] scores = new double[nFold][]; int i;\n/* 887 */ for (i = 0; i < nFold; i++) {\n/* 888 */ (new double[2])[0] = 0.0D; (new double[2])[1] = 0.0D; scores[i] = new double[2];\n/* 889 */ } for (i = 0; i < nFold; i++) {\n/* */ \n/* 891 */ List<RankList> train = trainingData.get(i);\n/* 892 */ List<RankList> vali = null;\n/* 893 */ if (tvs > 0.0F)\n/* 894 */ vali = validationData.get(i); \n/* 895 */ List<RankList> test = testData.get(i);\n/* */ \n/* 897 */ RankerTrainer trainer = new RankerTrainer();\n/* 898 */ ranker = trainer.train(this.type, train, vali, features, this.trainScorer);\n/* */ \n/* 900 */ double s2 = evaluate(ranker, test);\n/* 901 */ scoreOnTrain += ranker.getScoreOnTrainingData();\n/* 902 */ scoreOnTest += s2;\n/* 903 */ totalScoreOnTest += s2 * test.size();\n/* 904 */ totalTestSampleSize += test.size();\n/* */ \n/* */ \n/* 907 */ scores[i][0] = ranker.getScoreOnTrainingData();\n/* 908 */ scores[i][1] = s2;\n/* */ \n/* */ \n/* 911 */ if (!modelDir.isEmpty()) {\n/* */ \n/* 913 */ ranker.save(FileUtils.makePathStandard(modelDir) + \"f\" + (i + 1) + \".\" + modelFile);\n/* 914 */ System.out.println(\"Fold-\" + (i + 1) + \" model saved to: \" + modelFile);\n/* */ } \n/* */ } \n/* 917 */ System.out.println(\"Summary:\");\n/* 918 */ System.out.println(this.testScorer.name() + \"\\t| Train\\t| Test\");\n/* 919 */ System.out.println(\"----------------------------------\");\n/* 920 */ for (i = 0; i < nFold; i++)\n/* 921 */ System.out.println(\"Fold \" + (i + 1) + \"\\t| \" + SimpleMath.round(scores[i][0], 4) + \"\\t| \" + SimpleMath.round(scores[i][1], 4) + \"\\t\"); \n/* 922 */ System.out.println(\"----------------------------------\");\n/* 923 */ System.out.println(\"Avg.\\t| \" + SimpleMath.round(scoreOnTrain / nFold, 4) + \"\\t| \" + SimpleMath.round(scoreOnTest / nFold, 4) + \"\\t\");\n/* 924 */ System.out.println(\"----------------------------------\");\n/* 925 */ System.out.println(\"Total\\t| \\t\\t| \" + SimpleMath.round(totalScoreOnTest / totalTestSampleSize, 4) + \"\\t\");\n/* */ }",
"public EvaluationMetrics evaluate(SparseMatrix testMatrix) {\n\t\tSparseMatrix predicted = new SparseMatrix(userCount+1, itemCount+1);\n\t\tfor (int u = 1; u <= userCount; u++) {\n\t\t\tint[] testItems = testMatrix.getRowRef(u).indexList();\n\t\t\t\n\t\t\tif (testItems != null) {\n\t\t\t\tSparseVector predictedForUser = new SparseVector(itemCount);\n\t\t\t\t\n\t\t\t\tfor (int i : testItems) {\n\t\t\t\t\t/* =====================\n\t\t\t\t\t * COMMENT FOR AUTHORS\n\t\t\t\t\t * =====================\n\t\t\t\t\t * From your model (model-based) or with your estimation method (memory-based) from rating matrix,\n\t\t\t\t\t * you are supposed to estimate an unseen rating for an item \"i\" by a user \"u\" this point.\n\t\t\t\t\t * Please store your estimation for this (u, i) pair in the variable \"estimate\" below.\n\t\t\t\t\t * If the estimation is not simple, you may make private methods to help the decision.\n\t\t\t\t\t * Obviously again, you should not alter/add/remove any value in testMatrix during the evaluation process.\n\t\t\t\t\t */\n\t\t\t\t\tdouble estimate = 0.0;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t/* =====================\n\t\t\t\t\t * COMMENT FOR AUTHORS\n\t\t\t\t\t * =====================\n\t\t\t\t\t * This part ensures that your algorithm always produces a valid estimation.\n\t\t\t\t\t * You may be freely remove this part under your judge, but you should make sure that\n\t\t\t\t\t * your algorithm does not estimate ratings outside of legal range in the domain.\n\t\t\t\t\t */\n\t\t\t\t\tif (estimate < minValue)\n\t\t\t\t\t\testimate = minValue;\n\t\t\t\t\telse if (estimate > maxValue)\n\t\t\t\t\t\testimate = maxValue;\n\t\t\t\t\t\n\t\t\t\t\tpredictedForUser.setValue(i, estimate);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (predictedForUser != null) {\n\t\t\t\t\tfor (int i : predictedForUser.indexList()) {\n\t\t\t\t\t\tpredicted.setValue(u, i, predictedForUser.getValue(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new EvaluationMetrics(testMatrix, predicted, maxValue, minValue);\n\t}",
"@Override\r\n\tpublic int getEvaluations() {\n\t\treturn 0;\r\n\t}",
"public void evaluatePopulation() {\n // reset the total fitness score\n totalFitness = 0;\n\n for (int i = 0; i < populationSize; i++) {\n population.get(i).setRawFitness(\n FeederCollection.getFeeders().get(i).GetFitness());\n totalFitness += population.get(i).getRawFitness();\n }\n\n // set the normalized fitness for each population member\n for (Genotype g : population) {\n // normalized fitness = raw fitness / total fitness\n g.setNormalizedFitness((g.getRawFitness() / totalFitness));\n }\n\n // sort the popoulation\n Collections.sort(population, Genotype.FitnessOrder);\n\n highFitnesses.add(population.get(0).getRawFitness());\n avgFitnesses.add(totalFitness / population.size());\n\n\n }",
"public void runExperiment() {\n\t\tevaluator = new Evaluator(trainingSet);\n\t\tevaluator.evaluateClassifiers(classifiers);\n\t}",
"public void performEvaluation(){\n if(validateExp(currentExp)){\n try {\n Double result = symbols.eval(currentExp);\n currentExp = Double.toString(result);\n calculationResult.onExpressionChange(currentExp,true);\n count=0;\n }catch (SyntaxException e) {\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n e.printStackTrace();\n }\n }\n\n }",
"@Override\n protected double getScore(TestUser testUser, double[] predictions) {\n\n int[] recommendations = Search.findTopN(predictions, this.numberOfRecommendations);\n\n int recommendedAndRelevant = 0, recommended = 0;\n\n for (int pos : recommendations) {\n if (pos == -1) break;\n\n double rating = testUser.getTestRatingAt(pos);\n if (rating >= this.relevantThreshold) {\n recommendedAndRelevant++;\n }\n\n recommended++;\n }\n\n if (recommended == 0) return Double.NEGATIVE_INFINITY;\n return (double) recommendedAndRelevant / (double) recommended;\n }",
"public Map<String, Double> predictAndEvaluate(NodeVecs nodeVecs) {\n int topK = Integer.parseInt(prop.getProperty(\"prediction.numwanted\", \"1\"));\n\n List<Query> testQueries = queryNodes.buildQueries();\n\n int numQueries = testQueries.size();\n float sim = 0;\n int nQueriesEvaluated = 0;\n \n Map<String, int[]> counter = new HashMap<>();\n List<PredictionTuple> rtuples = new ArrayList<>();\n \n for (int qid=0; qid < numQueries; qid++) {\n Query testQuery = testQueries.get(qid);\n \n System.out.println(\"Test Query: \" + testQuery);\n\n AndQuery testAndQuery = (AndQuery)testQueries.get(qid);\n\n if (Boolean.parseBoolean(prop.getProperty(\"prediction.flattenquery\"))) {\n // first flatten the query\n testAndQuery = AndQuery.flatten(testAndQuery);\n }\n // filter the target of the query\n testAndQuery = testAndQuery.withFilter(avp ->\n avp.getAttribute().getId().equals(predictedOutcomeValueAttributeId) // make sure we target the correct outcome value\n && avp.getNumericValue() != null // we don't care about non-numerical OV\n && avp.getNumericValue() <= 100.0); // remove noisy values outside of 0-100%\n //testAndQuery = new AndQuerySimple(testAndQuery);\n System.out.println(\"Test Query: \" + testAndQuery);\n // run the query\n List<SearchResult> results = getResults(testAndQuery, nodeVecs, topK);\n\n //testQuery = testQuery.filteredWith(result -> result.node.getAttribute().getType() == wantedType()); // set the filter\n \n Map<String, List<SearchResult>> groupedResults = groupByAttribs(results); \n groupedResults = collapseToWtAvg(groupedResults);\n\n for (List<SearchResult> perAttribList: groupedResults.values()) {\n System.out.println(resTuple(perAttribList));\n for (SearchResult sr : perAttribList) {\n String stStr = sr.toString();\n int[] count = counter.get(stStr);\n if (count == null) {\n count = new int[1];\n counter.put(stStr, count);\n }\n count[0]++;\n }\n \n // float this_sim = evaluationLogic.evaluate(qid, perAttribList);\n PredictionTuple rtuple = evaluationLogic.evaluate(qid, perAttribList.get(0));\n if (!rtuple.valid()) {\n LOGGER.warn(\"Reference or prediction is not valid (less than 0): {} -- {}\", rtuple.getRef(), rtuple.getPred());\n continue;\n }\n System.out.println(\"Reference:\\t\" + rtuple.getRef() + \"\\tPrediction\\t\" + rtuple.getPred());\n\n rtuples.add(rtuple);\n //sim += this_sim;\n }\n nQueriesEvaluated++;\n }\n \n /*\n if (nQueriesEvaluated > 0)\n System.out.println(\"Mean-average \" + evaluationLogic.getMetricName() + \": \" + Math.sqrt(sim/(float)nQueriesEvaluated));\n */\n try { \n // Print out the result tuples in a file\n FileWriter fw = new FileWriter(\"res.tsv\");\n BufferedWriter bw = new BufferedWriter(fw);\n \n for (PredictionTuple rt: rtuples) {\n bw.write(rt.getRef() + \"\\t\" + rt.getPred());\n bw.newLine();\n }\n bw.close();\n fw.close();\n }\n catch (IOException ex) {\n ex.printStackTrace();\n }\n \n \n Map<String, Double> res = new HashMap<>();\n for (EvaluationMetric metric : evaluationMetrics) {\n String metricName = metric.toString();\n double evaluationResult = metric.compute(rtuples);\n System.out.println(metricName + \": \" + evaluationResult);\n res.put(metricName, evaluationResult);\n }\n \n /*\n // print distribution of all results\n for (Entry<String, int[]> entry : counter.entrySet()) {\n System.out.println(entry.getKey() + \"\\t\" + entry.getValue()[0]);\n }\n */\n\n return res;\n }",
"private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }",
"public double getBestSolutionEvaluation();",
"protected float computeModelScoreOnValidation() {\n/* 549 */ float score = computeModelScoreOnValidation(0, this.validationSamples.size() - 1);\n/* 550 */ return score / this.validationSamples.size();\n/* */ }",
"protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }",
"private void test() {\r\n \ttry {\r\n\t\t\ttestWriter.write(\"Testing started...\");\r\n\t\t\r\n\t\t\tpredictions = new HashMap<>();\r\n \trightAnswers = new HashMap<>();\r\n\r\n\r\n \t// Get results and check them\r\n \tEvaluation eval = new Evaluation(numLabels);\r\n \tfinalTestIterator.reset();\r\n\r\n \tint metaDataCounter = 0;\r\n \tint addrCounter = 0;\r\n\r\n \twhile(finalTestIterator.hasNext()) {\r\n \t// If iterator has next dataset\r\n \tfinalTestData = finalTestIterator.next();\r\n \t// Get meta-data from this dataset\r\n\r\n \t@SuppressWarnings(\"rawtypes\")\r\n \tList<?> exampleMetaData = finalTestData.getExampleMetaData();\r\n \tIterator<?> exampleMetaDataIterator = exampleMetaData.iterator();\r\n \ttestWriter.write(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n \tSystem.out.println(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n\r\n \t// Normalize data\r\n \tnormalizer.fit(finalTestData);\r\n\r\n \t// Count processed images\r\n \tnumProcessed = (metaDataCounter + 1) * batchSizeTesting;\r\n \tloaded.setText(\"Loaded and processed: \" + numProcessed + \" pictures\");\r\n\r\n \tINDArray features = finalTestData.getFeatures();\r\n \tINDArray labels = finalTestData.getLabels();\r\n \tSystem.out.println(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \t// Get right answers of NN for every input object\r\n \tint[][] rightLabels = labels.toIntMatrix();\r\n \tfor (int i = 0; i < rightLabels.length; i++) {\r\n \tRecordMetaDataURI metaDataUri = (RecordMetaDataURI) exampleMetaDataIterator.next();\r\n \t// Print address of image\r\n \tSystem.out.println(metaDataUri.getLocation());\r\n \tfor (int j = 0; j < rightLabels[i].length; j++) {\r\n \tif(rightLabels[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=right class label\r\n \trightAnswers.put(metaDataUri.getLocation(), j);\r\n \tthis.addresses.add(metaDataUri.getLocation());\r\n \t}\r\n \t}\r\n \t}\r\n \tSystem.out.println(\"\\nRight answers:\");\r\n \ttestWriter.write(\"\\nRight answers:\");\r\n \t// Print right answers\r\n \tfor(Map.Entry<String, Integer> answer : predictions.entrySet()){\r\n \t\ttestWriter.write(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \tSystem.out.printf(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \t}\r\n\r\n \t// Evaluate on the test data\r\n \tINDArray predicted = vgg16Transfer.outputSingle(features);\r\n \tint predFoundCounter = 0;\r\n \tSystem.out.println(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \t// Get predictions of NN for every input object\r\n \tint[][] labelsPredicted = predicted.toIntMatrix();\r\n \tfor (int i = 0; i < labelsPredicted.length; i++) {\r\n \tfor (int j = 0; j < labelsPredicted[i].length; j++) {\r\n \tpredFoundCounter++;\r\n \tif(labelsPredicted[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=predicted class label\r\n \tpredFoundCounter = 0;\r\n \tthis.predictions.put(this.addresses.get(addrCounter), j);\r\n \t}\r\n \telse {\r\n \tif (predFoundCounter == 3) {\r\n \t// To fix bug when searching positive predictions\r\n \tthis.predictions.put(this.addresses.get(addrCounter), 2);\r\n \t}\r\n \t}\r\n \t}\r\n \taddrCounter++;\r\n \t}\r\n \tSystem.out.println(\"\\nPredicted:\");\r\n \ttestWriter.write(\"\\nPredicted:\");\r\n \t// Print predictions\r\n \tfor(Map.Entry<String, Integer> pred : rightAnswers.entrySet()){\r\n \tSystem.out.printf(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString());\r\n \ttestWriter.write(String.format(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString()));\r\n \t}\r\n \tmetaDataCounter++;\r\n\r\n \teval.eval(labels, predicted);\r\n \t}\r\n\r\n \tSystem.out.println(\"\\n\\n Cheack loaded model on test data...\");\r\n \tSystem.out.println(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \tSystem.out.println(eval.stats());\r\n \tSystem.out.println(eval.confusionToString());\r\n \ttestWriter.write(\"\\n\\n Cheack loaded model on test data...\");\r\n \ttestWriter.write(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \ttestWriter.write(eval.stats());\r\n \ttestWriter.write(eval.confusionToString());\r\n\r\n \t// Save test rates\r\n \tthis.f1_score = eval.f1();\r\n \tthis.recall_score = eval.recall();\r\n \tthis.accuracy_score = eval.accuracy();\r\n \tthis.precision_score = eval.precision();\r\n \tthis.falseNegativeRate_score = eval.falseNegativeRate();\r\n \tthis.falsePositiveRate_score = eval.falsePositiveRate();\r\n\r\n \tthis.f1.setText(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \tthis.recall.setText(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \tthis.accuracy.setText(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \tthis.precision.setText(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \tthis.falseNegativeRate.setText(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \tthis.falsePositiveRate.setText(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n \r\n \ttestWriter.write(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \ttestWriter.write(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \ttestWriter.write(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \ttestWriter.write(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \ttestWriter.write(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \ttestWriter.write(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n\r\n \tshowBarChart();\r\n \t} catch (IOException e) {\r\n \t\tSystem.err.println(\"Error while writing to log file\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }",
"public static void evaluateFitnesses() {\n for (Polynomial p : Population) {\n p.setRawFitness(getRawFitness(p, data));\n if (debug) {\n printPopulation(true);\n }\n }\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public void recommended() {\n MainActivity activity = (MainActivity) getActivity();\n ArrayList<Integer> results = new ArrayList<>();\n int highest = 0;\n for (int i = 0; i < activity.getUserLocations().size(); i++) {\n int lid = activity.database.getLocID(1, activity.userLocations.get(i).getProvider());\n ArrayList<LocationMoodObject> locmood = activity.database.getLocMood(lid);\n int result = 0;\n\n for (int j = 0; j < locmood.size(); j++) {\n switch (locmood.get(j).mood) {\n case (1):\n result = result + 1;\n break;\n case (2):\n result = result + 2;\n break;\n case (3):\n result = result + 3;\n break;\n case (4):\n result = result + 4;\n break;\n case (5):\n result = result + 5;\n break;\n }\n }\n if (locmood.size()>0){\n result = result / locmood.size();\n results.add(result);}\n\n }\n\n for (int i = 0; i < results.size(); i++) {\n if (results.get(i) > highest) {\n highest = results.get(i);\n }\n }\n\n recommended = activity.userLocations.get(highest).getProvider();\n }",
"public int evaluate() {\n\t\treturn history + heuristic;\n\t}",
"void evaluate()\n\t{\n\t\toperation.evaluate();\n\t}",
"public double[] runOptimizer() {\n List<Integer> sents = new ArrayList<Integer>();\n for(int i=0; i<sentNum; i++)\n sents.add(i);\n \n if(needShuffle)\n Collections.shuffle(sents);\n \n double oraMetric, oraScore, predMetric, predScore;\n double[] oraPredScore = new double[4];\n double eta = 1.0; //learning rate, will not be changed if run percep\n double avgEta = 0; //average eta, just for analysis\n double loss = 0;\n double featNorm = 0;\n double featDiffVal;\n double sumMetricScore = 0;\n double sumModelScore = 0;\n String oraFeat = \"\";\n String predFeat = \"\";\n String[] oraPredFeat = new String[2];\n String[] vecOraFeat;\n String[] vecPredFeat;\n String[] featInfo;\n boolean first = true;\n //int processedSent = 0;\n Iterator it;\n Integer diffFeatId;\n double[] avgLambda = new double[initialLambda.length]; //only needed if averaging is required\n for(int i=0; i<initialLambda.length; i++)\n avgLambda[i] = 0.0;\n\n //update weights\n for(Integer s : sents) {\n //find out oracle and prediction\n if(first)\n findOraPred(s, oraPredScore, oraPredFeat, initialLambda, featScale);\n else\n findOraPred(s, oraPredScore, oraPredFeat, finalLambda, featScale);\n \n //the model scores here are already scaled in findOraPred\n oraMetric = oraPredScore[0];\n oraScore = oraPredScore[1];\n predMetric = oraPredScore[2];\n predScore = oraPredScore[3];\n oraFeat = oraPredFeat[0];\n predFeat = oraPredFeat[1];\n \n //update the scale\n if(needScale) { //otherwise featscale remains 1.0\n sumMetricScore += java.lang.Math.abs(oraMetric+predMetric);\n sumModelScore += java.lang.Math.abs(oraScore+predScore)/featScale; //restore the original model score\n \n if(sumModelScore/sumMetricScore > scoreRatio)\n featScale = sumMetricScore/sumModelScore;\n\n /* a different scaling strategy \n if( (1.0*processedSent/sentNum) < sentForScale ) { //still need to scale\n double newFeatScale = java.lang.Math.abs(scoreRatio*sumMetricDiff / sumModelDiff); //to make sure modelScore*featScale/metricScore = scoreRatio\n \n //update the scale only when difference is significant\n if( java.lang.Math.abs(newFeatScale-featScale)/featScale > 0.2 )\n featScale = newFeatScale;\n }*/\n }\n// processedSent++;\n\n HashMap<Integer, Double> allOraFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> allPredFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> featDiff = new HashMap<Integer, Double>();\n\n vecOraFeat = oraFeat.split(\"\\\\s+\");\n vecPredFeat = predFeat.split(\"\\\\s+\");\n \n for (int i = 0; i < vecOraFeat.length; i++) {\n featInfo = vecOraFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allOraFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n featDiff.put(diffFeatId, Double.parseDouble(featInfo[1]));\n }\n\n for (int i = 0; i < vecPredFeat.length; i++) {\n featInfo = vecPredFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allPredFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n\n if (featDiff.containsKey(diffFeatId)) //overlapping features\n featDiff.put(diffFeatId, featDiff.get(diffFeatId)-Double.parseDouble(featInfo[1]));\n else //features only firing in the 2nd feature vector\n featDiff.put(diffFeatId, -1.0*Double.parseDouble(featInfo[1]));\n }\n\n if(!runPercep) { //otherwise eta=1.0\n featNorm = 0;\n\n Collection<Double> allDiff = featDiff.values();\n for(it =allDiff.iterator(); it.hasNext();) {\n featDiffVal = (Double) it.next();\n featNorm += featDiffVal*featDiffVal;\n }\n \n //a few sanity checks\n if(! evalMetric.getToBeMinimized()) {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score+ora_metric > pred_score+pred_metric\n * pred_score-pred_metric > ora_score-ora_metric\n * => ora_metric > pred_metric */\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be greater than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for max-metric oracle selection or min-metric prediction selection, the oracle metric \" +\n \t\t\"score must be greater than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n } else {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score-ora_metric > pred_score-pred_metric\n * pred_score+pred_metric > ora_score+ora_metric\n * => ora_metric < pred_metric */\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be smaller than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for min-metric oracle selection or max-metric prediction selection, the oracle metric \" +\n \"score must be smaller than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n }\n \n if(predSelectMode==2) {\n if(predScore+1e-10 < oraScore) {\n System.err.println(\"WARNING: for max-model prediction selection, the prediction model score must be greater than oracle model score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n //cost - margin\n //remember the model scores here are already scaled\n loss = evalMetric.getToBeMinimized() ? //cost should always be non-negative \n (predMetric-oraMetric) - (oraScore-predScore)/featScale: \n (oraMetric-predMetric) - (oraScore-predScore)/featScale;\n \n if(loss<0)\n loss = 0;\n\n if(loss == 0)\n eta = 0;\n else\n //eta = C < loss/(featNorm*featScale*featScale) ? C : loss/(featNorm*featScale*featScale); //feat vector not scaled before\n eta = C < loss/(featNorm) ? C : loss/(featNorm); //feat vector not scaled before\n }\n \n avgEta += eta;\n\n Set<Integer> diffFeatSet = featDiff.keySet();\n it = diffFeatSet.iterator();\n\n if(first) {\n first = false;\n \n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = initialLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n else {\n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = finalLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n \n if(needAvg) {\n for(int i=0; i<avgLambda.length; i++)\n avgLambda[i] += finalLambda[i];\n }\n }\n \n if(needAvg) {\n for(int i=0; i<finalLambda.length; i++)\n finalLambda[i] = avgLambda[i]/sentNum;\n }\n \n avgEta /= sentNum;\n System.out.println(\"Average learning rate: \"+avgEta);\n\n // the intitialLambda & finalLambda are all trainable parameters\n //if (!trainMode.equals(\"3\")) // for mode 3, no need to normalize sparse\n // feature weights\n //normalizeLambda(finalLambda);\n //else\n //normalizeLambda_mode3(finalLambda);\n\n /*\n * for( int i=0; i<finalLambda.length; i++ ) System.out.print(finalLambda[i]+\" \");\n * System.out.println(); System.exit(0);\n */ \n\n double initMetricScore = computeCorpusMetricScore(initialLambda); // compute the initial corpus-level metric score\n double finalMetricScore = computeCorpusMetricScore(finalLambda); // compute final corpus-level metric score // the\n\n // prepare the printing info\n int numParamToPrint = 0;\n String result = \"\";\n\n if (trainMode.equals(\"1\") || trainMode.equals(\"4\")) {\n numParamToPrint = paramDim > 10 ? 10 : paramDim; // how many parameters\n // to print\n result = paramDim > 10 ? \"Final lambda(first 10): {\" : \"Final lambda: {\";\n\n for (int i = 1; i < numParamToPrint; i++)\n // in ZMERT finalLambda[0] is not used\n result += finalLambda[i] + \" \";\n } else {\n int sparseNumToPrint = 0;\n if (trainMode.equals(\"2\")) {\n result = \"Final lambda(regular feats + first 5 sparse feats): {\";\n for (int i = 1; i <= regParamDim; ++i)\n result += finalLambda[i] + \" \";\n\n result += \"||| \";\n\n sparseNumToPrint = 5 < (paramDim - regParamDim) ? 5 : (paramDim - regParamDim);\n\n for (int i = 1; i <= sparseNumToPrint; i++)\n result += finalLambda[regParamDim + i] + \" \";\n } else {\n result = \"Final lambda(first 10 sparse feats): {\";\n sparseNumToPrint = 10 < paramDim ? 10 : paramDim;\n\n for (int i = 1; i < sparseNumToPrint; i++)\n result += finalLambda[i] + \" \";\n }\n }\n\n output.add(result + finalLambda[numParamToPrint] + \"}\\n\" + \"Initial \"\n + evalMetric.get_metricName() + \": \" + initMetricScore + \"\\nFinal \"\n + evalMetric.get_metricName() + \": \" + finalMetricScore);\n\n // System.out.println(output);\n\n if (trainMode.equals(\"3\")) {\n // finalLambda = baseline(unchanged)+disc\n for (int i = 0; i < paramDim; i++)\n copyLambda[i + regParamDim + 1] = finalLambda[i];\n\n finalLambda = copyLambda;\n }\n\n return finalLambda;\n }",
"float getEvaluationResult();",
"@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }",
"public void infer() {\n runTime.setStartTime(System.currentTimeMillis());\n runTime.setIter(newModel.test_iters);\n System.out.println(\"Sampling \" + newModel.test_iters + \" testing iterations!\");\n\n for (int currentIter = 1; currentIter <= newModel.test_iters; currentIter++) {\n System.out.println(\"Iteration \" + currentIter + \"...\");\n\n for (int d = 0; d < newModel.D; d++) {\n\n for (int n = 0; n < newModel.corpus.docs[d].length; n++){\n HiddenVariable hv = infSZSampling(d, n);\n newModel.sAssign[d][n] = hv.sentiment;\n newModel.zAssign[d][n] = hv.topic;\n }\n } // end for each document\n } // end iterations\n runTime.setEndTime(System.currentTimeMillis());\n System.out.println(\"Gibbs sampling for inference completed!\");\n System.out.println(\"Saving the inference outputs!\");\n\n computeNewPi();\n computeNewTheta();\n computeNewPhi();\n newModel.computePerplexity();\n newModel.evaluateSentiment();\n newModel.saveModel(oldModel.modelName + \"-inference\", runTime);\n newModel.corpus.localDict.writeWordMap(option.model_dir + File.separator + oldModel.modelName + \"-inference\" + Model.wordMapSuffix);\n\n }",
"@Test\n public void testScoreUpdate() {\n try {\n final BestEvalScore score = new BestEvalScore(\"thjtrfwaw\");\n double expected = 0;\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n final Evaluation eval = new Evaluation(2);\n eval.eval(0,1);\n eval.eval(1,1);\n\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(0,1);\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(1,1);\n eval.eval(1,1);\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to create instance!\", e);\n }\n\n\n }",
"public static void evaluate(final MLRegression network,\r\n \t\t\tfinal MLDataSet training) {\r\n \t\tint weekNo = ConfigLoto.HI_WEEKNO + 2;\r\n \r\n \t//\tfor (final MLDataPair pair : training) {\r\n \tfor (int i = 0; i < training.size(); i++) {\r\n \t\tfinal MLDataPair pair = training.get(i);\r\n \t\tMLData calculatedOutput = network.compute(pair.getInput());\r\n \t\t\t\r\n \t\t\tlog.debug(\"Predict WeekNo= \" + weekNo++);\r\n \t\t\tlog.debug(\"Input= \"\r\n \t\t\t\t\t+ ConfigLoto.formatData(pair.getInput(), PRECISION));\r\n \t\t\tlog.debug(\"Predict= \" // actual\r\n \t\t\t\t\t+ ConfigLoto.formatData(calculatedOutput, PRECISION + 2));\r\n \t\t\t\r\n \t\t\t// for set12 get the real output from next pair\r\n \t\t\tMLData nextWeekIdeal = null;\r\n \t\t\tif (i < (training.size()-1)){\r\n\t\t\t\t nextWeekIdeal = training.get(i+1).getIdeal();\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\t nextWeekIdeal = pair.getIdeal();\r\n \t\t\t}\r\n \t\t\tlog.debug(\"RealOutput= \" // ideal\r\n \t\t\t\t\t+ ConfigLoto.formatData(nextWeekIdeal, PRECISION));\r\n \r\n \t\t\tlog.debug(\"Success Report ---------\");\r\n \t\t\tConfigLoto.calculateSuccess(weekNo - 1, calculatedOutput,\r\n \t\t\t\t\tnextWeekIdeal);\r\n \t\t\t\r\n \t\t\tINSERTSAYISALPREDICT = \"INSERT INTO SAYISALPREDICT (`algo`, `targeterr` , `populationsize` , `populationdensity` ,\"\r\n \t\t\t\t\t+ \"`weekid` , `realoutput` , `successfulpredictcount`, `successfulpredict` , `predict`) VALUES (\";\r\n \t\t\tINSERTSAYISALPREDICT = INSERTSAYISALPREDICT\r\n \t\t\t\t\t+ INSERTSAYISALPREDICTPART1 + weekNo + \",\\\"\"\r\n \t\t\t\t\t+ ConfigLoto.formatData(nextWeekIdeal, PRECISION) + \"\\\",\";\r\n \t\t\t\r\n \t\t}\r\n \t}",
"public void run() throws Exception {\r\n\r\n\r\n LibSVM svm = new LibSVM();\r\n String svmOptions = \"-S 0 -K 2 -C 8 -G 0\"; //Final result: [1, -7 for saveTrainingDataToFileHybridSampling2 ]\r\n svm.setOptions(weka.core.Utils.splitOptions(svmOptions));\r\n System.out.println(\"SVM Type and Keranl Type= \" + svm.getSVMType() + svm.getKernelType());//1,3 best result 81%\r\n // svm.setNormalize(true);\r\n\r\n\r\n// load training data from .arff file\r\n ConverterUtils.DataSource source = new ConverterUtils.DataSource(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSSMOTE464Random.arff\");\r\n System.out.println(\"\\n\\nLoaded data:\\n\\n\" + source.getDataSet());\r\n Instances dataFiltered = source.getDataSet();\r\n dataFiltered.setClassIndex(0);\r\n\r\n // gridSearch(svm, dataFiltered);\r\n Evaluation evaluation = new Evaluation(dataFiltered);\r\n evaluation.crossValidateModel(svm, dataFiltered, 10, new Random(1));\r\n System.out.println(evaluation.toSummaryString());\r\n System.out.println(evaluation.weightedAreaUnderROC());\r\n double[][] confusionMatrix = evaluation.confusionMatrix();\r\n for (int i = 0; i < 2; i++) {\r\n for (int j = 0; j < 2; j++) {\r\n System.out.print(confusionMatrix[i][j] + \" \");\r\n\r\n }\r\n System.out.println();\r\n }\r\n System.out.println(\"accuracy for crime class= \" + (confusionMatrix[0][0] / (confusionMatrix[0][1] + confusionMatrix[0][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for other class= \" + (confusionMatrix[1][1] / (confusionMatrix[1][1] + confusionMatrix[1][0])) * 100 + \"%\");\r\n System.out.println(\"accuracy for crime class= \" + evaluation.truePositiveRate(0) + \"%\");\r\n System.out.println(\"accuracy for other class= \" + evaluation.truePositiveRate(1) + \"%\");\r\n\r\n\r\n }",
"public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\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}",
"@Test\n public void applyFitness() {\n final List<TrainingListener> listeners = new ArrayList<>();\n final MockModel model = new MockModel() {\n @Override\n public void setListeners(Collection<TrainingListener> listenersToSet) {\n listeners.clear();\n listeners.addAll(listenersToSet);\n }\n\n @Override\n public void addListeners(TrainingListener... listener) {\n listeners.addAll(Stream.of(listener).collect(Collectors.toList()));\n }\n\n @Override\n public long numParams() {\n return (long)(5* 1e4);\n }\n\n @Override\n public double score() {\n return 1.23451234;\n }\n };\n final FitnessPolicy<ModelAdapter> policy = new FitnessPolicyTraining<>(3);\n final double[] measuredScore = {-1};\n\n policy.apply(new ModelAdapter() {\n @Override\n public void fit(DataSetIterator iter) {\n throw new UnsupportedOperationException(\"Not implemented!\");\n }\n\n @Override\n public <T extends IEvaluation> T[] eval(DataSetIterator iter, T... evals) {\n throw new UnsupportedOperationException(\"Not implemented!\");\n }\n\n @Override\n public Model asModel() {\n return model;\n }\n }, fitness -> measuredScore[0] = fitness);\n\n assertEquals(\"Incorrect number of training listeners\", 1, listeners.size());\n\n // Bleh! Hardcoded knowledge of TrainingListener implementation!\n listeners.forEach(listener -> listener.iterationDone(model, 0, 0));\n listeners.forEach(listener -> listener.onEpochEnd(model));\n assertEquals(\"No fitness shall have been reported!\", -1d, measuredScore[0], 1e-10);\n\n listeners.forEach(listener -> listener.iterationDone(model, 1, 0));\n listeners.forEach(listener -> listener.onEpochEnd(model));\n assertEquals(\"No fitness shall have been reported!\", -1d, measuredScore[0], 1e-10);\n\n listeners.forEach(listener -> listener.iterationDone(model, 2, 0));\n listeners.forEach(listener -> listener.onEpochEnd(model));\n assertEquals(\"Incorrect fitness!\", 1.235005, measuredScore[0], 1e-10);\n }",
"Result evaluate();",
"public void calculateProbabilities(){\n\t}",
"@Override\n\tprotected AbstractFitnessResult[] multipleEvaluation(ReactionNetwork network){\n\t\tAbstractFitnessResult[] results = super.multipleEvaluation(network);\n\t\tRDMultiobjectivePatternFitnessResult[] results2 = new RDMultiobjectivePatternFitnessResult[results.length];\n\t\t\n\t\tfor(int i= 0; i< results.length; i++){\n\t\t\tresults2[i] = (RDMultiobjectivePatternFitnessResult) results[i];\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<multievaluationObjs.size(); i++){\n\t\t\tdouble fit = multievaluationObjs.get(i).evaluateScore(results2);\n\t\t\tfor(int j = 0; j<results2.length; j++){\n\t\t\t\tresults2[j].addFit(fit);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn results2;\n\t}",
"public interface ListEvaluation extends Metric {\n /**\n * Adds generated list for a specific user for internal calculation\n * \n * @param user\n * A target {@link User} which normally comes from test data\n * @param list\n * Generate item list with related predicted rating for a given\n * {@link User}\n */\n void addRecommendations(User user, Map<Integer, Float> list);\n\n /**\n * Returns the calculated result\n * \n * @return The calculated result\n */\n float getEvaluationResult();\n \n /**\n * Set train data. Train data neede for some metrics such as popularity\n * @param trainData\n */\n void setTrainData(DataModel trainData);\n}",
"public double Learn()\n\t{\n\t\t// initialize the data structures\n\t\tInitialize();\n\t\tfor(int iter = 0; iter < 1000; iter++)\n\t\t\tLearnFOnlyW();\n\t\t\n\t\tList<Double> lossHistory = new ArrayList<Double>();\n\t\tlossHistory.add(Double.MIN_VALUE);\n\t\t\n\t\t// apply the stochastic gradient descent in a series of iterations\n\t\tfor(int iter = 0; iter < maxIter; iter++)\n\t\t{\n\t\t\t// learn the shapelets and the weights\n\t\t\tLearnF();\n\t\t\t\n\t\t\t// measure the loss\n\t\t\tif( iter % 500 == 0)\n\t\t\t{\n\t\t\t\tdouble mcrTrain = GetMCRTrainSet();\n\t\t\t\tdouble mcrTest = GetMCRTestSet();\n\t\t\t\t\n\t\t\t\tdouble lossTrain = AccuracyLossTrainSet();\n\t\t\t\tdouble lossTest = AccuracyLossTestSet();\n\t\t\t\t\n\t\t\t\tlossHistory.add(lossTrain);\n\t\t\t\t\n\t\t\t\tLogging.println(\"It=\" + iter + \", lossTrain=\"+ lossTrain + \", lossTest=\"+ lossTest +\n\t\t\t\t\t\t\t\t\", MCRTrain=\" +mcrTrain + \", MCRTest=\" +mcrTest , LogLevel.DEBUGGING_LOG);\n\t\t\t\t\n\t\t\t\tif( Double.isNaN(lossTrain) )\n\t\t\t\t{\n\t\t\t\t\titer = 0;\n\t\t\t\t\teta /= 3;\n\t\t\t\t\t\n\t\t\t\t\tInitialize();\n\t\t\t\t\t\n\t\t\t\t\tLogging.println(\"Divergence detected. Restarting at eta=\" + eta, LogLevel.DEBUGGING_LOG);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//eta *= 0.9;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t// print shapelets for debugging purposes\n\t\t//PrintShapelets();\n\t\t\n\t\t//Logging.print(M_i, System.out, LogLevel.DEBUGGING_LOG); \n\t\t\n\t\treturn GetMCRTestSet(); \n\t}",
"@Override\n public double evaluate() throws Exception {\n return Math.log(getEx2().evaluate()) / Math.log(getEx2().evaluate());\n }",
"public double evaluate(Ranker ranker, List<RankList> rl) {\n/* 694 */ List<RankList> l = rl;\n/* 695 */ if (ranker != null)\n/* 696 */ l = ranker.rank(rl); \n/* 697 */ return this.testScorer.score(l);\n/* */ }",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"@Override\n\tpublic double evaluate() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"public void doValidation(int currentRound)\n {\n getData(currentRound);\n// System.out.println(\"training unterminated ones\");\n kMeans.setItems(trainingData.get(0));\n kMeans.k=k1;\n kMeans.init();\n List<Cluster> unterminatedClusters=kMeans.doCluster();\n for (int i=0;i<unterminatedClusters.size();i++)\n {\n unterminatedClusters.get(i).label=0;\n }\n \n// System.out.println(\"training terminated ones\");\n kMeans.setItems(trainingData.get(1));\n kMeans.k=k2;\n kMeans.init();\n List<Cluster> terminatedClusters=kMeans.doCluster();\n for (int i=0;i<terminatedClusters.size();i++)\n {\n terminatedClusters.get(i).label=1;\n }\n \n List<Cluster> clusters=new ArrayList<Cluster>();\n clusters.addAll(unterminatedClusters);\n clusters.addAll(terminatedClusters);\n kMeans.setClusters(clusters);\n int[] corrects=new int[2];\n int[] counts=new int[2];\n for (int i=0;i<2;i++)\n {\n corrects[i]=0;\n counts[i]=0;\n }\n for (Item item:testData)\n {\n int label=kMeans.getNearestCluster(item).label;\n counts[label]++;\n if (label==item.type)\n {\n corrects[item.type]++;\n }\n }\n correctness+=corrects[1]*1.0/counts[1];\n correctCount+=corrects[1];\n// for (int i=0;i<2;i++)\n// System.out.println(\"for type \"+i+\": \" +corrects[i]+\" correct out of \"+counts[i]+\" in total (\"+corrects[i]*1.0/counts[i]+\")\");\n }",
"private void runAlgorithm(){\n fitness = new ArrayList<Double>(); \n \n int iter = 0;\n \n // While temperature higher than absolute temperature\n this.temperature = getCurrentTemperature(0);\n while(this.temperature > this.p_absoluteTemperature && iter < 100000){\n //while(!stopCriterionMet()){\n // Select next state\n //for(int i=0;i<20;i++){\n int count = 0;\n boolean selected = false;\n while(!selected){\n Problem.ProblemState next = nextState();\n if(isStateSelected(next)){\n selected = true;\n this.state = next;\n }\n \n count++;\n if(count == 10) break;\n }\n //}\n \n // Sample data\n double fvalue = this.state.getFitnessValue();\n this.fitness.add(new Double(fvalue));\n \n iter = iter + 1;\n \n // Lower temperature\n this.temperature = getCurrentTemperature(iter);\n }\n \n this.n_iter = iter;\n return;\n }",
"@Override\n\tpublic int evaluate(){\n\t\treturn term.evaluate() + exp.evaluate();\n\t}",
"private double findAccuracy(){\n double[] prediciton = this.learner.test(this.VS);\n ClassificationEvaluator CE = new ClassificationEvaluator(prediciton, this.VS);\n double tmp = CE.returnAccuracy(); //find accuracy\n return tmp;\n }",
"protected abstract void calculateAccuracy(List<S> bestPath, List<O> observation);",
"private void updatePrecisionAndRecallAndAp(List<ScoreRetrieval> results, List<QuerieDocRelevance> queryRelevance){\n List<Double> precisionQuerieAP = new ArrayList<>();\n List<Double> precisionQuerieAPRankedTop = new ArrayList<>();\n int tp=0;\n int fp=0;\n int fn=0;\n int cont=0;\n int rankMax=10;\n \n //results.stream().map(ScoreRetrieval::getDocId).filter( docId -> querieRelevance.contains(docId)).mapToInt(List::size).sum();\n \n for(ScoreRetrieval result : results){\n if(queryRelevance.stream().filter(o -> o.getDocID()==result.getDocId()).findFirst().isPresent()){ \n tp++;\n precisionQuerieAP.add(tp/(double)(tp+fp));\n if(cont<rankMax){\n precisionQuerieAPRankedTop.add(tp/(double)(tp+fp));\n }\n }else{\n fp++;\n }\n cont++;\n }\n if(precisionQuerieAP.isEmpty()){\n apRes.add(0.0);\n }else{\n apRes.add(precisionQuerieAP.stream().mapToDouble(d->d).sum()/precisionQuerieAP.size());\n }\n if(precisionQuerieAPRankedTop.isEmpty()){\n apResRankedTopLimited.add(0.0);\n }else{\n apResRankedTopLimited.add(precisionQuerieAPRankedTop.stream().mapToDouble(d->d).sum()/precisionQuerieAPRankedTop.size());\n }\n \n \n for(QuerieDocRelevance querieRel : queryRelevance){\n if(!(results.stream().filter(q -> q.getDocId()==querieRel.getDocID()).findFirst().isPresent())){\n fn++; \n }\n }\n \n precision.add(tp/(double)(tp+fp));\n recall.add(tp/(double)(tp+fn));\n }",
"@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }",
"public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}",
"public abstract double evaluer(SolutionPartielle s);",
"@Override\r\n\tpublic int getMaxEvaluations() {\n\t\treturn 0;\r\n\t}",
"public Table<Alternative, Criterion, Double> getEvaluations() {\n\t\treturn evals ;\n\t }",
"public static void evaluation(List<Tweet> tweets){\n\t\tEvaluator eval = new Evaluator();\n\t\tint[][] confusionMatrix = eval.computeConfusionMatrix(tweets);\n\n\t\t// Variables for calculation of the micro and macro accuracy.\n\t\tint allTp = 0;\n\t\tint allFn = 0;\n\t\tint allFp = 0;\n\t\tint allTn = 0;\n\t\tdouble macroAccuracy = 0.0;\n double macroPrecision = 0.0;\n double macroRecall = 0.0;\n double macroFscore = 0.0;\n\n\n\t\t// System.out.println(confusionMatrix.keySet());\n\t\t// Outputting the evaluation for each label.\n\t\tfor (Labels label : Labels.values()) {\n\t\t\tint tp = eval.computeTP(confusionMatrix, label);\n\t\t\tallTp = allTp + tp;\n\t\t\tint fn = eval.computeFN(confusionMatrix, label);\n\t\t\tallFn = allFn + fn;\n\t\t\tint fp = eval.computeFP(confusionMatrix, label);\n\t\t\tallFp = allFp + fp;\n\t\t\tint tn = eval.computeTN(confusionMatrix, label);\n\t\t\tallTn = allTn + tn;\n\n\t\t\tdouble precision = eval.getPrecision(tp, fp);\n\t\t\tdouble recall = eval.getRecall(tp, fn);\n double fscore = eval.getFScore(precision, recall);\n\t\t\tmacroAccuracy = macroAccuracy + eval.getAccuracy(tp, fn, fp, tn);\n\n macroPrecision += precision;\n macroRecall += recall;\n macroFscore += fscore;\n\n\t\t\tSystem.out.println(\"********* Outputting the evaluation results for \" + label.toString() + \" *********\");\n\t\t\tSystem.out.println(label.toString() + \"\\t\\t TP: \" + tp + \"\\t FN: \" + fn + \"\\t FP: \" + fp + \"\\t TN: \" + tn);\n\t\t\tSystem.out.println(\"\\t\\t Precision: \" + precision);\n\t\t\tSystem.out.println(\"\\t\\t Recall: \" + recall);\n\t\t\tSystem.out.println(\"\\t\\t FScore: \" + fscore);\n\t\t\tSystem.out.println(\"\\t\\t Accuracy: \" + eval.getAccuracy(tp, fn, fp, tn));\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\t// Outputting the accuracy for all labels.\n\t\tSystem.out.println(\"********* Outputting the macro/micro accuracy for all labels *********\");\n\t\tSystem.out.println(\"Macro-Precision: \" + macroPrecision/Labels.getSize());\n System.out.println(\"Macro-Recall: \" + macroRecall/Labels.getSize());\n System.out.println(\"Macro-Fscore: \" + macroFscore/Labels.getSize());\n\t\tSystem.out.println(\"Macro-Accuracy: \" + macroAccuracy / Labels.getSize());\n\t}",
"public double evaluate(boolean pSave) {\r\n \t\tdouble result = 0.0;\r\n \t\tEnumeration args = getAllArguments().elements();\r\n \t\twhile (args.hasMoreElements()) {\r\n \t\t\tArgument arg = (Argument) args.nextElement();\r\n \t\t\t// System.out.println(\"relevant argument: \" + arg.toString());\r\n \t\t\tresult += arg.evaluate();\r\n \t\t}\r\n \r\n \t\t// should we take into account anyone pre-supposing or opposing us?\r\n \t\tRationaleDB db = RationaleDB.getHandle();\r\n \t\tVector dependent = db.getDependentAlternatives(this, ArgType.OPPOSES);\r\n \t\tIterator depI = dependent.iterator();\r\n \t\twhile (depI.hasNext()) {\r\n \t\t\tAlternative depA = (Alternative) depI.next();\r\n \t\t\tif (depA.getStatus() == AlternativeStatus.ADOPTED) {\r\n \t\t\t\tresult += -10; // assume amount is MAX\r\n \t\t\t}\r\n \t\t}\r\n \t\tdependent = db.getDependentAlternatives(this, ArgType.PRESUPPOSES);\r\n \t\tdepI = dependent.iterator();\r\n \t\twhile (depI.hasNext()) {\r\n \t\t\tAlternative depA = (Alternative) depI.next();\r\n \t\t\tif (depA.getStatus() == AlternativeStatus.ADOPTED) {\r\n \t\t\t\tresult += 10; // assume amount is MAX\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// System.out.println(\"setting our evaluation = \" + new\r\n \t\t// Double(result).toString());\r\n \t\tsetEvaluation(result);\r\n \r\n \t\tif (pSave) {\r\n \t\t\t// /\r\n \t\t\t// TODO This was added to get the integrated editors\r\n \t\t\t// updating correctly, however would be better suited\r\n \t\t\t// in a seperate function which is then refactored\r\n \t\t\t// outward so other places in SEURAT use it.\r\n \t\t\tConnection conn = db.getConnection();\r\n \t\t\tStatement stmt = null;\r\n \t\t\tResultSet rs = null;\r\n \t\t\ttry {\r\n \t\t\t\tstmt = conn.createStatement();\r\n \r\n \t\t\t\t// TODO Function call here is really hacky, see\r\n \t\t\t\t// the function inDatabase()\r\n \t\t\t\tif (inDatabase()) {\r\n \t\t\t\t\tString updateParent = \"UPDATE alternatives \"\r\n \t\t\t\t\t\t+ \"SET evaluation = \"\r\n \t\t\t\t\t\t+ new Double(evaluation).toString() + \" WHERE \"\r\n \t\t\t\t\t\t+ \"id = \" + this.id + \" \";\r\n \t\t\t\t\tstmt.execute(updateParent);\r\n \r\n \t\t\t\t\t// Broadcast Notification That Score Has Been Recomputed\r\n \t\t\t\t\tm_eventGenerator.Updated();\r\n \t\t\t\t} else {\r\n \t\t\t\t\t// If The RationaleElement Wasn't In The Database There\r\n \t\t\t\t\t// Is No Reason To Attempt To Save The Evaluation Score\r\n \t\t\t\t\t// Or Broadcast A Notification About It\r\n \t\t\t\t}\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tSystem.out.println(\"Exception while saving evaluation score to database\");\r\n \t\t\t} finally {\r\n \t\t\t\tRationaleDB.releaseResources(stmt, rs);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn result;\r\n \t}",
"@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }",
"private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}",
"public Sample run() {\n\t\t// termination criterion\n\t\tint runsUnchanged = 0;\n\t\tboolean terminated = false;\n\t\tdouble prevBestSampleFit = 0; // remember to set this at some\n\t\t\t\t\t\t\t\t\t\t// point\n\t\tint runs = 0; // testing, remove\n\n\t\t System.out.println(\"Evaluating Particles\");\n\t\t// 1) evaluate all particles\n\t\t// 2) set gBest\n\t\tdouble maxFit = problem.getWorstValue();\n\t\tfor (Particle p : pop) {\n\t\t\tp.calcFitness();\n\n\t\t\t// number of evals done is incremented by numSamples\n\t\t\tnumFitnessEvals += numSamples;\n\n\t\t\tdouble fit = p.getBestSample().getFitness();\n\t\t\t// find initial gBest\n\t\t\tif (problem.compare(maxFit, fit) == 1) {\n\t\t\t\tmaxFit = fit;\n\t\t\t\tbestSample = p.getBestSample();\n\t\t\t\tgBest = p.copy();\n\t\t\t\t System.out.println(\"Global best:\");\n\t\t\t\t bestSample.print();\n\t\t\t}\n\t\t}\n\n\t\twhile (!terminated) {\n\t\t\t System.out.println(\"\\n \\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\");\n\t\t\t System.out.println(\" %%%%%%%%%%%%% RUN \" + runs);\n\t\t\t System.out.println(\" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\");\n\n\t\t\t// iterate through all particles\n\t\t\tfor (Particle p : pop) {\n\t\t\t\t// System.out.println(\"\\n >>>> Particle \");\n\t\t\t\t// p.print();\n\n\t\t\t\t// 1) update velocity\n//\t\t\t\tSystem.out.println(\">> Velocity Update\");\n\t\t\t\tp.updateVelocity(omega, phi1, phi2, gBest);\n\n\t\t\t\t// 2) update position\n//\t\t\t\tSystem.out.println(\">> Position Update \");\n\t\t\t\tp.updatePosition();\n\t\t\t\t// p.print();\n\n\t\t\t\t// 2.5) change the previous best sample fitness\n\t\t\t\tprevBestSampleFit = bestSample.getFitness();\n\n\t\t\t\t// 3) evaluate fitness\n//\t\t\t\tSystem.out.println(\">> Fitness Calc\");\n\t\t\t\tdouble fit = p.calcFitness(); // this is never used\n\t\t\t\t// number of evals done is incremented by numSamples\n\t\t\t\tnumFitnessEvals += numSamples;\n\n\t\t\t\tdouble sampleFit = p.getBestSample().getFitness();\n\n\t\t\t\t// System.out.println(\"Sample fitness: \" + sampleFit + \" >? Best\n\t\t\t\t// fitness: \" + bestSample.getFitness());\n\n\t\t\t\t// compares and adjusts gBest\n\t\t\t\tif (problem.compare(bestSample.getFitness(), sampleFit) == 1) {\n\t\t\t\t\tsetBestSample(p.getBestSample());\n\t\t\t\t\t// set gBest and bias\n\t\t\t\t\tsetGBest(p);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// updating fitness for evaluation\n\t\t\tfitnesses.add(bestSample.getFitness());\n\n\t\t\t// Next half-dozen or so lines used to determine convergence\n\t\t\tif (Math.abs(prevBestSampleFit - bestSample.getFitness()) < threshold) {\n\t\t\t\trunsUnchanged++;\n\t\t\t} else {\n\t\t\t\trunsUnchanged = 0;\n\t\t\t}\n\t\t\tif (runsUnchanged >= numToConsiderConverged) {\n\t\t\t\t// return if the solution hasn't significantly changed in a\n\t\t\t\t// certain\n\t\t\t\t// number of iterations\n\t\t\t\tterminated = true;\n\t\t\t}\n\t\t\truns++;\n\t\t\t// System.out.println(\">>>>>> RUNS: \" + runs);\n\t\t}\n\n\t\tSystem.out.println(\"Returning best sample:\");\n\t\tbestSample.print();\n\t\tSystem.out.println(\"Fitness: \" + bestSample.getFitness());\n\n\t\tSystem.out.println(\"Fitness Aross Evals:\");\n\t\tfor (Double d : fitnesses) {\n\t\t\tSystem.out.print(d + \" \");\n\t\t}\n\t\tSystem.out.println();\n\n\t\treturn bestSample;\n\t}",
"@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }",
"public void prediction() {\n\t\txPriorEstimate = xPreviousEstimate;\n\t\tpPriorCovarianceError = pPreviousCovarianceError;\n\t}",
"void ComputeFitnessBefore(){\n\t\t\t\tint i, pos;\n\t\t\t\t// individual t;\n\t\t\t\tdouble min, sum = 0, tm;\n\t\t\t\t// First Compute Raw fitness\n\t\t\t\tfor(i = 0; i < poplen; i++)\n\t\t\t\t{\n\t\t\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t\t\t}\n\t\t\t\t//tim individual co fitness be nhat\n\t\t\t\tmin = oldpop[0].fitness;\t\t\t\n\t\t\t\tsum = oldpop[0].fitness;\t\t\t\n\t\t\t\t\n\t\t\t\tfor(i = 1; i < poplen; i++) {\n\t\t\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\t\t\tmin = oldpop[i].fitness;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsum += oldpop[i].fitness;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// copy the best and average\n//\t\t\t\tbestBeforeFitness[gen]=min;\n//\t\t\t\tavgBeforeFitness[gen]=sum/poplen;\n//\t\t\t\tbestcurrent[gen] = new individual();\n//\t\t\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n//\t\t\t\taverage[gen] = sum /poplen;\t\t\t\n\t\t\t\t\n\t\t\t}",
"public void recommendMovie()\n {\n r.recommendMovie();\n }",
"@Override\r\n public Evaluation getEvaluation ()\r\n {\r\n return evaluation;\r\n }",
"protected double evaluate(IChromosome chromosome) {\n\t double score = 0;\n\t \t \n\t List dups = new ArrayList();\n\t int badSolution = 1;\n\n\t for (int i = 0; i < chromosome.size(); i++) {\n\n\t //IntegerGene agene = (IntegerGene) chromosome.getGene(i);\n\t //System.out.println(agene);\n\t int index = (Integer) chromosome.getGene(i).getAllele();\n\t \n\t if (dups.contains(index)) {\n\t badSolution = 0;\n\t } else {\n\t dups.add(index);\n\t }\n\n\t Equipo equipo = (Equipo) equipos.get(index);\n\t double genreScore = getGenreScore(equipo);\n\t if (genreScore == 0) {\n\t badSolution = 0;\n\t }\n\t score = (score+genreScore);\n\n\t }\n\t \n\t return (score * badSolution);\n\t }",
"public void calculateMethod() {\n\n if (counter != 16) {\n ifElseCalculation();\n } else {\n ifElseCalculation();\n\n //saves final Points for 2nd Activity\n shareData();\n //opens 2nd Activity for Result\n Intent intent = new Intent(this, EditTextActivity.class);\n startActivity(intent);\n }\n\n /**\n * Set back all Buttons\n */\n checkedA = false;\n checkedB = false;\n checkedC = false;\n checkedD = false;\n\n /**\n * Set up all included Views for the next Question\n */\n nextQuestion();\n }",
"public void wekaCalculate()\n\t{\n\t\tfor (int categoryStep = 0; categoryStep < 6; categoryStep++)\n\t\t{\n\t\t\tString trainString = \"Train\";\n\t\t\tString testString = \"Test\";\n\t\t\tString categoryString;\n\t\t\tString resultString = \"Results\";\n\t\t\tString textString;\n\t\t\tString eventString;\n\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: categoryString = \"Cont.arff\"; break;\n\t\t\tcase 1: categoryString = \"Dona.arff\"; break;\n\t\t\tcase 2: categoryString = \"Offi.arff\"; break;\n\t\t\tcase 3: categoryString = \"Advi.arff\"; break;\n\t\t\tcase 4: categoryString = \"Mult.arff\"; break;\n\t\t\tdefault: categoryString = \"Good.arff\";\n\t\t\t}\n\t\t\t\n\t\t\tswitch (categoryStep)\n\t\t\t{\n\t\t\tcase 0: textString = \"Cont.txt\"; break;\n\t\t\tcase 1: textString = \"Dona.txt\"; break;\n\t\t\tcase 2: textString = \"Offi.txt\"; break;\n\t\t\tcase 3: textString = \"Advi.txt\"; break;\n\t\t\tcase 4: textString = \"Mult.txt\"; break;\n\t\t\tdefault: textString = \"Good.txt\";\n\t\t\t}\n\t\t\t\n\t\t\tfor (int eventStep = 0; eventStep < 15; eventStep++)\n\t\t\t{\n\t\t\t\tString trainingData;\n\t\t\t\tString testData;\n\t\t\t\tString resultText;\n\n\t\t\t\tswitch (eventStep)\n\t\t\t\t{\n\t\t\t\tcase 0: eventString = \"2011Joplin\"; break;\n\t\t\t\tcase 1: eventString = \"2012Guatemala\"; break; \n\t\t\t\tcase 2: eventString = \"2012Italy\"; break;\n\t\t\t\tcase 3: eventString = \"2012Philipinne\"; break;\n\t\t\t\tcase 4: eventString = \"2013Alberta\";\tbreak;\n\t\t\t\tcase 5: eventString = \"2013Australia\"; break;\n\t\t\t\tcase 6: eventString = \"2013Boston\"; break;\t\t\t\t\n\t\t\t\tcase 7: eventString = \"2013Manila\"; break;\n\t\t\t\tcase 8: eventString = \"2013Queens\"; break;\n\t\t\t\tcase 9: eventString = \"2013Yolanda\"; break;\n\t\t\t\tcase 10: eventString = \"2014Chile\"; break;\n\t\t\t\tcase 11: eventString = \"2014Hagupit\"; break;\n\t\t\t\tcase 12: eventString = \"2015Nepal\"; break;\n\t\t\t\tcase 13: eventString = \"2015Paris\"; break;\n\t\t\t\tdefault: eventString = \"2018Florida\"; \t\t\t\t\n\t\t\t\t}\n\n\t\t\t\ttrainingData = eventString;\n\t\t\t\ttrainingData += trainString;\n\t\t\t\ttrainingData += categoryString;\n\n\t\t\t\ttestData = eventString;\n\t\t\t\ttestData += testString;\n\t\t\t\ttestData += categoryString;\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tresultText = eventString;\n\t\t\t\tresultText += resultString;\n\t\t\t\tresultText += textString;\n\t\t\t\t\n\n\t\t\t\ttry {\n\t\t\t\t\tConverterUtils.DataSource loader1 = new ConverterUtils.DataSource(trainingData);\n\t\t\t\t\tConverterUtils.DataSource loader2 = new ConverterUtils.DataSource(testData);\n\n\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(resultText));\n\t\t\t\t\tInstances trainData = loader1.getDataSet();\n\t\t\t\t\ttrainData.setClassIndex(trainData.numAttributes() - 1);\n\n\t\t\t\t\tInstances testingData = loader2.getDataSet();\n\t\t\t\t\ttestingData.setClassIndex(testingData.numAttributes() - 1);\n\n\t\t\t\t\tClassifier cls1 = new NaiveBayes();\t\t\t\t\t\n\t\t\t\t\tcls1.buildClassifier(trainData);\t\t\t\n\t\t\t\t\tEvaluation eval1 = new Evaluation(trainData);\n\t\t\t\t\teval1.evaluateModel(cls1, testingData);\t\n\t\t\t\t\tbw.write(\"=== Summary of Naive Bayes ===\");\n\t\t\t\t\tbw.write(eval1.toSummaryString());\n\t\t\t\t\tbw.write(eval1.toClassDetailsString());\n\t\t\t\t\tbw.write(eval1.toMatrixString());\n\t\t\t\t\tbw.write(\"\\n\");\n\n\t\t\t\t\tthis.evalNaiveBayesList.add(eval1);\n\n\t\t\t\t\tClassifier cls2 = new SMO();\n\t\t\t\t\tcls2.buildClassifier(trainData);\n\t\t\t\t\tEvaluation eval2 = new Evaluation(trainData);\n\t\t\t\t\teval2.evaluateModel(cls2, testingData);\n\t\t\t\t\tbw.write(\"=== Summary of SMO ===\");\n\t\t\t\t\tbw.write(eval2.toSummaryString());\n\t\t\t\t\tbw.write(eval2.toClassDetailsString());\n\t\t\t\t\tbw.write(eval2.toMatrixString());\n\n\t\t\t\t\tthis.evalSMOList.add(eval2);\n\n\t\t\t\t\tbw.close();\n\t\t\t\t} catch (Exception e) {\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void Prediction() {\n System.out.println(\"\\nInput an x value: \");\n double x = inputs.nextDouble();\n double y = this.B0 + (this.B1 * x);\n System.out.println(\"The prediction made with \" + x + \" as the x value is: \" + y);\n System.out.println(\"\\nWhere y = B0 + (B1*xi) is substituted by:\\n y = \" + B0 + \" + (\" + B1 + \" * \" + x + \" )\\n\");\n }",
"protected abstract Value evaluate();",
"@Test(timeout = 4000)\n public void test094() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n NaiveBayesMultinomialUpdateable naiveBayesMultinomialUpdateable0 = new NaiveBayesMultinomialUpdateable();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[0];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) naiveBayesMultinomialUpdateable0, instances0, objectArray0);\n try { \n evaluation0.evaluateModelOnce(doubleArray0, (Instance) null);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"public double evaluate(Context context);",
"public void evaluate(String sampleFile, String featureDefFile, int nFold, String modelDir, String modelFile) {\n/* 839 */ evaluate(sampleFile, featureDefFile, nFold, -1.0F, modelDir, modelFile);\n/* */ }",
"@Override\r\n public void resetEvaluation ()\r\n {\r\n evaluation = null;\r\n }",
"@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }",
"public void training( Problem p, String[] policyArguments, int numEpisodes, int maxSteps ) {\n\t\te.assign( 0 );\n\t\tq.assign( 0 );\n\n\t\t// Yes, String policies are gross, but it is only needed for non GRRL policies\t\t\n\t\tif( policyArguments[0] == \"greedy\" ) {\n\t\t\tpolicy = 0;\n\t\t} else if( policyArguments[0] == \"epsilonGreedy\" ) {\n\t\t\tepsilon = Float.parseFloat( policyArguments[1] );\n\t\t\tpolicy = 1;\n\t\t}\t\t\n\n\t\tdouble runningScore = 0;\n\n\t\tDenseDoubleMatrix2D escale = new DenseDoubleMatrix2D( nStates, nActions );\n\t\t//escale.assign( gamma * lambda );\n\n\t\t// Now start the training\n\t\tfor( int episode = 0; episode < numEpisodes; episode++ ) {\n\t\t\tp.reset();// Initialize problem\n\n\t\t\te.assign( 0 );// Eligibility traces are reset for each episode\n\t\t\t//System.out.println( \"e sum \" + e.zSum() );\n\t\t\twhile (p.curStep<maxSteps && !p.isSolved()) {\n\t\t\t\t//\t\t\t\tSystem.err.println(\"Step\");\n\t\t\t\tState curState = p.getCurrentState();\n\t\t\t\tAction curAction = this.chooseAction( curState, p.possibleActions );\t\t\t\t\n\n\t\t\t\tp.stepForward(curAction);\n\n\t\t\t\tState nextState = p.getCurrentState();\n\n\t\t\t\tif( !curState.equals( nextState ) ) {\n\n\n\t\t\t\t\tdouble reward = p.getReward( nextState );\n\n\t\t\t\t\tAction nextAction = this.chooseAction( nextState, p.possibleActions );\n\n\t\t\t\t\tdouble curQ = q.get( curState.index(), curAction.index );\n\t\t\t\t\tdouble nextQ = q.get( nextState.index(), nextAction.index );\n\n\t\t\t\t\tdouble delta = reward + gamma * nextQ - curQ;\n\n\t\t\t\t\tif( verbosity > 10 )\n\t\t\t\t\t\tSystem.out.println( \"Delta = \" + delta + \" curQ \" + curQ + \" nextQ \" + nextQ + \" reward \" + reward);\n\t\t\t\t\t//double updatedQ = curQ + alpha * ( delta );\n\n\t\t\t\t\t// Increment state/action by 1\n\t\t\t\t\te.set( curState.index(), curAction.index, \n\t\t\t\t\t\t\te.get( curState.index(), curAction.index ) + 1 );\n\n\t\t\t\t\t// Trace * alpha * delta matrix\n\t\t\t\t\tescale = (DenseDoubleMatrix2D) e.copy();\n\t\t\t\t\tescale.assign( DoubleFunctions.mult( alpha * delta ) );\n\n\t\t\t\t\t// Update Qs\n\t\t\t\t\tq.assign( escale, DoubleFunctions.plus );\n\n\t\t\t\t\t// Update Es\t\t\t\t\n\t\t\t\t\t// Scale traces\n\t\t\t\t\te.assign( DoubleFunctions.mult( gamma * lambda ) );\t\t\t\t\n\n\t\t\t\t\tif( verbosity > 10 ) {\n\t\t\t\t\t\tSystem.out.println(\"============\\t\"+p.curStep+\"\\t============\");\n\t\t\t\t\t\tSystem.out.println(p.displayCurrentState());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trunningScore = p.curStep + 0.95 * runningScore; \n\n\t\t\tif( verbosity > 0 ) {\n\t\t\t\tSystem.out.println( \"Finished episode \" + episode + \" in \" + p.curStep + \" steps. Running score \" + runningScore );\n\t\t\t}\n\n\t\t}\n\t}",
"public abstract double evaluateSolution(Solution solution) throws JMException, SimulationException;",
"public void train() {\n while (!environment.inTerminalState()) {\n\n Action action = policy.chooseAction(environment);\n List<Double> stateAction = environment.getStateAction(action);\n\n double knownReward = environment.immediateReward(action);\n double totalReward = environment.performAction(action);\n double unknownReward = totalReward - knownReward;\n\n // Next state of environment is implicitly passed.\n backup(stateAction, unknownReward);\n }\n }",
"void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }",
"public void score(List<String> modelFiles, String testFile, String outputFile) {\n/* 1180 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1181 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1184 */ int nFold = modelFiles.size();\n/* */ \n/* 1186 */ List<RankList> samples = readInput(testFile);\n/* 1187 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1188 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1189 */ System.out.println(\"[Done.]\");\n/* */ try {\n/* 1191 */ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), \"UTF-8\"));\n/* 1192 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1194 */ List<RankList> test = testData.get(f);\n/* 1195 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1196 */ int[] features = ranker.getFeatures();\n/* 1197 */ if (normalize)\n/* 1198 */ normalize(test, features); \n/* 1199 */ for (RankList l : test) {\n/* 1200 */ for (int j = 0; j < l.size(); j++) {\n/* 1201 */ out.write(l.getID() + \"\\t\" + j + \"\\t\" + ranker.eval(l.get(j)) + \"\");\n/* 1202 */ out.newLine();\n/* */ } \n/* */ } \n/* */ } \n/* 1206 */ out.close();\n/* */ }\n/* 1208 */ catch (IOException ex) {\n/* */ \n/* 1210 */ throw RankLibError.create(\"Error in Evaluator::score(): \", ex);\n/* */ } \n/* */ }",
"public void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}",
"public static void recommend(final int nFolds, final String inPath, final String outPath) {\n for (int i = 0; i < nFolds; i++) {\n org.apache.mahout.cf.taste.model.DataModel trainModel;\n org.apache.mahout.cf.taste.model.DataModel testModel;\n try {\n trainModel = new FileDataModel(new File(inPath + \"train_\" + i + \".csv\"));\n testModel = new FileDataModel(new File(inPath + \"test_\" + i + \".csv\"));\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n GenericRecommenderBuilder grb = new GenericRecommenderBuilder();\n String recommenderClass = \"org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender\";\n String similarityClass = \"org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity\";\n int neighborhoodSize = NEIGH_SIZE;\n Recommender recommender = null;\n try {\n recommender = grb.buildRecommender(trainModel, recommenderClass, similarityClass, neighborhoodSize);\n } catch (RecommenderException e) {\n e.printStackTrace();\n }\n\n String fileName = \"recs_\" + i + \".csv\";\n\n LongPrimitiveIterator users;\n try {\n users = testModel.getUserIDs();\n boolean createFile = true;\n while (users.hasNext()) {\n long u = users.nextLong();\n assert recommender != null;\n List<RecommendedItem> items = recommender.recommend(u, trainModel.getNumItems());\n //\n List<RecommenderIO.Preference<Long, Long>> prefs = new ArrayList<>();\n for (RecommendedItem ri : items) {\n prefs.add(new RecommenderIO.Preference<>(u, ri.getItemID(), ri.getValue()));\n }\n //\n RecommenderIO.writeData(u, prefs, outPath, fileName, !createFile, null);\n createFile = false;\n }\n } catch (TasteException e) {\n e.printStackTrace();\n }\n }\n }",
"public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}",
"public void addEvaluations(Evaluation eval) {\n\t\t\tevals.put(eval.alt,eval.crit, eval.val);\n\n\t }",
"void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }",
"private static void runAll() throws InterruptedException {\r\n\t\tSystem.out.println(RankEvaluator.printTitle() + \"\\tAvgP\\tTrain Time\\tTest Time\");\r\n\t\t\r\n\t\t// Prefetching user/item similarity:\r\n\t\tif (userSimilarityPrefetch) {\r\n\t\t\tuserSimilarity = calculateUserSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tuserSimilarity = new SparseMatrix(userCount+1, userCount+1);\r\n\t\t}\r\n\t\t\r\n\t\tif (itemSimilarityPrefetch) {\r\n\t\t\titemSimilarity = calculateItemSimilarity(MATRIX_FACTORIZATION, ARC_COS, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\titemSimilarity = new SparseMatrix(itemCount+1, itemCount+1);\r\n\t\t}\r\n\t\t\r\n\t\t// Regularized SVD\r\n\t\tint[] svdRank = {1, 5, 10};\r\n\t\t\r\n\t\tfor (int r : svdRank) {\r\n\t\t\tdouble learningRate = 0.005;\r\n\t\t\tdouble regularizer = 0.1;\r\n\t\t\tint maxIter = 100;\r\n\t\t\t\r\n\t\t\tbaseline = new RegularizedSVD(userCount, itemCount, maxValue, minValue,\r\n\t\t\t\tr, learningRate, regularizer, 0, maxIter, false);\r\n\t\t\tSystem.out.println(\"SVD\\tFro\\t\" + r + \"\\t\" + testRecommender(\"SVD\", baseline));\r\n\t\t}\r\n\t\t\r\n\t\t// Rank-based SVD\r\n\t\tint[] rsvdRank = {1, 5, 10};\r\n\t\tfor (int r : rsvdRank) {\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOGISTIC_LOSS, r, 6000, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOG_LOSS_MULT, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.LOG_LOSS_ADD, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_LOSS_MULT, r, 370, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_LOSS_ADD, r, 25, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.HINGE_LOSS_MULT, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.HINGE_LOSS_ADD, r, 1700, true);\r\n\t\t\trunRankBasedSVD(RankEvaluator.EXP_REGRESSION, r, 40, true);\r\n\t\t}\r\n\t\t\r\n\t\t// Paired Global LLORMA\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 1, 1500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 5, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 5, 10, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 1, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 5, 2000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_MULT, 10, 10, 1000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 1, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 5, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 5, 10, 900, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 1, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 5, 3000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOG_LOSS_ADD, 10, 10, 2000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 1, 450, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 5, 250, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 5, 10, 110, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 1, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 5, 400, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_MULT, 10, 10, 200, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 1, 20, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 5, 13, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 5, 10, 7, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 1, 40, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 5, 25, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_LOSS_ADD, 10, 10, 15, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 1, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 5, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 5, 10, 300, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 1, 2000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 5, 1000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_MULT, 10, 10, 500, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 1, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 5, 1200, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 5, 10, 500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 1, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 5, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.HINGE_LOSS_ADD, 10, 10, 1000, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 1, 60, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 5, 40, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 5, 10, 20, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 1, 120, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 5, 80, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.EXP_REGRESSION, 10, 10, 40, true);\r\n\t\t\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 1, 4500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 5, 3500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 5, 10, 2500, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 1, 9000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 5, 7000, true);\r\n\t\trunPairedGlobalLLORMA(RankEvaluator.LOGISTIC_LOSS, 10, 10, 5000, true);\r\n\t}",
"@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }",
"public void experimentAndPlotter(){\n\t\tLearningAgentFactory qLearningFactory = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 1\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 1.);\n\t\t\t}\n\t\t};\n\n\t\tLearningAgentFactory qLearningFactory2 = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 0.5\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 0.5);\n\t\t\t}\n\t\t};\n\n\n\t\tLearningAlgorithmExperimenter exp = new LearningAlgorithmExperimenter(\n\t\t\tenv, 10, 50, qLearningFactory, qLearningFactory2);\n\t\texp.setUpPlottingConfiguration(500, 250, 2, 1000,\n\t\t\t\tTrialMode.MOST_RECENT_AND_AVERAGE,\n\t\t\t\tPerformanceMetric.STEPS_PER_EPISODE,\n\t\t\t\tPerformanceMetric.AVERAGE_EPISODE_REWARD);\n\n\t\texp.startExperiment();\n\t\texp.writeStepAndEpisodeDataToCSV(\"expData\");\n\n\t}",
"public void calculateMetrics(){\n //precision\n precisionFinal = precision.stream().mapToDouble(f -> f).sum()/precision.size();\n System.out.print(\"Precision: \");\n System.out.println(precisionFinal);\n //recall\n recallFinal = recall.stream().mapToDouble(f -> f).sum()/recall.size();\n System.out.print(\"Recall: \");\n System.out.println(recallFinal);\n //fMeasures\n fMeausureFinal = fMeasures.stream().mapToDouble(f -> f).sum()/fMeasures.size();\n System.out.print(\"Fmeasure: \");\n System.out.println(fMeausureFinal);\n\n //MAP\n mapFinal = apRes.stream().mapToDouble(d->d).sum()/apRes.size();\n System.out.print(\"Mean Avarage Precision: \");\n System.out.println(mapFinal);\n \n mapLimitedFinal = apResRankedTopLimited.stream().mapToDouble(d->d).sum()/apResRankedTopLimited.size();\n System.out.print(\"Mean Precision at rank 10: \");\n System.out.println(mapLimitedFinal);\n \n //NDCG\n ndcgResultsFinal =0;\n ndcgResults.stream().forEach(l-> {\n //it is always true, only added to ensure that doesnt' break with another examples where some queries doens't have results.\n if(l.size()>0){\n ndcgResultsFinal= l.get(l.size()-1)+ndcgResultsFinal;\n }\n });\n ndcgResultsFinal=ndcgResultsFinal/ndcgResults.size();\n \n System.out.print(\"NDCG: \");\n System.out.println(ndcgResultsFinal);\n }",
"public ArrayList<Evaluation> getEvaluations() {\r\n ArrayList<Evaluation> result = new ArrayList<Evaluation>();\r\n result.addAll(evaluations);\r\n return result;\r\n }",
"private void train() throws IOException {\r\n\r\n // Set Listeners, to see results of evaluation during training process and testing\r\n vgg16Transfer.setListeners(new ScoreIterationListener(100));\r\n trainWriter.write(\"\\n Train model....\");\r\n System.out.println(\"\\n Train model....\");\r\n int iterationsCounter = 0;\r\n // Go through all data \"epochs\" - number of times\r\n for(int n = 0; n < epochs; n++) {\r\n System.out.println(String.format(\"Epoch %d started training\", n + 1));\r\n trainWriter.write(String.format(\"Epoch %d started training\", n + 1));\r\n\r\n //Reset training iterator to the new epoch\r\n trainIterator.reset();\r\n // Go through all data once, till it's end\r\n while (trainIterator.hasNext()) {\r\n iterationsCounter++;\r\n trainingData = trainIterator.next();\r\n normalizer.fit(trainingData);\r\n vgg16Transfer.fit(trainingData);\r\n System.out.println(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n\r\n }\r\n System.out.println(String.format(\"Epoch %d finished training\", n + 1));\r\n trainWriter.write(\"*** Completed iteration number # \" + iterationsCounter + \" ***\");\r\n // Get results and check them\r\n Evaluation eval = new Evaluation(numLabels);\r\n testIterator.reset();\r\n while(testIterator.hasNext()) {\r\n testData = testIterator.next();\r\n normalizer.fit(testData);\r\n INDArray features = testData.getFeatures();\r\n INDArray labels = testData.getLabels();\r\n INDArray predicted = vgg16Transfer.outputSingle(features);\r\n eval.eval(labels, predicted);\r\n }\r\n System.out.println(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n System.out.println(eval.stats());\r\n System.out.println(eval.confusionToString());\r\n trainWriter.write(String.format(\"Evaluation on test data - [Epoch %d] [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n n + 1, eval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n trainWriter.write(eval.stats());\r\n trainWriter.write(eval.confusionToString());\r\n }\r\n System.out.println(\"\\n *** Training finished! *** \");\r\n trainWriter.write(\"\\n *** Training finished! *** \");\r\n }"
] | [
"0.72130793",
"0.69825137",
"0.6927204",
"0.667792",
"0.6453841",
"0.64381564",
"0.6286033",
"0.62509346",
"0.6246983",
"0.6227371",
"0.62233096",
"0.62020224",
"0.61712927",
"0.6165585",
"0.61446327",
"0.6136282",
"0.61212873",
"0.60419166",
"0.6034763",
"0.6013873",
"0.60137963",
"0.5929643",
"0.5923336",
"0.58989024",
"0.5884837",
"0.58827966",
"0.5865298",
"0.5864485",
"0.5840714",
"0.5798262",
"0.57947725",
"0.5789249",
"0.5788047",
"0.57524115",
"0.57516044",
"0.57378334",
"0.57348275",
"0.57287526",
"0.5726812",
"0.5725236",
"0.5720291",
"0.57102454",
"0.5702968",
"0.5674139",
"0.56553984",
"0.5655327",
"0.5650504",
"0.56246203",
"0.56043214",
"0.56009007",
"0.5595362",
"0.5593443",
"0.55910826",
"0.5582361",
"0.5578657",
"0.5567533",
"0.5519059",
"0.55180657",
"0.5508607",
"0.55050445",
"0.55049634",
"0.5500118",
"0.54783416",
"0.54744446",
"0.54670376",
"0.54608744",
"0.5459643",
"0.5453624",
"0.54509723",
"0.54491246",
"0.5445321",
"0.54268837",
"0.5424163",
"0.542402",
"0.54199755",
"0.5414561",
"0.5414188",
"0.5412648",
"0.5404327",
"0.53709203",
"0.53458786",
"0.5341718",
"0.5337088",
"0.53362286",
"0.53339803",
"0.53335524",
"0.5323366",
"0.5320868",
"0.5310669",
"0.53048754",
"0.529591",
"0.52957976",
"0.52947056",
"0.5292452",
"0.5277502",
"0.5276531",
"0.5268744",
"0.52597153",
"0.52565634",
"0.52277195",
"0.52254194"
] | 0.0 | -1 |
/ Just so that my state changes are more organized. | public void stateChange() {
if (Qclicks > 3 && mini == GameState.questions) {
/*
* This makes all of the buttons disappear except for the continue
* button
*/
stage.clear();
stage.addActor(next);
}
if (Gdx.input.justTouched()) {
if (mini == GameState.start) {
int x = Gdx.input.getX();
int y = Gdx.input.getY();
score = 0;
clicks = 0;
Qclicks = 0;
// font.setScale(0.25f);
if(x > 240 && x < 445 && y > 322 && y < 350){
mini = GameState.questions;
}
} else if (mini == GameState.score) {
int numc = (int) (percentCorrect * (numTries * 4)) + score;
numTries++;
percentCorrect = ((float) numc) / ((float) (numTries * 4));
if (score >= 3) {
numSuccess++;
}
if (needToReview.size() == 0) {
endGame();
}
mini = GameState.review;
} else if (mini == GameState.review) {
reviewNum++;
if (needToReview.size() == reviewNum) {
endGame();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void incrementStates() {\n\n }",
"@Override\n\tpublic void stateChanged() {\n\t\t\n\t}",
"abstract public void updateState();",
"public void updateState();",
"void beforeState();",
"protected abstract int newState();",
"@Override\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\n\t}",
"public void getState();",
"private SyncState() {}",
"private StateUtils() {}",
"public void saveState() { }",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t}",
"private void updateState() {\n\t while(!isGoodState()) {\n\t\t updateStateOnce();\n\t }\n }",
"public abstract void stateChanged(STATE state);",
"@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}",
"private void addStateLog(){\n int state = GUIState.getState();\n if(state == 1){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n addText(\"Choose which card this card will affect!\");\n } if(state == 2){\n if(GUIState.command.equals(\"Summon\") || GUIState.command.equals(\"Defense\")){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n }\n addText(\"Choose where to put this card!\");\n }\n }",
"public State getState(){return this.state;}",
"@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}",
"@Override\n public int getState() {\n return myState;\n }",
"long getStateChange();",
"Object getState();",
"@Override\n\tpublic void setState(STATE state) {\n\n\t}",
"public interface State {\r\n\r\n}",
"private Object getState() {\n\treturn null;\r\n}",
"public interface ThingState\n{\n\n}",
"public interface IState {\n\n /**\n * Click on button to load a new map from file.\n */\n void btnLoadMap();\n\n /**\n * Click on button to load a new planning from file.\n */\n void btnLoadPlanning();\n\n /**\n * Click on button to compute the best route to make deliveries.\n */\n void btnGenerateRoute();\n\n /**\n * Click on button to cancel a loading action.\n */\n void btnCancel();\n\n /**\n * Click on button to load file.\n *\n * @param file File to load as a map or a planning depending on the state.\n */\n void btnValidateFile(File file);\n\n /**\n * Left click pressed on a delivery.\n */\n void leftClickPressedOnDelivery();\n\n /**\n * Left click released on another delivery.\n *\n * @param sourceDelivery Delivery to switch with target delivery.\n * @param targetDelivery Delivery to switch with sourceDelivery.\n */\n void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery);\n\n /**\n * Simple click on a delivery.\n *\n * @param delivery The delivery clicked.\n */\n void clickOnDelivery(Delivery delivery);\n\n /**\n * Simple click somewhere else (not a interactive point).\n */\n void clickSomewhereElse();\n\n /**\n * Click on an empty node (not a delivery or warehouse node).\n *\n * @param node The empty node clicked.\n */\n void clickOnEmptyNode(Node node);\n\n /**\n * Click on button to add a new delivery.\n *\n * @param node The node to deliver.\n * @param previousDeliveryNode The node with the previous delivery.\n * @param timeSlot The time slot of the new delivery.\n */\n void btnAddDelivery(Node node, Node previousDeliveryNode, TimeSlot timeSlot);\n\n /**\n * Click on button to remove a delivery.\n *\n * @param delivery The delivery to remove.\n */\n void btnRemoveDelivery(Delivery delivery);\n\n /**\n * Click on a specific node : the warehouse.\n *\n * @param warehouse The warehouse node clicked.\n */\n void clickOnWarehouse(Node warehouse);\n\n /**\n * Click on button to close the current map already loaded.\n */\n void btnCloseMap();\n\n /**\n * Click on button to clear the current planning already loaded.\n */\n void btnClearPlanning();\n\n /**\n * Set the default view for this state (enable/disable buttons ...).\n */\n void initView();\n}",
"@Override\n public void restoreState(Map<String, Object> state) {\n\n }",
"public void refreshState(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase LOGINPIN:\n\t\t\tloginPin();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSIT:\n\t\t\tdepositMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tdepositMenu();\n\t\t\tbreak;\n\t\tcase WITHDRAW:\n\t\t\twithdrawalMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbalanceMenu();\n\t\t\tbreak;\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbalanceMenu();\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n public void stateChanged(ChangeEvent e) {\n }",
"protected void stateChanged(final SpacecraftState state) {\n final AbsoluteDate date = state.getDate();\n final boolean forward = date.durationFrom(getStartDate()) >= 0.0;\n for (final DoubleArrayDictionary.Entry changed : state.getAdditionalStatesValues().getData()) {\n final TimeSpanMap<double[]> tsm = unmanagedStates.get(changed.getKey());\n if (tsm != null) {\n // this is an unmanaged state\n if (forward) {\n tsm.addValidAfter(changed.getValue(), date, false);\n } else {\n tsm.addValidBefore(changed.getValue(), date, false);\n }\n }\n }\n }",
"public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}",
"private void updateSharedState()\r\n {\r\n // TODO update the shared state\r\n // e.g.: sharedState.setTurnHolder(gameModel.getTurnHolder());\r\n }",
"@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }",
"public void saveState() {\n\t\tsuper.saveState();\n\t}",
"void mo15871a(StateT statet);",
"void currentStateChanged();",
"protected void storeCurrentValues() {\n }",
"public int getState() {return state;}",
"public int getState() {return state;}",
"@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }",
"private void importState() {\n SpeakerManager s = new SpeakerManager();\n this.speakerManager = s.importState();\n\n RoomManager r = new RoomManager();\n this.roomManager = r.importState();\n\n OrganizerManager o = new OrganizerManager();\n this.organizerManager = o.importState();\n\n EventManager e = new EventManager();\n this.eventManager = e.importState();\n\n ChatManager c = new ChatManager();\n this.chatManager = c.importState();\n\n AttendeeManager a = new AttendeeManager();\n this.attendeeManager = a.importState();\n\n\n }",
"private void updateState() {\n switch (game.getGameState()) {\n case GAME:\n gamePlay();\n break;\n case ONE:\n lostTurnByOne();\n break;\n case READY:\n readyToPlay();\n break;\n case START:\n startGame();\n break;\n case TURN:\n startTurn();\n break;\n case FINISH:\n finishGame();\n break;\n }\n }",
"private void storeViewState()\n\t{\n\t\tCommand lastCmd = project.getLastCommand();\n\t\tif (lastCmd != null)\n\t\t{\n\t\t\tlastCmd.setOptionalState(view.toJSONString(lastCmd.getProjectState()));\n\t\t}\n\t}",
"public abstract String getState();",
"State(Main aMain) {\n\tmain = aMain;\n\tback = Integer.parseInt(main.myProps.getProperty(\"yesterdays\"));\n\tfront = Integer.parseInt(main.myProps.getProperty(\"tomorrows\"));\n\tmaps = new Hashtable();\n availWeath = new Hashtable();\n\n main.myFrw.listen(new MapListener(), ScaledMap.TYPE, null);\n main.myFrw.announce(this);\n stateDoc = Framework.parse(main.myPath + \"state.xml\", \"state\");\n availWeath = loadFromDoc();\n }",
"public void enterHatchingState() {\n\n\t}",
"void stateUpdate(String msg);",
"@Override\n\tpublic int getState() {\n\t\treturn 0;\n\t}",
"protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"@Override\n public void updateState(Perception p) {\n \n //TODO: Complete Method\n }",
"void update( State state );",
"@Override\n\tpublic void setLastState(STATE state) {\n\n\t}",
"void changed(State state, Exception e);",
"public abstract void updateState(ENodeState state);",
"public void updateState() {\n\n // After each frame, the unit has a slight morale recovery, but only up to the full base morale.\n morale = Math.min(morale + GameplayConstants.MORALE_RECOVERY, GameplayConstants.BASE_MORALE);\n\n if (morale < GameplayConstants.PANIC_MORALE) {\n state = UnitState.ROUTING;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.ROUTING);\n }\n } else if (state == UnitState.ROUTING && morale > GameplayConstants.RECOVER_MORALE) {\n this.repositionTo(averageX, averageY, goalAngle);\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.MOVING);\n }\n }\n\n // Update the state of each single and the average position\n double sumX = 0;\n double sumY = 0;\n double sumZ = 0;\n int count = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.updateState();\n sumX += single.getX();\n sumY += single.getY();\n sumZ += single.getZ();\n count += 1;\n }\n averageX = sumX / count;\n averageY = sumY / count;\n averageZ = sumZ / count;\n\n // Updating soundSink\n soundSink.setX(averageX);\n soundSink.setY(averageY);\n soundSink.setZ(averageZ);\n\n // Update the bounding box.\n updateBoundingBox();\n\n // Update stamina\n updateStamina();\n }",
"@Test\n\tpublic void validState_changeState() {\n\t\tString testState = \"OFF\";\n\t\tItem testItem = new Item().createItemFromItemName(\"lamp_woonkamer\");\n\t\ttestItem.changeState(testItem.getName(), testState);\n\t\tSystem.out.println(testItem.getState());\n\t\tassertEquals(testItem.getState(), testState);\n\t\t\n\t}",
"@Override\n public void onRestate() {\n }",
"@Override\n\tpublic void setState(State state) \n\t\t{ current = new PuzzleState(state.getString(state.getState()),\n\t\t\t\t\t\t\t\t\tstate.getString(state.getGoalState())); \n\t\t}",
"@Override\n public void setState(String s)\n {\n state = s;\n nbChanges++;\n }",
"private State5() {\n\t}",
"private StateChangeMonitor() {\n\t\t// Create the registry of StateChangeListeners\n\t\tlisteners = new Hashtable();\n\t}",
"public void stateChanged (ChangeEvent e)\n {\n }",
"@Override\r\n\tpublic void updateState(int id, int state) {\n\t}",
"java.lang.String getState();",
"ControllerState getNewObjectState();",
"@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }",
"public void mutateState(State state) {\r\n this.root = state.getRoot();\r\n this.setExit(state.getExit());\r\n this.directoryStack = state.directoryStack;\r\n this.workingDirectory = state.getWorkingDirectory();\r\n this.commandHistory = state.commandHistory;\r\n }",
"public void stateChanged( ChangeEvent event )\n {\n \n }",
"private void initStates() {\n\n\t\tstateManager.add(\"main_menu\", new MainMenuState(stateManager, stateWidget, inputManager, textureManager));\n\t\tstateManager.add(\"inner_game\", new InnerGameState(stateManager, stateWidget, inputManager, textureManager));\n\t\tstateManager.add(\"game_over\", new GameOverState(stateManager));\n\t\tstateManager.changeState(\"main_menu\");\n\t}",
"@Override public void setTime(UpodWorld w)\n{\n StateRepr sr = getState(w);\n sr.checkAgain(0);\n}",
"Update withState(String state);",
"@Override\n\tpublic boolean getState() {\n\t\treturn true;\n\t}",
"@Test\n @DisplayName(\"State sees changes committed to backend if not modified on the state\")\n void dirtyRead() {\n backingStore.set(CHAD);\n final var state = createState();\n assertThat(state.get()).isEqualTo(CHAD);\n backingStore.set(DENMARK);\n assertThat(state.get()).isEqualTo(DENMARK); // Sees change\n state.put(ESTONIA);\n assertThat(state.get()).isEqualTo(ESTONIA);\n backingStore.set(FRANCE);\n assertThat(state.get()).isEqualTo(ESTONIA); // Does not see change\n }",
"void stateChanged( final GameState oldState, final GameState newState );",
"StateManager getStateManager();",
"public void setStateOfMovement(int movementState){stateOfMovement = movementState; }",
"public void update(){\r\n\r\n // update curState based on inputs\r\n // Perform state-transition actions \r\n switch(curState) {\r\n${nextstatecases}\r\n default:\r\n reset();\r\n break;\r\n }",
"private void computeExternalState(InternalState newState) {\n if (internalState != newState) {\n switch (internalState) {\n case BUILD:\n Preconditions.checkState(newState == InternalState.PROBE_IN || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_IN:\n Preconditions.checkState(newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.REPLAY ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_OUT:\n case PROBE_PIVOT_AND_OUT:\n Preconditions.checkState(newState == InternalState.PROBE_IN ||\n newState == InternalState.PROBE_OUT ||\n newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROJECT_NON_MATCHES:\n Preconditions.checkState(newState == InternalState.REPLAY || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case REPLAY:\n Preconditions.checkState(newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n }\n internalState = newState;\n }\n computeExternalState();\n }",
"public void updateRoot(MachineState theState) {\n ;\n }",
"@Test\r\n\tpublic void testGetState() {\r\n\t}",
"public void changeState()\r\n\t{\r\n\t\tfailedNumber=0;\r\n\t\tif(state.equalsIgnoreCase(\"IN PREPARATION\"))\r\n\t\t\tsetState(\"IN TRANSIT\");\r\n\t\telse if(state.equalsIgnoreCase(\"IN TRANSIT\"))\r\n\t\t{\r\n\t\t\tfailedNumber=Math.random();\r\n\t\t\tif(failedNumber<=0.2) setState(\"FAILED\");\r\n\t\t\telse setState(\"RECEIVED\");\r\n\t\t}\r\n\t}",
"void state_REQState(){\r\n eccState = INDEX_REQState;\r\n alg_REQAlg();\r\n CNF.serviceEvent(this);\r\n state_START();\r\n}",
"OperationalState operationalState();",
"OperationalState operationalState();",
"public interface State {\n void info();\n}",
"@Test\n public void Test_Maintain_State() {\n Map<String, Integer> inMap = new HashMap<>();\n calc = new StomaStateCalculator(3, 800);\n\n inMap.put(\"UrineColour\", 2);\n inMap.put(\"UrineFrequency\", 3);\n inMap.put(\"Volume\", 600);\n inMap.put(\"Consistency\", 2);\n inMap.put(\"PhysicalCharacteristics\", 6);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n\n calc.Calculate_New_State(inMap);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n }",
"public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }",
"void updateState() {\n String[] players = client.getPlayers();\n System.out.println(Arrays.toString(players));\n\n if(oldPlayerNum != players.length){\n oldPlayerNum = players.length;\n updateComboBox();\n }\n\n playersListModel.clear();\n\n for (int i = 0; i < players.length; i++) {\n playersListModel.add(i, players[i]);\n }\n\n // SECOND check if player holding the ball / update GUI accordingly\n String[] playerBall = client.whoIsBall();\n boolean serverSideBall = Integer.parseInt(playerBall[1]) == client.getId();\n\n if (client.hasBall != serverSideBall) { // If the server says something different\n client.hasBall = serverSideBall;\n ballState(serverSideBall, playerBall[0]);\n }\n // THIRD if you are holding the ball update gui so that ball is throwable\n\n }",
"public abstract State getSourceState ();",
"void runState() {\n\t\tp.displaySheet();\n\t\tcurState.run();\n\t}",
"public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }",
"State getState();",
"State getState();",
"State getState();",
"State getState();",
"private GameStatePresets()\n {\n\n }",
"void setState(int state);",
"int getState();",
"int getState();",
"int getState();",
"int getState();"
] | [
"0.73819786",
"0.710344",
"0.69200546",
"0.67290556",
"0.66232073",
"0.65874666",
"0.65573126",
"0.6504009",
"0.6496594",
"0.6483216",
"0.64576316",
"0.6456516",
"0.64556503",
"0.64172775",
"0.6388261",
"0.63094467",
"0.62913376",
"0.62877065",
"0.6287188",
"0.6286149",
"0.6272698",
"0.62624395",
"0.62589824",
"0.62561613",
"0.62453306",
"0.6236861",
"0.62359375",
"0.62353677",
"0.62181437",
"0.6185062",
"0.6183273",
"0.6182477",
"0.61756045",
"0.61689335",
"0.6159136",
"0.6142004",
"0.61206067",
"0.6116625",
"0.6116625",
"0.61146307",
"0.61098987",
"0.61047673",
"0.60904694",
"0.6088308",
"0.60756445",
"0.60639393",
"0.60635936",
"0.6054769",
"0.6052773",
"0.60519636",
"0.6023284",
"0.6019195",
"0.6017688",
"0.60126865",
"0.60103464",
"0.6008016",
"0.6007581",
"0.60064644",
"0.6006286",
"0.60042465",
"0.6002058",
"0.60020113",
"0.59910583",
"0.5988617",
"0.59746176",
"0.5970507",
"0.59671986",
"0.59654",
"0.595726",
"0.59569705",
"0.59515446",
"0.5946436",
"0.59338707",
"0.5932787",
"0.5928887",
"0.59218884",
"0.5911669",
"0.5911267",
"0.5900672",
"0.58999753",
"0.5899596",
"0.58702594",
"0.58654237",
"0.58654237",
"0.58584875",
"0.58576655",
"0.58520865",
"0.5845537",
"0.58375746",
"0.5837516",
"0.5834002",
"0.5830471",
"0.5830471",
"0.5830471",
"0.5830471",
"0.58277506",
"0.5821957",
"0.582046",
"0.582046",
"0.582046",
"0.582046"
] | 0.0 | -1 |
/ The instructions will be updated. The heights are actually widths | public void drawGame() {
if (first) {
for (int i = 0; i < 4; i++) {
int place = r.nextInt(4);
while (heightUsed[place] == true) {
place = r.nextInt(4);
}
if (i == 0) {
a1.setBounds(heights[place], 265, 150, 60);
stage.addActor(a1);
heightUsed[place] = true;
} else if (i == 1) {
a2.setBounds(heights[place], 265, 150, 60);
stage.addActor(a2);
heightUsed[place] = true;
} else if (i == 2) {
a3.setBounds(heights[place], 265, 150, 60);
stage.addActor(a3);
heightUsed[place] = true;
} else if (i == 3) {
a4.setBounds(heights[place], 265, 150, 60);
stage.addActor(a4);
heightUsed[place] = true;
}
}
}
if (mini == GameState.questions) {
basketball.render();
batch.begin();
if (Qclicks == 0) {
for (int i = 0; i < text.size(); i++) {
if (i == 0) {
questionfont.draw(batch, "1: " + text.get(i), 50,
450 - 50 * i);
} else {
questionfont.draw(batch, text.get(i), 50, 450 - 50 * i);
}
}
a1.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(0));
a2.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(1));
a3.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(2));
a4.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(3));
}
if (Qclicks == 1) {
for (int i = 0; i < text.size(); i++) {
if (i == 0) {
questionfont.draw(batch, "2: " + text.get(i), 50,
450 - 50 * i);
} else {
questionfont.draw(batch, text.get(i), 50, 450 - 50 * i);
}
}
a1.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(0));
a2.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(1));
a3.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(2));
a4.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(3));
}
if (Qclicks == 2) {
for (int i = 0; i < text.size(); i++) {
if (i == 0) {
questionfont.draw(batch, "3: " + text.get(i), 50,
450 - 50 * i);
} else {
questionfont.draw(batch, text.get(i), 50, 450 - 50 * i);
}
}
a1.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(0));
a2.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(1));
a3.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(2));
a4.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(3));
}
if (Qclicks == 3) {
for (int i = 0; i < text.size(); i++) {
if (i == 0) {
questionfont.draw(batch, "4: " + text.get(i), 50,
450 - 50 * i);
} else {
questionfont.draw(batch, text.get(i), 50, 450 - 50 * i);
}
}
a1.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(0));
a2.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(1));
a3.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(2));
a4.setText(answersForQuestions.get(
questionsOrdered.get(Qclicks)).get(3));
}
font.setColor(Color.BLACK);
font.draw(batch, "(Click answers below)",
(Gdx.graphics.getWidth() / 2) - 80, 350);
font.draw(batch, score + " out of " + Qclicks, 50, 100);
font.setColor(Color.WHITE);
batch.end();
stage.draw();
}
if (mini == GameState.start) {
batch.begin();
font.draw(batch, "(click here to continue)", Gdx.graphics.getWidth() / 2 - 75, 150);
font.draw(batch, InteractWithFiles.readMiniGameScreen(0),
Gdx.graphics.getWidth() / 2 - 75,
Gdx.graphics.getHeight() / 2 + 50);
font.draw(batch, InteractWithFiles.readMiniGameScreen(1),
Gdx.graphics.getWidth() / 2 - 200,
Gdx.graphics.getHeight() / 2 + 25);
font.draw(batch, InteractWithFiles.readMiniGameScreen(2),
Gdx.graphics.getWidth() / 2 - 150,
Gdx.graphics.getHeight() / 2);
batch.end();
}
if (mini == GameState.score) {
batch.begin();
font.draw(batch, "(click to continue)", 200, 150);
if (score >= 3) {
font.draw(batch, "You passed!",
Gdx.graphics.getWidth() / 2 - 125,
Gdx.graphics.getHeight() / 2 + 50);
font.draw(batch, score + " out of 4",
Gdx.graphics.getWidth() / 2 - 125,
Gdx.graphics.getHeight() / 2 - 5);
success = true;
} else {
font.draw(batch, "You Failed...",
Gdx.graphics.getWidth() / 2 - 125,
Gdx.graphics.getHeight() / 2 + 50);
font.draw(batch, score + " out of 4",
Gdx.graphics.getWidth() / 2 - 125,
Gdx.graphics.getHeight() / 2 - 5);
}
batch.end();
}
if (mini == GameState.review) {
if (!first) {
batch.begin();
font.draw(batch, "Review Section", 200, 350);
font.draw(batch, "(click to continue)", 200, 150);
ArrayList<String> text = InteractWithFiles
.drawQuestionsDifferentLines(
needToReview.get(reviewNum), 50);
for (int i = 0; i < text.size(); i++) {
font.draw(batch, text.get(i), 50, 300 - 50 * i);
}
batch.end();
}
}
first = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calcContentSize() {\n }",
"@Override\n void setWidthHeight() {\n setWidth(explosions[0].getWidth());\n setHeight(explosions[1].getHeight());\n }",
"double getNewWidth();",
"double getNewHeight();",
"private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }",
"public void setSize(double width, double height){\r\n double topLaneHeight=height/100*myInformation.upperToDownPercent;\r\n double bottomLaneHeight=height-topLaneHeight;\r\n double leftSideWidth=width/100*myInformation.leftToRightPercent;\r\n double rightSideWidth=width-leftSideWidth-1;\r\n\r\n double buttonLeftHeight=(height-topLaneHeight)/100*myInformation.leftButtonsPercent;\r\n int countLeftButtons=0;\r\n double labelTopWidth=rightSideWidth/100*myInformation.upperButtonsPercent;\r\n int countTopLabels=0;\r\n //Regions\r\n leftVBox.setMinSize(leftSideWidth,height);\r\n leftVBox.setMaxSize(leftSideWidth,height);\r\n\r\n upperHBox.setMinSize(width,topLaneHeight);\r\n upperHBox.setMaxSize(width,topLaneHeight);\r\n\r\n canvas.setWidth(width);\r\n canvas.setHeight(bottomLaneHeight);\r\n\r\n pane.setMinSize(width,bottomLaneHeight);\r\n pane.setMaxSize(width,bottomLaneHeight);\r\n\r\n stackPane.setMinSize(width, height);\r\n stackPane.setMaxSize(width, height);\r\n\r\n mainVBox.setMinSize(width, height);\r\n mainVBox.setMaxSize(width, height);\r\n\r\n canvasStackPane.setMinSize(width,bottomLaneHeight);\r\n canvasStackPane.setMaxSize(width,bottomLaneHeight);\r\n\r\n listViewVBox.setMinSize(width, height);\r\n listViewVBox.setMaxSize(width, height);\r\n //Objects\r\n upperLeftButton.setMinSize(leftSideWidth,topLaneHeight);\r\n upperLeftButton.setMaxSize(leftSideWidth,topLaneHeight);\r\n //Left Side\r\n left1HintButton.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left1HintButton.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left2Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left2Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left3Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left3Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left4Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left4Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left5Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left5Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n double restHeight=height-(buttonLeftHeight*countLeftButtons+topLaneHeight);\r\n leftRestLabel.setMinSize(leftSideWidth,restHeight);\r\n leftRestLabel.setMaxSize(leftSideWidth,restHeight);\r\n\r\n //Top\r\n upper1Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper1Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper2Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper2Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper3Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper3Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n double restwidth=width-upperLeftButton.getWidth()-(labelTopWidth*countTopLabels);\r\n upperRestLabel.setMinSize(restwidth,topLaneHeight);\r\n upperRestLabel.setMaxSize(restwidth,topLaneHeight);\r\n //New Gamemode stuff\r\n newGamemodeHBox.setMinSize(width,height);\r\n newGamemodeHBox.setMaxSize(width,height);\r\n double nBWidth=width/100*myInformation.newGamemodeButtonsPercent.width;\r\n double nBHeight=height/100*myInformation.newGamemodeButtonsPercent.height;\r\n\r\n newGamemodebutton1.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton2.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton3.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n //BackButton\r\n backPane.setMinSize(width, height);\r\n backPane.setMaxSize(width, height);\r\n double backWidth=width/100*myInformation.backButtonPercent.width;\r\n double backHeight=height/100*myInformation.backButtonPercent.height;\r\n backButton.setMinSize(backWidth,backHeight);\r\n backButton.setMaxSize(backWidth,backHeight);\r\n //New Graphmode\r\n newGraphModeHBox.setMinSize(width,height);\r\n newGraphModeHBox.setMaxSize(width,height);\r\n\r\n newGraphModebutton1.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton2.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton3.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n sMBHBox.setMinSize(width,height);\r\n sMBHBox.setMaxSize(width,height);\r\n smallButton.setMinSize(nBWidth,nBHeight);\r\n smallButton.setMaxSize(nBWidth,nBHeight);\r\n middleButton.setMinSize(nBWidth,nBHeight);\r\n middleButton.setMaxSize(nBWidth,nBHeight);\r\n bigButton.setMinSize(nBWidth,nBHeight);\r\n bigButton.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameEndButton.setMinSize(nBWidth,nBHeight);\r\n gameEndButton.setMaxSize(nBWidth,nBHeight);\r\n gameEndTop.setMinSize(width/2,height/5);\r\n gameEndTop.setMaxSize(width/2,height/5);\r\n\r\n\r\n listView.setMinSize(width/8,height/2);\r\n listView.setMaxSize(width/8,height/2);\r\n submit2.setMinSize(width/8,height/10);\r\n submit2.setMaxSize(width/8,height/10);\r\n\r\n textFieldHBox.setMinSize(width,height);\r\n textFieldHBox.setMaxSize(width,height);\r\n textFieldVertices.setMinSize(nBWidth,nBHeight);\r\n textFieldVertices.setMaxSize(nBWidth,nBHeight);\r\n textFieldEdges.setMinSize(nBWidth,nBHeight);\r\n textFieldEdges.setMaxSize(nBWidth,nBHeight);\r\n\r\n buttonTextfield.setMinSize(nBWidth/2,nBHeight);\r\n buttonTextfield.setMaxSize(nBWidth/2,nBHeight);\r\n\r\n //New Graph\r\n newGraphHBox.setMinSize(width,height);\r\n newGraphHBox.setMaxSize(width,height);\r\n\r\n newGraphButtonYes.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonYes.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphButtonNo.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonNo.setMaxSize(nBWidth,nBHeight);\r\n\r\n hintButton1.setMinSize(nBWidth,nBHeight);\r\n hintButton1.setMaxSize(nBWidth,nBHeight);\r\n hintButton2.setMinSize(nBWidth,nBHeight);\r\n hintButton2.setMaxSize(nBWidth,nBHeight);\r\n hintButton3.setMinSize(nBWidth,nBHeight);\r\n hintButton3.setMaxSize(nBWidth,nBHeight);\r\n hintButton4.setMinSize(nBWidth,nBHeight);\r\n hintButton4.setMaxSize(nBWidth,nBHeight);\r\n hintButton5.setMinSize(nBWidth,nBHeight);\r\n hintButton5.setMaxSize(nBWidth,nBHeight);\r\n hintButton6.setMinSize(nBWidth,nBHeight);\r\n hintButton6.setMaxSize(nBWidth,nBHeight);\r\n hintButton7.setMinSize(nBWidth,nBHeight);\r\n hintButton7.setMaxSize(nBWidth,nBHeight);\r\n hintButton8.setMinSize(nBWidth,nBHeight);\r\n hintButton8.setMaxSize(nBWidth,nBHeight);\r\n hintButton9.setMinSize(nBWidth,nBHeight);\r\n hintButton9.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinStackPane.setMinSize(width, height);\r\n gameWinStackPane.setMaxSize(width, height);\r\n\r\n gameWinButton1.setMinSize(nBWidth,nBHeight);\r\n gameWinButton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinButton2.setMinSize(nBWidth,nBHeight);\r\n gameWinButton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinHBox.setMinSize(width,height/4);\r\n gameWinHBox.setMaxSize(width,height/4);\r\n\r\n hintMenuStack.setMinSize(width, height);\r\n hintMenuStack.setMaxSize(width, height);\r\n\r\n hintMenu.setSpacing(width/30);\r\n vBoxHint.setSpacing(height/20);\r\n vBoxHint2.setSpacing(height/20);\r\n vBoxHint3.setSpacing(height/20);\r\n\r\n abstand.setMinSize(width,height/3);\r\n }",
"private void basicSize(){\n setSize(375,400);\n }",
"private void updateHeight() {\n int leftHeight = height(this.leftChild);\n int rightHeight = height(this.rightChild);\n this.height = (rightHeight > leftHeight ? rightHeight : leftHeight) + 1;\n }",
"public void resize() {\n\t\tsp.doLayout();\n\t}",
"void setWidthHeight() {\n\t\tsetWidthHeight(getNcols() * grid().gridW, getNvisibleRows() * grid().gridH);\n\t}",
"void computeNewLayout();",
"@Override\n\tpublic void height() {\n\t\t\n\t}",
"public abstract int layoutWidth();",
"protected abstract void setSize();",
"@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }",
"private void updateSizeInfo() {\n RelativeLayout drawRegion = (RelativeLayout)findViewById(R.id.drawWindow);\r\n drawW = drawRegion.getWidth();\r\n drawH = drawRegion.getHeight();\r\n getImageFromStorage();\r\n LinearLayout parentWindow = (LinearLayout)findViewById(R.id.parentWindow);\r\n parentWindow.setPadding((drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2, (drawW - bgImage.getWidth())/2, (drawH - bgImage.getHeight())/2);\r\n parentWindow.invalidate();\r\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\theight= ll1.getHeight();\n\t\t\t\t\tLog.d(\"AddMenu\", \"height:\"+height);\n\t\t\t\t}",
"void setStats(double newWidth, double newHeight) {\n width = newWidth;\n height = newHeight;\n }",
"int layout(ArrayList<ImageCell> images, int totalWidth);",
"public void setSize();",
"int getWidth() {return width;}",
"public void settings() { size(1200, 800); }",
"@Override\r\n protected void layout() {\n\r\n Check.setY(this.getHalfHeight() - Check.getHalfHeight());\r\n\r\n float asc = lblName.getFont().getDescent();\r\n\r\n lblName.setY(this.getHeight() - lblName.getHeight() + asc);\r\n lblName.setX(this.getLeftWidth());\r\n }",
"public void updateInfo()\n\t{\n\t\twidth = Game.frame.getWidth();\n\t\theight = Game.frame.getHeight();\n\t\tGame.frame.revalidate();\n\t\tGame.frame.repaint();\n\t}",
"public void updateHelpBoxDimensions()\r\n\t{\r\n\t\tsaveFont();\r\n\t\tg.setFont(NumerateGame.CAPTION_FONT);\r\n\t\thelpLineHeight = helpLines.size()*g.getFontMetrics().getMaxDescent();\r\n\t\thelpLineHeight += Math.max(helpLines.size()-1,0)*NumerateGame.HELP_BOX_INNER_TEXT_PADDING;\r\n\t\t\r\n\t\thelpLineWidth = 0;\r\n\t\tIterator it = helpLines.iterator();\r\n\t\twhile (it.hasNext())\r\n\t\t{\r\n\t\t\tString current = (String)it.next();\r\n\t\t\tif (g.getFontMetrics().stringWidth(current) > helpLineWidth)\r\n\t\t\t{\r\n\t\t\t\thelpLineWidth = g.getFontMetrics().stringWidth(current);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trevertFont();\r\n\t}",
"@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\twidth = w;\n\t\theigth = h;\n\t\tajestPosition();\n\t\tthis.invalidate();\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}",
"@Override\n\tprotected void changeSize(int x, int y, int previousX, int previousY) {\n this.setWidth(this.getWidth()+(x-previousX));\n this.setHeight(this.getHeight()+(y-previousY));\n this.setX(this.getX()+(x-previousX));\n\t}",
"public int getWidth() { return width; }",
"public int getWidth() { return width; }",
"@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n mId = w / 2;\n mId = mId - mViewsCount * 9;\n }",
"public abstract int layoutHeight();",
"@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n int widthSize = MeasureSpec.getSize(widthMeasureSpec);\n// int heightSize = MeasureSpec.getSize(heightMeasureSpec);\n \n setMeasuredDimension(widthSize, widthSize/8);\n\t}",
"double getOldHeight();",
"public void size(final int theWidth, final int theHeight);",
"public int getCurrentHeight();",
"public void updateSize() {\n\t\tint mpVis = (csub.isMorePanelVisible()) ? 1 : 0;\n\t\tint csubAwake = (csub.isAwake()) ? 1 : 0;\n\t\t\n\t\tint height = csubAwake * (CSub.INTERFACE_PANEL_HEIGHT + mpVis * CSub.MORE_PANEL_HEIGHT);\n\t\t\n\t\tsetPreferredSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t\tsetSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t}",
"public double getWidth() {\n return this.size * 2.0; \n }",
"public int getCurrentWidth();",
"protected double computePrefHeight(double aWidth) { return getHeight(); }",
"public MySWsDecoderSizesAutoLayoutTests() {\n initComponents();\n \n \n }",
"@Override\n public int getWidth() {\n return width;\n }",
"@Override\n public int getWidth() {\n return width;\n }",
"Integer getCurrentWidth();",
"public int getSize() {\n\t\treturn width + length;\n\t}",
"protected double computePrefWidth(double aHeight) { return getWidth(); }",
"public String _base_resize(double _width,double _height) throws Exception{\n_cvs.Resize((float) (_width),(float) (_height));\n //BA.debugLineNum = 86;BA.debugLine=\"pnl.SetLayoutAnimated(0, 0, 0, Width, Height)\";\n_pnl.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (_width),(int) (_height));\n //BA.debugLineNum = 87;BA.debugLine=\"If thumb.IsInitialized = False Then CreateThumb\";\nif (_thumb.IsInitialized()==__c.False) { \n_createthumb();};\n //BA.debugLineNum = 88;BA.debugLine=\"CircleRect.Initialize(ThumbSize + stroke, ThumbSi\";\n_circlerect.Initialize((float) (_thumbsize+_stroke),(float) (_thumbsize+_stroke),(float) (_width-_thumbsize-_stroke),(float) (_height-_thumbsize-_stroke));\n //BA.debugLineNum = 89;BA.debugLine=\"xlbl.SetLayoutAnimated(0, CircleRect.Left, Circle\";\n_xlbl.SetLayoutAnimated((int) (0),(int) (_circlerect.getLeft()),(int) (_circlerect.getTop()),(int) (_circlerect.getWidth()),(int) (_circlerect.getHeight()));\n //BA.debugLineNum = 90;BA.debugLine=\"Draw\";\n_draw();\n //BA.debugLineNum = 91;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public void setSize() {\n\t\t\tthis.size = 1;\n\t\t\tint leftSize = 0;\n\t\t\tint rightSize = 0;\n\t\t\tif (this.getLeft().getKey() != -1) {\n\t\t\t\tleftSize = this.getLeft().getSize();\n\t\t\t}\n\t\t\tif (this.getRight().getKey() != -1) {\n\t\t\t\trightSize = this.getRight().getSize();\n\t\t\t}\n\t\t\tthis.size += leftSize + rightSize;\n\n\t\t\t/**\n\t\t\t * this.size = 1; int leftSize = 0; int rightSize = 0; try { leftSize =\n\t\t\t * this.getLeft().getSize(); this.size += leftSize; } catch\n\t\t\t * (NullPointerException e) { this.size += leftSize; } try { rightSize =\n\t\t\t * this.getRight().getSize(); this.size += rightSize; } catch\n\t\t\t * (NullPointerException e) { this.size += rightSize; } if (this.getSize() >\n\t\t\t * 990) { System.out.println(\"actual size is:\" + this.getSize()); }\n\t\t\t */\n\t\t}",
"int getHeight() {return height;}",
"public void updateWidth() {\n\t\t// Update width\n\t\tif (this.getFamily() != null) {\n\t\t\tthis.getFamily().updateFamilyWidth();\n\t\t\tthis.setWidth(this.getFamily().getWidth()\n\t\t\t\t\t+ this.getFamily().getNextWidth());\n\t\t} else {\n\t\t\tthis.setWidth(1);\n\t\t}\n\t}",
"double getOldWidth();",
"@Override\n\tpublic void setHeight(short arg0) {\n\t\t\n\t}",
"private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }",
"void setHeight(int height);",
"void setHeight(int height);",
"@Override\n public void settings(){\n size(500, 500);\n }",
"public int getHeight() {return height;}",
"private void resize() {\n }",
"public int getH() { return height; }",
"public int getWidth()\n {return width;}",
"@Override\n int width();",
"public abstract void doLayout();",
"@Override\n public void run() {\n Log.i(TAG, \"run: width\" + mWidth);\n Log.i(TAG, \"run: height----------\" + mHeight);\n }",
"void setHeight(VariableAmount height);",
"public void onSizeChanged(int i, int i2, int i3, int i4) {\n super.onSizeChanged(i, i2, i3, i4);\n int width = getWidth();\n this.f92258f = getHeight();\n this.f92257e = (width - ((int) this.f92259g)) / this.f92253a;\n this.f92254b.setShader(new LinearGradient(0.0f, 0.0f, (float) this.f92257e, (float) this.f92258f, this.f92255c, this.f92256d, Shader.TileMode.CLAMP));\n }",
"@SuppressWarnings(\"UnnecessaryBoxing\")\r\n private void initLayoutDimensions() {\r\n leftPanelWidth = Page.getScreenWidth() * 20 / 100;\r\n leftPanelHeight = Page.getScreenHeight() - 225;\r\n middlePanelWidth = Page.getScreenWidth() / 2;\r\n if (Double.valueOf(middlePanelWidth) % 2.0 > 0.0) {\r\n middlePanelWidth = middlePanelWidth - 1;\r\n }\r\n rightPanelWidth = Page.getScreenWidth() - (leftPanelWidth + 2 + middlePanelWidth + 2);\r\n }",
"@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }",
"@Override\n public double getWidth() {\n return width;\n }",
"public abstract int getWidth();",
"public void setSize(double aWidth, double aHeight) { setWidth(aWidth); setHeight(aHeight); }",
"void setWidth(int width);",
"void setWidth(int width);",
"@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n int widthSize = MeasureSpec.getSize(widthMeasureSpec);\n// int heightSize = MeasureSpec.getSize(heightMeasureSpec);\n \n setMeasuredDimension(widthSize, widthSize/11);\n\t}",
"private void extendedSize(){\n setSize(600,400);\n }",
"public int getHeight() { return height; }",
"public void grow() {\n\t\thtmlFontSize += 40;\n\t}",
"public void showRectangleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(heightEdit);\n sizeArea.addView(widthEdit);\n }",
"public Integer getWidth(){return this.width;}",
"@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tint[] viewLocation = new int[2];\n\t\tthis.getLocationOnScreen(viewLocation);\n\n\t\tif (h > w) {\n\t\t\tsquareRealSize = w / 5;\n\t\t} else {\n\t\t\tsquareRealSize = h / 5;\n\t\t}\n\n\t\t// 小方块的大小\n\t\tsquareDisplaySize = squareRealSize * 9 / 10;\n\n\t\tsquareOffsetX = 0;\n\t\tsquareOffsetY = 0;\n\t\t\n\t\tthis.w = getWidth();\n\t\tthis.h = getHeight();\n\t}",
"@Override\n protected void sizeChanged () {\n }",
"short getFitHeight();",
"public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }",
"public int grWidth() { return width; }",
"int getCurrentSize();",
"public void updateLayoutData() {\n\t\tint height;\n\t\tint width;\n\t\tif (isVisible() && !text.trim().equals(\"\")) {\n\t\t\tif (styleRanges == null) {\n\t\t\t\tPoint p = Util.getExtentInGC(getFont(), text);\n\t\t\t\twidth = p.x;\n\t\t\t\theight = p.y;\n\t\t\t} else {\n\t\t\t\tRectangle r = textLayout.getBounds();\n\t\t\t\twidth = r.width;\n\t\t\t\theight = r.height;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = 0;\n\t\t\theight = 0;\n\t\t}\n\n\t\tif (isHorizontal()) {\n\t\t\tsetLayoutData(new ChartLayoutData(width, height));\n\t\t} else {\n\t\t\tsetLayoutData(new ChartLayoutData(height, width));\n\t\t}\n\t}",
"private void refreshHeight() {\n\t\tint lines = Math.min(maxLineCount, Math.max(minLineCount, text\n\t\t\t\t.getLineCount()));\n\t\tint newHeight = lines * text.getLineHeight();\n\n\t\tGridData data = (GridData) text.getLayoutData();\n\t\tif (data.heightHint != newHeight) {\n\t\t\tdata.heightHint = newHeight;\n\t\t\tlayout();\n\t\t}\n\t}",
"@Override\n public int getHeight() {\n return 320;\n }",
"public void setHeight(int height);",
"public void setHeight(int height);",
"@Override\n\t\tpublic void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop,\n\t\t\t\tint oldRight, int oldBottom) {\n\t\t\t\n\t\t\tSystem.out.println(\"*\" + index +\"-\"+(right-left));\n\t\t\tcolWidth[index]=right-left;\n\t\t\n\t\t\tsetMyWidth();\n\t\t}",
"long getWidth();",
"@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}",
"public void onSizeChanged(int w, int h, int oldw, int oldh) {\r\n super.onSizeChanged(w, h, oldw, oldh);\r\n returnDefualt();\r\n this.startWidth = (float)getWidth()/4;\r\n this.endWidth = (float)getWidth()-((float)getWidth()/4);\r\n this.startHeight = (float)getHeight()/12;\r\n this.endHeight = getHeight()-((float)getHeight()/12);\r\n this.oval = new RectF(this.startWidth,this.startHeight , this.endWidth, this.endHeight);\r\n }",
"@Override\n\tpublic void settings() {\n\t\tSystem.out.println(\"settings\");\n\t\tsize(800, 800);\n\t}",
"@Override\n public int getWidth() {\n return 260;\n }",
"public int grHeight() { return height; }",
"private void actionBiggerCells() {\n layoutPanel.changeCellSize(true);\n }",
"Integer getCurrentHeight();",
"void setFitHeight(short height);",
"@Override \r\n public void onWindowFocusChanged(boolean hasFocus) {\n super.onWindowFocusChanged(hasFocus); \r\n //获取ImageView组件的宽高 \r\n imageWidth = image_all.getWidth(); \r\n imageHeight = image_all.getHeight(); \r\n \r\n //计算每次自增自减的值 \r\n addWidth = imageWidth / 5; \r\n addHeight = imageHeight / 5; \r\n }",
"@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n }",
"public abstract void setNormalizedHeight(int i);"
] | [
"0.69163185",
"0.666156",
"0.65453655",
"0.6502497",
"0.644595",
"0.6423595",
"0.64125174",
"0.6300663",
"0.6284631",
"0.6262397",
"0.6228059",
"0.6222905",
"0.6219349",
"0.6147509",
"0.6131417",
"0.610565",
"0.6101213",
"0.607861",
"0.6076779",
"0.60758454",
"0.60605955",
"0.60586065",
"0.6052026",
"0.6040915",
"0.60263187",
"0.60149443",
"0.6014602",
"0.6007323",
"0.6007323",
"0.6004189",
"0.60020816",
"0.59936976",
"0.5991461",
"0.59875405",
"0.59838295",
"0.59788316",
"0.5965411",
"0.5962715",
"0.5952187",
"0.59471196",
"0.59421855",
"0.59421855",
"0.5940175",
"0.593271",
"0.59280527",
"0.5925937",
"0.5925776",
"0.5916137",
"0.5913683",
"0.59129536",
"0.59036773",
"0.5900581",
"0.5888469",
"0.5888469",
"0.5882836",
"0.58811104",
"0.58802444",
"0.58777297",
"0.5877516",
"0.58767",
"0.58571297",
"0.5849083",
"0.58263373",
"0.5822904",
"0.5818089",
"0.5816048",
"0.5815015",
"0.5809566",
"0.5799536",
"0.5794709",
"0.5794709",
"0.5790409",
"0.5782196",
"0.57816124",
"0.5779236",
"0.57787377",
"0.57660425",
"0.5765999",
"0.5753821",
"0.5752201",
"0.5750268",
"0.57478946",
"0.57458776",
"0.5744775",
"0.57423604",
"0.5742239",
"0.5736359",
"0.5736359",
"0.57361734",
"0.5736136",
"0.5733995",
"0.57299316",
"0.5729732",
"0.5729026",
"0.57271034",
"0.57270795",
"0.5726237",
"0.5726109",
"0.5724559",
"0.5722988",
"0.5721369"
] | 0.0 | -1 |
extends Thread > runnable | public void run() {
// variables to store key HTTP(S) request information
String sReadLine;
boolean bNewHTTPHeader = true;
String sHTTPMethod = "";
String sHTTPRequest = "";
boolean bPersistentConnection = true;
// print the client IP:port
System.out.println("client " + connectedClient.getInetAddress() + ":"
+ connectedClient.getPort() + " is connected");
System.out.println();
// create BufferedReader to read in from socket & DataOutputStream to send out to socket
try {
inFromClient = new BufferedReader(new InputStreamReader(connectedClient.getInputStream()));
outToClient = new DataOutputStream(connectedClient.getOutputStream());
} catch (IOException e) {
System.out.println("There was an error setting up the buffered reader, " +
"data stream, or reading from the client:");
System.out.println(" " + e);
}
// process the HTTP(S) request
try {
// break apart the input to read the http method and request
while ((sReadLine = inFromClient.readLine()) != null) {
// create a tokenizer to parse the string
StringTokenizer tokenizer = new StringTokenizer(sReadLine);
// if new HTTP header, then pull out the Method and Request (first line)
if (bNewHTTPHeader) {
sHTTPMethod = tokenizer.nextToken().toUpperCase(); // HTTP method: GET, HEAD
sHTTPRequest = tokenizer.nextToken().toLowerCase(); // HTTP query: file path
bNewHTTPHeader = false; // next lines are not part of a new HTTP header
// print to console
System.out.println("New HTTP Header:");
System.out.println(" HTTP Method: " + sHTTPMethod);
System.out.println(" HTTP Request: " + sHTTPRequest);
// not a new HTTP header: check for key params Connection or empty line
} else if (sReadLine.length() > 0) {
// get the next token in the input line
String sParam = tokenizer.nextToken();
// check to update connection status
if (sParam.equalsIgnoreCase("Connection:")) {
String sConnectionRequest = tokenizer.nextToken();
bPersistentConnection = (sConnectionRequest.equalsIgnoreCase("keep-alive"));
// print param to console
System.out.println(" param: " + sParam + " " + sConnectionRequest);
} else {
// otherwise just print param to console
System.out.println(" param: " + sParam);
}
// no more lines to header: header is over
} else {
//print to console
System.out.println("End of Header");
System.out.println();
// get the status code & response, then send back to client
int iStatusCode = getStatusCode(sHTTPMethod, sHTTPRequest);
String sResponse = getResponse(sHTTPMethod, sHTTPRequest, iStatusCode);
sendResponse(sHTTPMethod, sHTTPRequest, iStatusCode, sResponse, bPersistentConnection);
// next line is part of a new HTTP header
bNewHTTPHeader = true;
}
}
// loop has ended: client input is null (client must want to disconnect)
this.connectedClient.close();
System.out.println("input from client " + connectedClient.getInetAddress() +
+ connectedClient.getPort() + " is null. This socket closed.");
} catch (IOException e) {
System.out.println("There was an error reading the HTTP request:");
System.out.println(" " + e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void run() {}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\t\t\t\t\n\t}",
"public void run() {\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\n public void run(){\n }",
"public void run() {\r\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n protected void runInListenerThread(Runnable runnable) {\n runnable.run();\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\tpublic void run()\n\t{\n\n\t}",
"@Override\n public void run()\n {\n }",
"@Override\n public void run()\n {\n }",
"public void run(){\n //logic to execute in a thread \n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"public void run() {\n\t\t\n\t}",
"@Override\n\t\tpublic void run() {\n\n\t\t}",
"@Override\n public void run()\n {\n\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\tpublic void run()\n\t{\n\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"public void run()\r\n\t{\r\n\t\t\r\n\t}",
"public void run() {\n }",
"public void run() {\n }",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"@Override\r\n\tpublic void run() {\n\t}",
"@Override\r\n\tpublic void run() {\n\t}",
"public void run()\n\t{\n\t}",
"public void run() {\n\n\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\tpublic void run() {\n\t}",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"@Override\r\n public void run() {\n }",
"public void run()\n {\n }",
"public void run()\n {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }"
] | [
"0.75462306",
"0.75315017",
"0.75315017",
"0.74886465",
"0.74886465",
"0.74875474",
"0.74875474",
"0.7487275",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7483098",
"0.7481563",
"0.74775356",
"0.7477486",
"0.7477486",
"0.7477486",
"0.7477486",
"0.7477486",
"0.7477486",
"0.7477486",
"0.7477486",
"0.7477486",
"0.7471117",
"0.7464924",
"0.7428755",
"0.7428755",
"0.7425414",
"0.7422921",
"0.7422921",
"0.7422921",
"0.7418674",
"0.7417982",
"0.7417982",
"0.74097604",
"0.74045986",
"0.7400161",
"0.7400161",
"0.7400161",
"0.7400161",
"0.7400161",
"0.7400161",
"0.7400161",
"0.7399109",
"0.7399109",
"0.7394462",
"0.7391669",
"0.7389676",
"0.7383899",
"0.7383899",
"0.7380585",
"0.7365196",
"0.73447853",
"0.73447853",
"0.73447853",
"0.73447853",
"0.73447853",
"0.73447853",
"0.73447853",
"0.7341659",
"0.7327426",
"0.7327426",
"0.7327426",
"0.7327426",
"0.7327426",
"0.7324401",
"0.7320401",
"0.7320401",
"0.73125136",
"0.73125136",
"0.73125136",
"0.73125136",
"0.73125136",
"0.73120695",
"0.73120695",
"0.73099124",
"0.7302087",
"0.7298332",
"0.7298332",
"0.7297991",
"0.7292663",
"0.7292663",
"0.7292663",
"0.7292663",
"0.72910845",
"0.7287985",
"0.7287985",
"0.7285783",
"0.7285783"
] | 0.0 | -1 |
MAIN HTTP METHODS send the HTTP response back to the client | private void sendResponse(String sHTTPMethod, String sHTTPRequest, int iStatusCode, String sResponse, boolean bPersistentConnection) {
// determine if sending file and if redirect -> determines response
boolean bIsFileSend = sHTTPMethod.equalsIgnoreCase("GET") && iStatusCode == 200;
boolean bIsRedirect = iStatusCode == 301;
// write header
String sStatus = getStatusLine(iStatusCode) + END_LINE;
String sLocation = (bIsRedirect) ? ("Location: " + sResponse) + END_LINE : (""); // only if redirect
String sServerDetails = getServerDetails() + END_LINE;
String sContentLength = "Content-Length: " + sResponse.length() + END_LINE;
String sContentType = getContentType(sHTTPRequest) + END_LINE;
String sConnection = getConnectionLine(bPersistentConnection) + END_LINE;
String sSpaceBetweenHeaderAndBody = END_LINE;
FileInputStream fin = null;
// update content length if sending a file -> create file input stream
if (bIsFileSend) {
try {
fin = new FileInputStream(ROOT_FOLDER.toString() + "/" + sResponse); // if file request, then sResponse is the file path
sContentLength = "Content-Length: " + Integer.toString(fin.available()) + END_LINE;
} catch (IOException e) {
System.out.println("There was an error creating the file input stream for the response:");
System.out.println(" " + e);
}
}
try {
// send HTTP Header
outToClient.writeBytes(sStatus);
if (bIsRedirect) {
outToClient.writeBytes(sLocation); // only send Location on redirect
}
outToClient.writeBytes(sServerDetails);
outToClient.writeBytes(sContentType);
outToClient.writeBytes(sContentLength);
outToClient.writeBytes(sConnection);
outToClient.writeBytes(sSpaceBetweenHeaderAndBody);
// send HTTP Body
if (bIsFileSend) {
sendFile(fin, outToClient); // send file
} else if (!bIsRedirect && !sHTTPMethod.equalsIgnoreCase("HEAD")) {
outToClient.writeBytes(sResponse); // send HTML msg back
}
// print HTTP Header and Body to console
System.out.println(sStatus);
System.out.println(sServerDetails);
System.out.println(sContentType);
System.out.println(sContentLength);
System.out.println(sConnection);
if (bIsRedirect) {
System.out.println(sLocation);
}
if (bIsFileSend) {
System.out.println("File sent: " + sResponse);
} else {
System.out.println("Response: " + sResponse);
}
System.out.println();
// close connection
if (!bPersistentConnection) {
outToClient.close();
}
} catch (IOException e) {
System.out.println("writeBytes did not complete:");
System.out.println(" " + e + "\n");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract HTTPResponse finish();",
"public Response send() {\n setupAndConnect();\n setRequestMethod();\n setRequestBody();\n setRequestHeaders();\n writeRequestBody();\n getResponse();\n connection.disconnect();\n return response;\n }",
"public void run() {\n req.response().end(\"0\"); // Default response = 0\n }",
"private static void sendHttpResponse(ChannelHandlerContext ctx, FullHttpRequest req, FullHttpResponse res) {\n if (res.getStatus().code() != 200) {\n ByteBuf buf = Unpooled.copiedBuffer(res.getStatus().toString(), CharsetUtil.UTF_8);\n res.content().writeBytes(buf);\n buf.release();\n setContentLength(res, res.content().readableBytes());\n }\n\n // Send the response and close the connection if necessary.\n ChannelFuture f = ctx.channel().writeAndFlush(res);\n if (!isKeepAlive(req) || res.getStatus().code() != 200) {\n f.addListener(ChannelFutureListener.CLOSE);\n }\n }",
"@Override\n\tpublic void sendResponse() {\n\t\t\n\t}",
"void sendResponseMessage(HttpResponse response) throws IOException;",
"protected HttpResponse doReceiveResponse(final HttpRequest request, final HttpClientConnection conn,\n final HttpContext context)\n throws HttpException, IOException\n {\n// log.debug(\"EspMeshHttpRequestExecutor::doReceiveResponse()\");\n if (request == null)\n {\n throw new IllegalArgumentException(\"HTTP request may not be null\");\n }\n if (conn == null)\n {\n throw new IllegalArgumentException(\"HTTP connection may not be null\");\n }\n if (context == null)\n {\n throw new IllegalArgumentException(\"HTTP context may not be null\");\n }\n \n HttpResponse response = null;\n int statuscode = 0;\n \n // check whether the request is instantly, instantly request don't wait the response\n boolean isInstantly = request.getParams().isParameterTrue(EspHttpRequest.ESP_INSTANTLY);\n if (isInstantly)\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n // let the connection used only once to check whether the device is available\n context.setAttribute(\"timeout\", 1);\n response = ResponseFactory.newHttpResponse(statusline, context);\n Header contentLengthHeader = new BasicHeader(HTTP.CONTENT_LEN, \"0\");\n response.addHeader(contentLengthHeader);\n }\n else\n {\n if (!request.getRequestLine().getMethod().equals(EspHttpRequest.METHOD_COMMAND))\n {\n while (response == null || statuscode < HttpStatus.SC_OK)\n {\n \n response = conn.receiveResponseHeader();\n if (canResponseHaveBody(request, response))\n {\n conn.receiveResponseEntity(response);\n }\n statuscode = response.getStatusLine().getStatusCode();\n \n } // while intermediate response\n }\n else\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n response = ResponseFactory.newHttpResponse(statusline, context);\n // copy request headers\n // Header[] requestHeaders = request.getAllHeaders();\n // for (Header requestHeader : requestHeaders) {\n // System.out.println(\"requestHeader:\" + requestHeader);\n // response.addHeader(requestHeader);\n // }\n \n Header[] contentLengthHeader = request.getHeaders(HTTP.CONTENT_LEN);\n if (contentLengthHeader == null || contentLengthHeader.length != 1)\n {\n throw new IllegalArgumentException(\"contentLengthHeader == null || contentLengthHeader.length != 1\");\n }\n // at the moment, mesh command request and response len is the same\n response.addHeader(contentLengthHeader[0]);\n \n conn.receiveResponseEntity(response);\n }\n }\n \n // for device won't reply \"Connection: Keep-Alive\" by default, add the header by manual\n if (response != null && response.getFirstHeader(HTTP.CONN_DIRECTIVE) == null)\n {\n response.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);\n }\n \n return response;\n \n }",
"@Override\n\tpublic void sendResponse() {\n\n\t}",
"public abstract String getResponse();",
"void httpResponse (HttpHeader response, BufferHandle bufferHandle, \n\t\t boolean keepalive, boolean isChunked, long dataSize);",
"public HTTPResponse finish() {\n HTTPResponse response = new HTTPResponse();\n if (super.requestURL.endsWith(\"&\")) {\n super.requestURL = super.requestURL.substring(0, super.requestURL.length() - 1);\n }\n try {\n super.CreateConnection();\n response.setResponseCode(super.httpConn.getResponseCode());\n response.setResponseBody(super.readResponseBody());\n super.httpConn.disconnect();\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n }\n return response;\n }",
"private static void sendHttpResponse(\n ChannelHandlerContext ctx, FullHttpRequest req, FullHttpResponse res) {\n if (res.status().code() != 200) {\n ByteBuf buf = Unpooled.copiedBuffer(res.status().toString(), CharsetUtil.UTF_8);\n res.content().writeBytes(buf);\n buf.release();\n HttpHeaderUtil.setContentLength(res, res.content().readableBytes());\n\n }\n\n // Send the response and close the connection if necessary.\n ChannelFuture f = ctx.channel().writeAndFlush(res);\n if (!HttpHeaderUtil.isKeepAlive(req) || res.status().code() != 200) {\n f.addListener(ChannelFutureListener.CLOSE);\n }\n }",
"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 HTTPResponse finish() {\n HTTPResponse response = new HTTPResponse();\n try {\n super.CreateConnection();\n outputStream = super.httpConn.getOutputStream();\n writer = new PrintWriter(new OutputStreamWriter(outputStream, super.charset),\n true);\n addParametersToWriter();\n addFilesToWriter();\n writer.append(LINE_FEED).flush();\n writer.append(\"--\" + boundary + \"--\").append(LINE_FEED);\n writer.close();\n\n response.setResponseCode(super.httpConn.getResponseCode());\n response.setResponseBody(super.readResponseBody());\n\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n }\n\n return response;\n }",
"java.lang.String getResponse();",
"@Override\n\tpublic void run(){\n\t\tSystem.out.println(\"run\");\n\t\ttry {\n\t\t\tString firstLine = inFromClient.readLine();\n\t\t\tSystem.out.println(\"Received: \" + firstLine);\n\n\t\t\tboolean badRequest = false;\n\t\t\tString[] array = firstLine.split(\" \");\n\t\t\tString HTTPcommand = array[0];\n\t\t\tString URI = array[1];\n\t\t\tString HTTPversion = array[2];\n\t\t\tString path = \"\";\n\t\t\t\n\t\t\tint indexSlash = URI.lastIndexOf(\"/\");\n\t\t\tSystem.out.println(indexSlash);\n\t\t\tpath = URI.substring(indexSlash+1, URI.length());\n\n\t\t\t\n\t\t\tString secondLine = inFromClient.readLine();\n\t\t\tif (!HTTPversion.equals(\"HTTP/1.1\")) {\n\t\t\t\tbadRequest = true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (badRequest) {\n\t\t\t\tout.println(\"HTTP/1.1 400 Bad Request\");\n\t\t\t\tout.println('\\r' + '\\n' + '\\r' + '\\n');\n\t\t\t\tout.flush();\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\tswitch(HTTPcommand){\n\t\t\t\tcase \"HEAD\": Head.head(clientSocket, inFromClient, out, path);\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"GET\": Get.get(clientSocket, inFromClient, out, path);\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"PUT\": {\n\t\t\t\t\tout.println(\"HTTP/1.1 200 OK\");\n\t\t\t\t\tout.println('\\r' + '\\n' + '\\r' + '\\n');\n\t\t\t\t\tout.flush();\n\t\t\t\t\tString Line3 = inFromClient.readLine();\n\t\t\t\t\tString Line4 = inFromClient.readLine();\n\t\t\t\t\tString Line5 = inFromClient.readLine();\n\t\t\t\t\tPut.put(inFromClient, path);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"POST\": {\n\t\t\t\t\tout.println(\"HTTP/1.1 200 OK\");\n\t\t\t\t\tout.println('\\r' + '\\n' + '\\r' + '\\n');\n\t\t\t\t\tout.flush();\n\t\t\t\t\tString Line3 = inFromClient.readLine();\n\t\t\t\t\tString Line4 = inFromClient.readLine();\n\t\t\t\t\tString Line5 = inFromClient.readLine();\n\t\t\t\t\tPost.post(inFromClient, path);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tdefault: {\n\t\t\t\t\tout.println(\"HTTP/1.1 501 Not Implemented\");\n\t\t\t\t\tout.println('\\r' + '\\n' + '\\r' + '\\n');\n\t\t\t\t\tout.flush();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\t\t//run();\n\n\t\t//inFromClient.close();\n\t\t//serverSocket.close();\n\t}",
"private void getResponse() {\n response = new Response();\n\n getResponseCode();\n getResponseMessage();\n getResponseBody();\n\n LOG.info(\"--- RESPONSE ---\");\n LOG.info(\"Code: \" + response.getResponseCode());\n LOG.info(\"Message: \" + response.getResponseMessage());\n LOG.info(\"Body: \" + response.getResponseBody());\n LOG.info(\"*************************************\");\n }",
"String getResponse();",
"private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }",
"public ServletResponse getResponse();",
"@Override\n public void call(final HttpTrade trade) {\n final FullHttpResponse response = new DefaultFullHttpResponse(\n HttpVersion.HTTP_1_0, OK, \n Unpooled.wrappedBuffer(HttpTestServer.CONTENT));\n response.headers().set(HttpHeaderNames.CONTENT_TYPE, \"text/plain\");\n // missing Content-Length\n// response.headers().set(CONTENT_LENGTH, response.content().readableBytes());\n response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);\n trade.outboundResponse(Observable.just(response));\n }",
"@Override\n public void call(final HttpTrade trade) {\n final FullHttpResponse response = new DefaultFullHttpResponse(\n HttpVersion.HTTP_1_0, OK, \n Unpooled.wrappedBuffer(HttpTestServer.CONTENT));\n response.headers().set(HttpHeaderNames.CONTENT_TYPE, \"text/plain\");\n // missing Content-Length\n// response.headers().set(CONTENT_LENGTH, response.content().readableBytes());\n response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);\n trade.outboundResponse(Observable.just(response));\n }",
"@Override\r\n\t\t\t\t\tpublic void onResponse(HttpResponse resp) {\n\t\t\t\t\t\tLog.i(\"HttpPost\", \"Success\");\r\n\r\n\t\t\t\t\t}",
"public void sendRequest() {\n\t\tURL obj;\n\t\ttry {\n\t\t\t// Instantiating HttpURLConnection object for making GET request.\n\t\t\tobj = new URL(REQUEST_URL);\n\t\t HttpURLConnection connection = (HttpURLConnection) obj.openConnection();\n\t\t connection.setRequestMethod(REQUEST_METHOD);\n\t\t connection.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t connection.setInstanceFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\tHttpURLConnection.setFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\n\t\t\t// Checking response code for successful request.\n\t\t\t// If responseCode==200, read the response,\n\t\t\t// if responseCode==3xx, i.e., a redirect, then make the request to \n\t\t\t// new redirected link, specified by 'Location' field. \n\t\t\t// NOTE: Only one level of redirection is supported for now. \n\t\t\t// Can be modified to support multiple levels of Redirections.\n\t\t\tint responseCode = connection.getResponseCode();\n\t\t\tif(responseCode == HttpURLConnection.HTTP_MOVED_PERM ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_MOVED_TEMP ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_SEE_OTHER) {\n\t\t\t\tlogger.info(\"Redirect received in responseCode\");\n\t\t\t\tString newUrl = connection.getHeaderField(\"Location\");\n\t\t\t\tconnection = (HttpURLConnection) new URL(newUrl).openConnection();\n\t\t\t}\n\t\t\tresponseCode = connection.getResponseCode();\n\t\t\t\n\t\t\t// process response message if responseCode==200 i.e., success.\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tconnection.getInputStream()));\n\t\t\t\tString inputLine;\n\t\t\t\tStringBuffer response = new StringBuffer();\n\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\t\tresponse.append(inputLine);\n\t\t\t\t}\n\t\t\t\tin.close();\n\t\t\t\t//Uncomment following line to log response data.\n\t\t\t\t//logger.info(response.toString());\n\t\t\t} else {\n\t\t\t\tlogger.warning(\"Http GET request was unsuccessful!\");\n\t\t\t}\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.severe(\"MalformedURLException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tlogger.severe(\"IOException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public int accept(HttpResponseProlog prolog, HttpHeaders headers);",
"public int getResponse() {return response;}",
"@Override\n public void call(final HttpTrade trade) {\n final FullHttpResponse response = new DefaultFullHttpResponse(\n HttpVersion.HTTP_1_0, OK, \n Unpooled.wrappedBuffer(HttpTestServer.CONTENT));\n response.headers().set(HttpHeaderNames.CONTENT_TYPE, \"text/plain\");\n // BAD Content-Length, actual length + 1\n response.headers().set(HttpHeaderNames.CONTENT_LENGTH, \n response.content().readableBytes() + 1);\n response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);\n trade.outboundResponse(Observable.just(response));\n }",
"@Override\n public void call(final HttpTrade trade) {\n final FullHttpResponse response = new DefaultFullHttpResponse(\n HttpVersion.HTTP_1_0, OK, \n Unpooled.wrappedBuffer(HttpTestServer.CONTENT));\n response.headers().set(HttpHeaderNames.CONTENT_TYPE, \"text/plain\");\n // BAD Content-Length, actual length + 1\n response.headers().set(HttpHeaderNames.CONTENT_LENGTH, \n response.content().readableBytes() + 1);\n response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);\n trade.outboundResponse(Observable.just(response));\n }",
"public boolean sendHTTPResponseGET(String getRES, Socket link) throws IOException{\n\t\tDataOutputStream ds = new DataOutputStream(link.getOutputStream());\n\t\tresourceHandler.ServerSideScripter objSvrSidScr = new resourceHandler.ServerSideScripter();\n\t\t\n\t\tString res=null;\t\t\n\t\t\n\t\tString WEBDOCS = serverConfig.ServerPaths.WEBDOCS;\n\t\tString defaultPage = serverConfig.ServerPaths.defaultPage;\n\n\t\tserverConfig.ServerPages svrPg = new serverConfig.ServerPages();\n\t\tString WEBRoot = svrPg.getWebRoot();\n\t\tString WEBErr = svrPg.getWebErr();\n\n\t\tif(getRES.length()>0){\n\t \ttry{\n\t \t\tresourceHandler.ResReader resRead = new resourceHandler.ResReader();\n\t\t\t\tif(getRES.equalsIgnoreCase(\"/\") && defaultPage.length()>0){\n\t\t\t\t\tres=WEBDOCS+platformSpecificLocator(\"/\" + defaultPage);\n\t\t\t\t\tif(sendResponseHeader(res, TypeOfFile.StoredFile, objSvrSidScr)){//res Exists\n\t\t\t\t\t\tresRec.sendHTTPResponseHeader(ds);\n\t\t\t\t\t\tresRead.writeHTTPResponseMsg(res, ds, objSvrSidScr);\n\t\t\t\t\t}\n\t\t\t\t\telse{//res don't Exists\n\t\t\t\t\t\tsendResponseHeader(\"404\", TypeOfFile.StringFile, objSvrSidScr);\n\t\t\t\t\t\tresRec.sendHTTPResponseHeader(ds);\n\t \t\tds.writeBytes(WEBErr);\n\t \t\tds.writeChars(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse if(getRES.equalsIgnoreCase(\"/\") && defaultPage.length()==0){\n\t\t\t\t\tsendResponseHeader(\"200\", TypeOfFile.StringFile, objSvrSidScr);\n\t\t\t\t\tresRec.sendHTTPResponseHeader(ds);\n\t\t\t\t\tds.writeBytes(WEBRoot);\n \t\tds.writeChars(\"\\n\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tres=WEBDOCS+platformSpecificLocator(getRES);\n\t\t\t\t\tif(sendResponseHeader(res, TypeOfFile.StoredFile, objSvrSidScr)){\n\t\t\t\t\t\tresRec.sendHTTPResponseHeader(ds);\n\t\t\t\t\t\tSystem.out.println(\"++++++++++++++++responseMsg wrote\");\n\t\t\t\t\t\tresRead.writeHTTPResponseMsg(res, ds, objSvrSidScr);\n\t\t\t\t\t\tSystem.out.println(\"++++++++++++++++response clear\");\n\t\t\t\t\t}\n\t\t\t\t\telse{//res don't Exists\n\t\t\t\t\t\tsendResponseHeader(\"404\", TypeOfFile.StringFile, objSvrSidScr);\n\t\t\t\t\t\tresRec.sendHTTPResponseHeader(ds);\n\t \t\tds.writeBytes(WEBErr);\n\t \t\tds.writeChars(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Resource to Read: \" + res);\n \t\t/*ds.close();*/\n\t\t\t\treturn true;\n\t \t}\n catch (Exception e){\n \ttry{\n\t\t\t\t\tSystem.out.println(\"++++++++++++++++Exception Raised\");\n\t\t\t\t\tsendResponseHeader(\"404\", TypeOfFile.StringFile, objSvrSidScr);\n\t\t\t\t\tresRec.sendHTTPResponseHeader(ds);\n \t\tds.writeBytes(WEBErr);\n \t\tds.writeChars(\"\\n\");\n \t\t/*ds.close();*/\n \t\t\t\tSystem.out.println(\"Resource to Read: \" + res + \".{ERROR}\");\n \t\t\t\treturn true;\n \t\t\t} \n catch (Exception e2){\n \t\t\t\tSystem.err.println(\"File input error\");\n \t\t\t}\n\t\t\t}\n\t\t}\n else{\n \tSystem.out.println(\"Invalid parameters\");\n }\n \n return false;\n\t}",
"private void getAppResponse(String theuri, PrintWriter out) {\n String response = spring.executeService(theuri);\n String header = \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n out.println(header + response);\n }",
"public void run() {\n\t\ttry {\n\t\t\t// Get input and output streams to talk to the client\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(csocket.getInputStream()));\n\t\t\tPrintWriter out = new PrintWriter(csocket.getOutputStream());\n\t\t\t/*\n\t\t\t * read the input lines from client and perform respective action based on the\n\t\t\t * request\n\t\t\t */\n\t\t\tString line;\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\t// return if all the lines are read\n\t\t\t\tif (line.length() == 0)\n\t\t\t\t\tbreak;\n\t\t\t\telse if (line.contains(\"GET\") && line.contains(\"/index.html\")) {\n\t\t\t\t\t/*\n\t\t\t\t\t * get the respective file requested by the client i.e index.html\n\t\t\t\t\t */\n\t\t\t\t\tFile file = new File(WEB_ROOT, \"/index.html\");\n\t\t\t\t\t// send HTTP Headers\n\t\t\t\t\tout.println(\"HTTP/1.1 200 OK\");\n\t\t\t\t\tout.println(\"Date: \" + new Date());\n\t\t\t\t\tout.println(\"Content-length: \" + file.length());\n\t\t\t\t\tout.println(); // blank line between headers and content\n\t\t\t\t\tout.flush(); // flush character output stream buffer\n\t\t\t\t\tout.write(FileUtils.readFileToString(file, \"UTF-8\"), 0, ((int) file.length()));\n\t\t\t\t} else if (line.contains(\"PUT\")) {\n\t\t\t\t\t/*\n\t\t\t\t\t * put the respective file at a location on local\n\t\t\t\t\t */\n\t\t\t\t\tString[] split = line.split(\" \");\n\t\t\t\t\tFile source = new File(split[1]);\n\t\t\t\t\tFile dest = new File(WEB_ROOT, \"clientFile.html\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// copy the file to local storage\n\t\t\t\t\t\tFileUtils.copyFile(source, dest);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t// send HTTP Headers\n\t\t\t\t\tout.println(\"HTTP/1.1 200 OK\");\n\t\t\t\t\tout.println(\"Date: \" + new Date());\n\t\t\t\t\tout.println(); // blank line between headers and content\n\t\t\t\t\tout.flush(); // flush character output stream buffer\n\t\t\t\t} else {\n\t\t\t\t\tout.print(line + \"\\r\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// closing the input and output streams\n\t\t\tout.close(); // Flush and close the output stream\n\t\t\tin.close(); // Close the input stream\n\t\t\tcsocket.close(); // Close the socket itself\n\t\t} // If anything goes wrong, print an error message\n\t\tcatch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t\tSystem.err.println(\"Usage: java HttpMirror <port>\");\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void sendResponse(String string) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void sendResponse(String string) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void sendResponse(String string) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) {\n if (msg instanceof HttpResponse) {\n //clear the buffer.\n _responseBodyBuf.clear();\n //\n HttpResponse response = (HttpResponse) msg;\n //get HTTP Response code.\n this._hcr._responseStatus = response.getStatus();\n //\n //print header.\n Set<String> headers = response.headers().names();\n for (Iterator<String> keyIter = headers.iterator(); keyIter.hasNext();) {\n String keyName = keyIter.next();\n //System.out.println(keyName + \":\" + response.headers().get(keyName));\n this._hcr._responseHeaderMap.put(keyName, response.headers().get(keyName));\n }\n }\n //content or lastContent\n if (msg instanceof HttpContent) {\n HttpContent content = (HttpContent) msg;\n _responseBodyBuf.writeBytes(content.content());\n //if is last content fire done.\n if (content instanceof LastHttpContent) {\n try {\n fireDone(_responseBodyBuf.toString(this._hcr._responseBodyCharset));\n } finally {\n ctx.close();\n releaseResource();\n }\n }\n }\n }",
"protected void send(OutputStream outputStream) {\n\t\t\tSimpleDateFormat gmtFrmt = new SimpleDateFormat(\"E, d MMM yyyy HH:mm:ss 'GMT'\",\n\t\t\t\t\tLocale.US);\n\t\t\tgmtFrmt.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\n\t\t\ttry {\n\t\t\t\tif (this.status == null) {\n\t\t\t\t\tthrow new Error(\"sendResponse(): Status can't be null.\");\n\t\t\t\t}\n\t\t\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(\n\t\t\t\t\t\toutputStream, \"UTF-8\")), false);\n\t\t\t\tpw.append(\"HTTP/1.1 \").append(this.status.getDescription()).append(\" \\r\\n\");\n\t\t\t\tif (this.mimeType != null) {\n\t\t\t\t\tprintHeader(pw, \"Content-Type\", this.mimeType);\n\t\t\t\t}\n\t\t\t\tif (getHeader(\"date\") == null) {\n\t\t\t\t\tprintHeader(pw, \"Date\", gmtFrmt.format(new Date()));\n\t\t\t\t}\n\t\t\t\tfor (Entry<String, String> entry : this.header.entrySet()) {\n\t\t\t\t\tprintHeader(pw, entry.getKey(), entry.getValue());\n\t\t\t\t}\n\t\t\t\tif (getHeader(\"connection\") == null) {\n\t\t\t\t\tprintHeader(pw, \"Connection\", (this.keepAlive ? \"keep-alive\" : \"close\"));\n\t\t\t\t}\n\t\t\t\tif (getHeader(\"content-length\") != null) {\n\t\t\t\t\tencodeAsGzip = false;\n\t\t\t\t}\n\t\t\t\tif (encodeAsGzip) {\n\t\t\t\t\tprintHeader(pw, \"Content-Encoding\", \"gzip\");\n\t\t\t\t\tsetChunkedTransfer(true);\n\t\t\t\t}\n\t\t\t\tlong pending = this.data != null ? this.contentLength : 0;\n\t\t\t\tif (this.requestMethod != Method.HEAD && this.chunkedTransfer) {\n\t\t\t\t\tprintHeader(pw, \"Transfer-Encoding\", \"chunked\");\n\t\t\t\t} else if (!encodeAsGzip) {\n\t\t\t\t\tpending = sendContentLengthHeaderIfNotAlreadyPresent(pw, pending);\n\t\t\t\t}\n\t\t\t\tpw.append(\"\\r\\n\");\n\t\t\t\tpw.flush();\n\t\t\t\tsendBodyWithCorrectTransferAndEncoding(outputStream, pending);\n\t\t\t\toutputStream.flush();\n\t\t\t\tsafeClose(this.data);\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tNanoHTTPDSingleFile.LOG.log(Level.SEVERE, \"Could not send response to the client\",\n\t\t\t\t\t\tioe);\n\t\t\t}\n\t\t}",
"private void serve() {\n\t\tif (request == null) {\n\t\t\tchannel.close();\n\t\t\treturn;\n\t\t}\n\t\tlogger.fine(\"Serving \" + type + \" request : \" + request.getPath());\n\t\tResponse resp = RequestHandler.handle(request);\n\t\tif (resp.getRespCode() == ResponseCode.NOT_FOUND) {\n\t\t\terror404(resp);\n\t\t\treturn;\n\t\t}\n\n\t\tStringBuilder header = new StringBuilder();\n\t\tif (type == Type.HTTP) {\n\t\t\theader.append(\"HTTP/1.0 200 OK\\r\\n\");\n\t\t\theader.append(\"Content-Length: \")\n\t\t\t\t\t.append(resp.getFileData().remaining()).append(\"\\r\\n\");\n\t\t\theader.append(\"Connection: close\\r\\n\");\n\t\t\theader.append(\"Server: Hyperion/1.0\\r\\n\");\n\t\t\theader.append(\"Content-Type: \" + resp.getMimeType() + \"\\r\\n\");\n\t\t\theader.append(\"\\r\\n\");\n\t\t}\n\t\tbyte[] headerBytes = header.toString().getBytes();\n\n\t\tByteBuffer bb = resp.getFileData();\n\t\tChannelBuffer ib = ChannelBuffers.buffer(bb.remaining()\n\t\t\t\t+ headerBytes.length);\n\t\tib.writeBytes(headerBytes);\n\t\tib.writeBytes(bb);\n\t\tchannel.write(ib).addListener(ChannelFutureListener.CLOSE);\n\t}",
"public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\r\n\t\t\t\tPrintWriter printWriter = null;\r\n\t\t\t\tBufferedReader bufferedReader = null;\r\n\r\n\t\t\t\tStringBuffer response = new StringBuffer();\r\n\t\t\t\tStringBuffer request = new StringBuffer();\r\n\r\n\t\t\t\t// 组织请求参数\r\n\t\t\t\tif (null != params && !params.isEmpty()){\r\n\t\t\t\t\tfor (Map.Entry<String, String> entry : params.entrySet()){\r\n\t\t\t\t\t\trequest.append(entry.getKey()).append(\"=\").append(entry.getValue()).append(\"&\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//< 删除多余的&\r\n\t\t\t\t\trequest.deleteCharAt(request.length() - 1);\r\n\t\t\t\t}\r\n\t\t\t\tLog.d(\"HttpUtil\", request.toString());\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"POST\");\r\n\t\t\t\t\tconnection.setRequestProperty(\"Content-Length\", String.valueOf(request.length()));\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\tconnection.setDoOutput(true);\r\n\t\t\t\t\tprintWriter = new PrintWriter(connection.getOutputStream());\r\n\t\t\t\t\tprintWriter.write(request.toString());\r\n\t\t\t\t\tprintWriter.flush();\r\n\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Post Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Post Success\");\r\n\t\t\t\t\t\tbufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (printWriter != null) {\r\n\t\t\t\t\t\t\tprintWriter.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (bufferedReader != null) {\r\n\t\t\t\t\t\t\tbufferedReader.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"private void clientResponse(String msg) {\n JSONObject j = new JSONObject();\n j.put(\"statuscode\", 200);\n j.put(\"sequence\", ++sequence);\n j.put(\"response\", new JSONArray().add(msg));\n output.println(j);\n output.flush();\n }",
"@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}",
"public void serverSideOk();",
"@Override\n\tpublic void run() {\n\t\tPrintWriter out;\n\t\ttry {\n\t\t\tout = new PrintWriter(s.getOutputStream());\n\t\t\tout.print(\"HTTP/1.1 200 Ok\\n\\r\"+ \n\"Server: nginx/1.8.0\\n\\r\"+\n\"Date: Mon, 07 Dec 2015 09:11:39 GMT\\n\\r\"+ \n\"Content-Type: text/html\\n\\r\"+\n\"Connection: close\\n\\r\\n\\r\"+\n\"<html>\"+ \n\"<head><title>Test ok</title></head>\"+\n\"<body bgcolor=\\\"white\\\"> \"+\n\"<center><h1>HELLO</h1></center>\"+ \n\"</body>\"+\n\"</html>\"); \n\t\t\tout.close();\n\t\t\ts.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\n\n\t\n\t\t\n\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"GetResponse() {\n\t}",
"public String finish() throws IOException {\n StringBuffer response = new StringBuffer();\n\n writer.append(LINE_FEED).flush();\n writer.append(\"--\" + boundary + \"--\").append(LINE_FEED);\n writer.close();\n\n // checks server's status code first\n int status = httpConn.getResponseCode();\n if (status == HttpURLConnection.HTTP_OK) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n httpConn.getInputStream()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n response.append(line);\n }\n reader.close();\n httpConn.disconnect();\n } else {\n httpConn.disconnect();\n throw new IOException(\"Server returned non-OK status: \" + status);\n }\n\n return response.toString();\n }",
"public String receiveResponse()\n\t{\n\t\t\n\t}",
"@Override\n public void sendResponse(final Response response) {\n\n }",
"public String finish() throws IOException {\n StringBuffer response = new StringBuffer();\n\n writer.append(LINE_FEED).flush();\n writer.append(\"--\" + boundary + \"--\").append(LINE_FEED);\n writer.close();\n\n // checks server's status code first\n int status = httpConn.getResponseCode();\n if (status == HttpURLConnection.HTTP_OK) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n httpConn.getInputStream()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n response.append(line);\n }\n reader.close();\n httpConn.disconnect();\n } else {\n throw new IOException(\"Server returned non-OK status: \" + status);\n }\n\n return response.toString();\n }",
"private static HttpResponse sendGet() throws Exception {\n // Create the Call using the URL\n HttpGet http = new HttpGet(url);\n // Set the credentials set earlier into the headers\n Header header = new BasicScheme(StandardCharsets.UTF_8).authenticate(creds, http, null);\n // Set the header into the HTTP request\n http.addHeader(header);\n // Print the response\n return httpClient.execute(http);\n }",
"private synchronized void processHttpRequest\n\t\t(HttpRequest request,\n\t\t HttpResponse response)\n\t\tthrows IOException\n\t\t{\n\t\tlong now = System.currentTimeMillis();\n\n\t\t// Reject an invalid HTTP request.\n\t\tif (! request.isValid())\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_400_BAD_REQUEST);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"400 Bad Request\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all methods except GET.\n\t\telse if (! request.getMethod().equals (HttpRequest.GET_METHOD))\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_501_NOT_IMPLEMENTED);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"501 Not Implemented\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the status document.\n\t\telse if (request.getUri().equals (\"/\") ||\n\t\t\t\t\trequest.getUri().equals (\"/?\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tprintStatusHtmlBody (out, now);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the debug document.\n\t\telse if (request.getUri().equals (\"/debug\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintDebugHtmlStart (out, now);\n\t\t\tprintDebugHtmlBody (out);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all other URIs.\n\t\telse\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_404_NOT_FOUND);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"404 Not Found\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Send the response.\n\t\tresponse.close();\n\t\t}",
"public void sendResponseToClient(PrintWriter out, BufferedOutputStream dataOut, String httpResponse)\r\n\t\t\tthrows IOException {\n\t\tout.println(\"HTTP/1.0 200 OK\");\r\n\t\tout.println(\"Content-length: \" + httpResponse.toString().length());\r\n\t\tout.println(); // blank line\r\n\t\tout.flush();\r\n\r\n\t\tdataOut.write(httpResponse.toString().getBytes(\"UTF-8\"));\r\n\t\tdataOut.flush();\r\n\t}",
"private void handleClient() {\n\t\t//Socket link = null;\n\t\tRequestRecord reqRec = new RequestRecord();\n\t\tResponder respondR = new Responder();\n\t\t\n\t\ttry {\n\t\t\t// STEP 1 : accepting client request in client socket\n\t\t\t//link = servSock.accept(); //-----> already done in *ThreadExecutor*\n\t\t\t\n\t\t\t// STEP 2 : creating i/o stream for socket\n\t\t\tScanner input = new Scanner(link.getInputStream());\n\t\t\tdo{\n\t\t\t\t//PrintWriter output = new PrintWriter(link.getOutputStream(),true);\n\t\t\t\t//DataOutputStream ds = new DataOutputStream(link.getOutputStream());\n\t\t\t\tint numMsg = 0;\n\t\t\t\tString msg = input.nextLine();\n\t\t\t\t\n\t\t\t\t//to write all requests to a File\n\t\t\t\tFileOutputStream reqFile = new FileOutputStream(\"reqFile.txt\");\n\t\t\t\tDataOutputStream dat = new DataOutputStream(reqFile);\n\t\t\t\t\n\t\t\t\t// STEP 4 : listening iteratively till close string send\n\t\t\t\twhile(msg.length()>0){\n\t\t\t\t\tnumMsg++;\n\t\t\t\t\tdat.writeChars(msg + \"\\n\");\n\t\t\t\t\tSystem.out.println(\"\\nNew Message Received\");\n\t\t\t\t\tif(reqRec.setRecord(msg)==false)\n\t\t\t\t\t\tSystem.out.println(\"\\n-----\\nMsg#\"+numMsg+\": \"+msg+\":Error with Request Header Parsing\\n-----\\n\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Msg#\" + numMsg + \": \" + msg);\n\t\t\t\t\tmsg = input.nextLine();\n\t\t\t\t};\n\t\t\t\tdat.writeChars(\"\\n-*-*-*-*-*-*-*-*-*-*-*-*-*-\\n\\n\");\n\t\t\t\tdat.close();\n\t\t\t\treqFile.close();\n\t\t\t\tSystem.out.println(\"---newEST : \" + reqRec.getResource());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\n==========Send HTTP Response for Get Request of\\n\"+reqRec.getResource()+\"\\n***********\\n\");\n\t\t\t\tif(respondR.sendHTTPResponseGET(reqRec.getResource(), link)==true)//RES, ds)==true)\n\t\t\t\t\tSystem.out.println(\"-----------Resource Read\");\n\t\t\t\tSystem.out.println(\"Total Messages Transferred: \" + numMsg);\n\t\t\t\t//link.close();\n\t\t\t\tif(reqRec.getConnection().equalsIgnoreCase(\"Keep-Alive\")==true && respondR.isResourceExisting(reqRec.getResource())==true)\n\t\t\t\t\tlink.setKeepAlive(true);\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}while(true);\n\t\t\tSystem.out.print(\"Request Link Over as Connection: \" + reqRec.getConnection());\n\t\t} catch (IOException e) {\n\t\t\tif(link.isClosed())\n\t\t\t\tSystem.out.print(\"\\n\\nCritical(report it to developer):: link closed at exception\\n\\n\");\n\t\t\tSystem.out.println(\"Error in listening.\\n {Error may be here or with RespondR}\\nTraceString: \");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// STEP 5 : closing the connection\n\t\t\tSystem.out.println(\"\\nClosing Connection\\n\");\n\t\t\ttry {\t\t\t\t\n\t\t\t\tlink.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Unable to disconnect.\\nTraceString: \");\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}/*ends :: try...catch...finally*/\n\t\t\n\t}",
"private ChannelFuture writeResponse() throws Throwable {\n\t\tif (isWriteResponse) {\n\t\t\tchannel.close();\n\t\t\treturn null;\n\t\t}\n\t\tString data = new String(\"SessionClose\");\n\t\tByteBuf buf = copiedBuffer(data, CharsetUtil.UTF_8);\n\t\t\n\n\t\tFullHttpResponse response;\n\t\t\tresponse = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,\n\t\t\t\t\tHttpResponseStatus.OK, buf);\n\n\t\tresponse.headers().set(CONTENT_TYPE, \"text/plain; charset=UTF-8\");\n\n\t\tresponse.headers().set(CONTENT_LENGTH, buf.readableBytes());\n\t\tlog.info(\"Write to client:\" + response.status().toString());\n\t\treturn channel.writeAndFlush(response);\n//\t\tChannelFuture future = channel.writeAndFlush(response);\n//\t\tboolean isDone = future.addListener(ChannelFutureListener.CLOSE).awaitUninterruptibly(1000*60*2);\n//\t\tif (isDone) {\n//\t\t\tlog.info(\"Close is done!\");\n//\t\t\tchannel.close();\n//\t\t}\n\t}",
"private static HttpResponse sendPost() throws Exception {\n // Create the Call using the URL\n HttpPost http = new HttpPost(url);\n // Set the credentials set earlier into the headers\n Header header = new BasicScheme(StandardCharsets.UTF_8).authenticate(creds, http, null);\n // Set the header into the HTTP request\n http.addHeader(header);\n // Print the response\n return httpClient.execute(http);\n }",
"private void generateResponseAndClose(HttpExchange exchange, String respText, int returnCode) throws IOException {\n exchange.sendResponseHeaders(returnCode, respText.getBytes().length);\n OutputStream output = exchange.getResponseBody();\n output.write(respText.getBytes());\n output.flush();\n exchange.close();\n }",
"protected abstract ClassicHttpResponse execute(ClassicHttpRequest request, HttpClientContext context) throws IOException;",
"@Override\n public byte[] execute() {\n return buildResponse();\n }",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\n public void handle(HttpExchange exchange) throws IOException {\n boolean wasSuccessful = false;\n try {\n // Only allow POST requests for this operation.\n // This operation requires a POST request, because the\n // client is \"posting\" information to the server for processing.\n if (exchange.getRequestMethod().toLowerCase().equals(\"get\")) {\n\n //String containing the url desired\n String URLrequested = exchange.getRequestURI().toString();\n\n //Checks to see if it is just the open URL as ex: localhost:8080, this is mapped to index.html, this is the case for nothing added.\n if (URLrequested.length() == 1){\n\n\n String location = \"web/index.html\";\n Path path = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n Files.copy(path, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n } else if (URLrequested.equals(\"/\")) {\n\n //\n String location = \"web\" + URLrequested;\n\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n //Copies Files into the exchange's responsive body header\n Files.copy(filePath, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n }\n else if(URLrequested.equals(\"/css/main.css\")){\n String location = \"web/css/main.css\";\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n //Copies Files into the response body\n Files.copy(filePath, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n }\n else{\n String location = \"web/HTML/404.html\";\n\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n //Response header needs to come first.\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_NOT_FOUND, 0);\n\n //Copies Files into the response body\n Files.copy(filePath, exchange.getResponseBody());\n\n\n //Completes the exchange\n exchange.getResponseBody().close();\n }\n wasSuccessful = true;\n\n\n }\n\n if (!wasSuccessful) {\n //Bad Server Response\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_BAD_REQUEST, 0);\n\n //Completes the exchange\n exchange.getResponseBody().close();\n }\n }\n catch (IOException e) {\n //Bad Server Response\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_SERVER_ERROR, 0);\n //Completes the exchange\n exchange.getResponseBody().close();\n e.printStackTrace();\n }\n }",
"public void run() {\n\t\t\n\t\ttry {\n\t\tString reqS = \"\";\n\t\t\n\t\twhile(br.ready() || reqS.length() == 0) //reading the request from the client.\n\t\t\treqS += (char) br.read();\n\t\t\n\t\tSystem.out.println(reqS); //to see what the request message looks like (testing if the input is read in correctly)\n\t\trequest req = new request(reqS);\n\t\t\n\t\tresponse res = new response(req);\n\t\t\n\t\tpw.write(res.response.toCharArray());\n\t\t\n\t\tpw.close();\n\t\tbr.close();\n\t\ts.close();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t}",
"public ServerResponse<T> sendRequest()\n {\n return this.sendRequestWithMultiHeaders(Collections.emptyMap());\n }",
"void responseSent( C conn ) ;",
"public void invoke() throws Exception, IOException {\n java.io.PrintWriter out = response.getWriter();\n out.println(\"Welcome to ping\");\n return;\n}",
"static void invokeResponse(RoutingContext rc, Method m, Object toret, String resultType) {\n String[] _corsAllowedIPs = getCORS(m);\n \n if (_corsAllowedIPs != null && _corsAllowedIPs.length > 0) {\n CORS.allow(rc, _corsAllowedIPs);\n }\n \n // Combine errors\n if (toret == null || !(toret instanceof RestResponse)){\n\n \t// Handling function didn't return a RestResponse object, return an appropriate error message\n rc.response().setStatusCode(500).setStatusMessage(\"Error: Function didn't return a RestResponse object\").end();\n \n // We don't \"have\" to throw an exception, a 500 may suffice and client may log error and message in their logs\n// new RuntimeException(\"The return type of a REST function must be a RestResponse\");\n }else {\n \t\n \t// Put the custom headers first, if any\n \tputHeaders(((RestResponse) toret).getHeaders(), rc);\n \t\n \t// PUt the custom status code/message, if any\n \tputStatus((RestResponse) toret, rc);\n \t\n if (resultType != null) {\n\n if (resultType.equals(\"file\")) {\n \t\n // Send the file\n rc.response().sendFile(((RestResponse) toret).getBody()).end();\n } else if (resultType.equals(\"json\")) {\n\n // Set the header for json content - will override any custom header for content-type\n rc.response().putHeader(\"content-type\", \"application/json; charset=utf-8\");\n \n rc.response().end(((RestResponse) toret).getBody());\n }\n } else {\n \t\n \t// New assumption: If result type not set, we're sending back whatever the custom headers say to return\n \t// or else if no custom headers for content-type, we'll return text\n \t\n \tif (!rc.response().headers().contains(\"content-type\")) {\n \t\trc.response().putHeader(\"content-type\", \"text/plain\");\n \t}\n \t\n \tString result = ((((RestResponse) toret).getBody() != null) ? ((RestResponse) toret).getBody() : \" \");\n \t\n rc.response().end(result);\n }\n }\n }",
"public String produceResponse() {\n processData();\n return response;\n }",
"private void sendRequest() throws IOException {\n\t\tHttpURLConnection urlConnection = getHttpURLConnection2(request.getServerUrl());\n\t\t\n\t\ttry {\n\t\t\tInputStream responseStream = null;\n\t final int serverResponseCode = urlConnection.getResponseCode();\n\t if (serverResponseCode / 100 == 2) {\n\t \tresponseStream = urlConnection.getInputStream();\n\t } else { // getErrorStream if the response code is not 2xx\n\t \tresponseStream = urlConnection.getErrorStream();\n\t }\n\t \n\t uploadLstener.onCompleted(uploadId, serverResponseCode, getResponseBodyAsString(responseStream));\n\t responseStream.close();\n\t\t} finally {\n\t\t\turlConnection.disconnect();\n\t\t}\n\t}",
"void faild_response();",
"CompletableFuture<WriteResponse> submit();",
"public void handle(HttpExchange t) throws IOException {\n os = t.getResponseBody();\n urlString = t.getRequestURI().toString();\n this.url =t.getRequestURI().toString().split(\"/\"); //getRequestURI for URL and split\n\n System.out.println(\"Base URI Received: \"+t.getRequestURI().toString());\n\n if(urlString.contains(\".\")) {\n Helper.returnRequestedFile(t, urlString, os);\n } else {\n if(url.length == 0 || url[url.length-1].equals(\"index.html\")) {\n //Returns index.html\n basePage = new File(\"src/StockMarketServer/client/index/index.html\"); //Write index.html to file\n t.getResponseHeaders().add(\"Content-type\", \"text/html\");\n t.sendResponseHeaders(200, basePage.length()); //Return okay code and length of file\n Files.copy(Paths.get(basePage.getAbsolutePath()), os); //Write index.html to response\n os = t.getResponseBody();\n }\n else {\n //Returns pageNotFound.html\n basePage = new File(\"src/StockMarketServer/client/pageNotFound/pageNotFound.html\"); //Write index.html to file\n t.sendResponseHeaders(404, basePage.length()); //Return okay code and length of file\n Files.copy(Paths.get(basePage.getAbsolutePath()), os); //Write index.html to response\n os = t.getResponseBody();\n }\n }\n os.close();\n }",
"public void sendResponse(ChannelHandlerContext ctx, CorfuMsg inMsg, CorfuMsg outMsg) {\n outMsg.copyBaseFields(inMsg);\n ctx.writeAndFlush(outMsg);\n log.trace(\"Sent response: {}\", outMsg);\n }",
"LowLevelHttpResponse execute(OutputWriter object) throws IOException {\n Throwable throwable2222;\n HttpURLConnection httpURLConnection = this.connection;\n if (this.getStreamingContent() != null) {\n long l2;\n long l;\n Object object2 = this.getContentType();\n if (object2 != null) {\n this.addHeader(\"Content-Type\", (String)object2);\n }\n if ((object2 = this.getContentEncoding()) != null) {\n this.addHeader(\"Content-Encoding\", (String)object2);\n }\n if ((l = (l2 = this.getContentLength() LCMP 0L)) >= 0) {\n httpURLConnection.setRequestProperty(\"Content-Length\", Long.toString(l2));\n }\n if (!\"POST\".equals(object2 = httpURLConnection.getRequestMethod()) && !\"PUT\".equals(object2)) {\n boolean bl = l == false;\n Preconditions.checkArgument(bl, \"%s with non-zero content length is not supported\", object2);\n } else {\n httpURLConnection.setDoOutput(true);\n if (l >= 0 && l2 <= Integer.MAX_VALUE) {\n httpURLConnection.setFixedLengthStreamingMode((int)l2);\n } else {\n httpURLConnection.setChunkedStreamingMode(0);\n }\n object2 = httpURLConnection.getOutputStream();\n this.writeContentToOutputStream((OutputWriter)object, (OutputStream)object2);\n ((OutputStream)object2).close();\n {\n block21 : {\n catch (Throwable throwable2222) {\n break block21;\n }\n catch (IOException iOException) {}\n {\n boolean bl = this.hasResponse(httpURLConnection);\n if (!bl) throw iOException;\n }\n try {\n ((OutputStream)object2).close();\n }\n catch (IOException iOException) {}\n }\n ((OutputStream)object2).close();\n throw throwable2222;\n }\n }\n }\n try {\n httpURLConnection.connect();\n return new NetHttpResponse(httpURLConnection);\n }\n catch (Throwable throwable3) {\n httpURLConnection.disconnect();\n throw throwable3;\n }\n catch (IOException iOException) {\n throw throwable2222;\n }\n }",
"private static void writeResponse(\n final ChannelHandlerContext ctx,\n final FullHttpRequest request,\n final HttpResponseStatus status,\n final ByteBuf buf,\n final CharSequence contentType,\n final int contentLength) {\n\n // Decide whether to close the connection or not.\n final boolean keepAlive = HttpServer.KEEP_ALIVE;\n\n // Build the response object.\n final FullHttpResponse response = new DefaultFullHttpResponse(\n HttpVersion.HTTP_1_1,\n status,\n buf,\n false);\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd_HH:mm:ss\", Locale.KOREA);\n Date date = new Date((System.currentTimeMillis() / 1000L + 2208988800L));\n String currentDateTime = sdf.format(date);\n\n final DefaultHttpHeaders headers = (DefaultHttpHeaders) response.headers();\n headers.set(HttpHeaderNames.SERVER, HttpServer.SERVER_NAME);\n headers.set(HttpHeaderNames.DATE, currentDateTime);\n headers.set(HttpHeaderNames.CONTENT_TYPE, contentType);\n headers.set(HttpHeaderNames.CONTENT_LENGTH, Integer.toString(contentLength));\n\n // Close the non-keep-alive connection after the write operation is done.\n if (!keepAlive) {\n ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);\n } else {\n ctx.writeAndFlush(response, ctx.voidPromise());\n }\n }",
"public Http11Response() {\n\t\tsuper();\n\t\tsetVersion(\"HTTP/1.1\");\n\t\taddHeader(\"Server\", \"Shreejit's server/1.2\");\n\t\taddHeader(\"Connection\", \"Close\");\n\n\t\tTimeZone timeZone = TimeZone.getTimeZone(\"GMT\");\n\t\tCalendar cal = Calendar.getInstance(timeZone);\n\t\taddHeader(\"Date\", Parser.formatDate(cal.getTime()));\n\t}",
"private void http_handler(BufferedReader input, DataOutputStream output) {\n int method = 0; //1 get, 2 head, 0 not supported\n String http = new String(); //a bunch of strings to hold\n String path = new String(); //the various things, what http v, what path,\n String file = new String(); //what file\n String user_agent = new String(); //what user_agent\n try {\n //This is the two types of request we can handle\n //GET /index.html HTTP/1.0\n //HEAD /index.html HTTP/1.0\n String tmp = input.readLine(); //read from the stream\n String tmp2 = new String(tmp);\n String line = input.readLine();\n String header = \"\";\n while (line != null && !line.equals(\"\")) {\n header += line;\n line = input.readLine();\n }\n if(header.contains(\"Content-Length\")){\n int offset = header.indexOf(\"Content-Length: \") + \"Content-Length: \".length();\n int cLength = Integer.parseInt(header.substring(offset, header.length()));\n char[] buffer = new char[cLength];\n input.read(buffer);\n value = new String(buffer);\n }\n tmp.toUpperCase(); //convert it to uppercase\n\n if (tmp.startsWith(\"GET\")) { //compare it is it GET\n method = 1;\n } //if we set it to method 1\n if (tmp.startsWith(\"OPTIONS\")) { //same here is it OPTIONS\n method = 2;\n } //set method to 2\n if (tmp.startsWith(\"POST\")) { //same here is it POST\n method = 3;\n } //set method to 3\n\n if (method == 0) { // not supported\n try {\n output.writeBytes(construct_http_header(501, 0));\n output.close();\n return;\n } catch (Exception e3) { //if some error happened catch it\n s(\"error:\" + e3.getMessage());\n } //and display error\n }\n //}\n\n //tmp contains \"GET /index.html HTTP/1.0 .......\"\n //find first space\n //find next space\n //copy whats between minus slash, then you get \"index.html\"\n //it's a bit of dirty code, but bear with me...\n\n int start = 0;\n int end = 0;\n for (int a = 0; a < tmp2.length(); a++) {\n if (tmp2.charAt(a) == ' ' && start != 0) {\n end = a;\n break;\n }\n if (tmp2.charAt(a) == ' ' && start == 0) {\n start = a;\n }\n }\n path = tmp2.substring(start + 1, end); //fill in the path\n } catch (Exception e) {\n s(\"error\" + e.getMessage());\n } //catch any exception\n\n try {\n //send response header\n output.writeBytes(construct_http_header(200, 5));\n\n if (method == 1) { //1 is GET 2 is head and skips the body\n //Response with data from kinect (persoon aanwezig, positie, ...)\n //output.writeBytes(response);\n }\n if (method == 2) {\n String msg = \"\";\n //Description of the sensor sent back (OPTIONS)\n if (path.equals(\"/\")) {\n msg = \"<link rel=\\\"description\\\" type=\\\"text/n3\\\" href=\\\"/service\\\">\\n<link rel=\\\"goal\\\" type=\\\"text/n3\\\" href=\\\"/serviceGoal\\\">\";\n }\n if (path.equals(\"/service\")) {\n msg = \"@prefix sensor: <http://example.org/sensor/>.\\n\";\n msg += \"@prefix ex: <http://example.org/example/>. \\n\";\n msg += \"@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. \\n\";\n msg += \"@prefix environment: <http://example.org/environment/>. \\n\";\n msg += \"@prefix http: <http://www.w3.org/2011/http#>. \\n\";\n msg += \"@prefix tmpl: <http://purl.org/restdesc/http-template#>. \\n\";\n msg += \"{ \\n\";\n msg += \"?sensor a sensor:Kinect. \\n\";\n msg += \"} \\n\";\n msg += \"=> \\n\";\n msg += \"{ \\n\";\n msg += \"_:request http:methodName \\\"POST\\\"; \\n\";\n msg += \"tmpl:requestURI (?sensor \\\"/lightValue\\\"); \\n\";\n msg += \"http:body ?environmentLight;\\n\";\n msg += \"http:resp [ http:body ?lightingValue]. \\n\";\n msg += \"?environmentLight a environment:lightingCondition.\\n\";\n msg += \"?sensor sensor:lightingCondition ?lightingValue. \\n\";\n msg += \"?lightingValue a xsd:String. \\n\";\n msg += \"}. \\n\";\n msg += \"<http://\" + ip + \"/#sensor> a sensor:Kinect.\\n\";\n }\n if (path.equals(\"/serviceGoal\")) {\n msg = \"@prefix sensor: <http://example.org/sensor/>. \\n\";\n msg += \"@prefix environment: <http://example.org/environment/>. \\n\";\n msg += \"{ \\n\";\n msg += \"<http://\" + ip + \"/#sensor> sensor:lightingCondition ?value. \\n\";\n msg += \"} \\n\";\n msg += \"=> \\n\";\n msg += \"{ \\n\";\n msg += \"<http://\" + ip + \"/#sensor> sensor:lightingCondition ?value. \\n\";\n msg += \"}. \\n\";\n }\n output.writeBytes(msg);\n }\n if (method == 3) {\n //Add something to sensor (LightSensor data)\n if (path.equals(\"/lightValue\")) {\n //get Light Value, send to kinect\n String lightValue = value.substring(value.indexOf(\"=\") + 1, value.length()).trim();\n EnvironmentVars.getInstance().setLightValue(lightValue);\n output.writeBytes(\"OK\");\n }\n if (path.equals(\"/personPresent\")) {\n EnvironmentVars.getInstance().setPersonPresent(true);\n output.writeBytes(\"OK\");\n }\n }\n output.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void handle(HttpExchange exchange) {\n \n try {\n String resource = exchange.getRequestURI().getPath();\n if (exchange.getRequestMethod().equals(\"HEAD\")){\n exchange.sendResponseHeaders(200, 0);\n return;\n }else if (resource.startsWith(\"/api/\")){\n api(resource, exchange);\n }else{\n if (redirect.containsKey(exchange.getRequestURI().getPath())) resource = redirect.get(exchange.getRequestURI().getPath());\n else resource = resource.substring(1);\n sendResource(resource, exchange);\n }\n System.out.println(exchange.getRequestMethod() + \":\" + exchange.getRequestURI().toString() + \", \" + resource);\n }catch(Exception e){\n System.out.println(exchange.getRequestMethod() + \":\" + exchange.getRequestURI().toString() + \", \" + e);\n e.printStackTrace();\n byte[] data = e.getMessage().getBytes(StandardCharsets.UTF_8);\n try {\n exchange.sendResponseHeaders(500, data.length);\n exchange.getResponseBody().write(data);\n exchange.getResponseBody().flush();\n }catch(Exception ignored){}\n }finally{\n exchange.close();\n }\n }",
"static void replyWith(HttpExchange t, int code, String contentType, String response)\n throws IOException {\n Headers headers = t.getResponseHeaders();\n headers.add(\"contentType\", contentType);\n t.sendResponseHeaders(code, response.length());\n OutputStream os = t.getResponseBody();\n os.write(response.getBytes());\n os.close();\n }",
"public void endResponse() throws IOException {\n out.println();\n //out.println(\"--End\");\n out.flush();\n endedLastResponse = true;\n }",
"@Override\n public void run() {\n\n final HttpProxy httpProxy = this.createHttpServerConnection();\n\n //Read the request from the socket and send it to the HTTP server\n final byte[] message = unixSocket.read();\n LOGGER.debug(\"Received message on socket: {}\", new String(message, UTF_8));\n httpProxy.sendRequest(message);\n\n //Return the HTTP response to the socket\n final byte[] response = httpProxy.getResponse();\n LOGGER.debug(\"Received http response: {}\", new String(response, UTF_8));\n unixSocket.write(response);\n\n unixSocket.close();\n httpProxy.disconnect();\n }",
"String execute(HttpServletRequest req, HttpServletResponse res);",
"public abstract void actionReal(HttpResponseCallback callback);",
"ResponseEntity execute();",
"public abstract void handle(Request request, Response response) throws Exception;",
"@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}",
"public void startResponse()\n\t\t\t{\n\t\t\t\tsend(\"<response>\", false);\n\t\t\t}",
"@Override\r\n public void handle(HttpExchange exchange) throws IOException {\r\n\r\n // This handler returns a list of \"Ticket to Ride\" games that\r\n // are (ficticiously) currently running in the server.\r\n // The game list is returned to the client in JSON format inside\r\n // the HTTP response body.\r\n // This implementation is clearly unrealistic, because it\r\n // always returns the same hard-coded list of games.\r\n // It is also unrealistic in that it accepts only one specific\r\n // hard-coded auth token.\r\n // However, it does demonstrate the following:\r\n // 1. How to get the HTTP request type (or, \"method\")\r\n // 2. How to access HTTP request headers\r\n // 3. How to return the desired status code (200, 404, etc.)\r\n //\t\tin an HTTP response\r\n // 4. How to write JSON data to the HTTP response body\r\n // 5. How to check an incoming HTTP request for an auth token\r\n\r\n boolean success = false;\r\n\r\n try {\r\n // Determine the HTTP request type (GET, POST, etc.).\r\n // Only allow GET requests for this operation.\r\n // This operation requires a GET request, because the\r\n // client is \"getting\" information from the server, and\r\n // the operation is \"read only\" (i.e., does not modify the\r\n // state of the server).\r\n if (exchange.getRequestMethod().toLowerCase().equals(\"post\")) {\r\n String str = readString(exchange.getRequestBody());\r\n Gson gson = new Gson();\r\n RegisterRequest rRequest = gson.fromJson(str, RegisterRequest.class);\r\n RegisterResult rResult = RegisterService.register(rRequest);\r\n if(rResult.isSuccess()) {\r\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\r\n // Now that the status code and headers have been sent to the client,\r\n // next we send the JSON data in the HTTP response body.\r\n // Get the response body output stream.\r\n OutputStream respBody = Encoder.toJsonEncoded(rResult, exchange.getResponseBody());\r\n // Close the output stream. This is how Java knows we are done\r\n // sending data and the response is complete/\r\n respBody.close();\r\n success = true;\r\n }\r\n else {\r\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_BAD_REQUEST, 0);\r\n // Now that the status code and headers have been sent to the client,\r\n // next we send the JSON data in the HTTP response body.\r\n // Get the response body output stream.\r\n OutputStream respBody = Encoder.toJsonEncoded(rResult, exchange.getResponseBody());\r\n // Close the output stream. This is how Java knows we are done\r\n // sending data and the response is complete/\r\n respBody.close();\r\n success = true;\r\n }\r\n }\r\n if (!success) {\r\n // The HTTP request was invalid somehow, so we return a \"bad request\"\r\n // status code to the client.\r\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_BAD_REQUEST, 0);\r\n\r\n // Since the client request was invalid, they will not receive the\r\n // list of games, so we close the response body output stream,\r\n // indicating that the response is complete.\r\n exchange.getResponseBody().close();\r\n }\r\n }\r\n catch (IOException e) {\r\n // Some kind of internal error has occurred inside the server (not the\r\n // client's fault), so we return an \"internal server error\" status code\r\n // to the client.\r\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_SERVER_ERROR, 0);\r\n // Since the server is unable to complete the request, the client will\r\n // not receive the list of games, so we close the response body output stream,\r\n // indicating that the response is complete.\r\n exchange.getResponseBody().close();\r\n\r\n // Display/log the stack trace\r\n e.printStackTrace();\r\n }\r\n }",
"private void showWeb() throws IOException{\n\n InputStream inputStream;\n BufferedReader bufferedReader;\n PrintWriter out;\n String request;\n String response;\n String[] requestParam;\n String[] requestParamButton;\n String path;\n String sensorDataIndex;\n String message = \"Don't have a Products\";\n String historyURL = \"/history\";\n String listURL = \"/list\";\n String invoiceURL = \"/invoice\";\n String testBadURL = \"/testError\";\n String buyForURL = \"/buyFor\";\n String pathForRefresh = \"\";\n String topic =\"\";\n //For test Status\n String httpStatus = \"\";\n\n try{\n inputStream = socket.getInputStream();\n bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\n request = bufferedReader.readLine();\n if(!request.isEmpty()){\n System.out.println(request);\n requestParam = request.split(\" \");\n path = requestParam[1];\n System.out.println(path);\n if(!path.isEmpty()){\n requestParamButton = path.split(\":\");\n System.out.println(\"requestParamButton lenght is : \" + requestParamButton.length\n + \" last index have \" + requestParamButton[requestParamButton.length - 1]);\n sensorDataIndex = requestParamButton[requestParamButton.length - 1];\n }else{\n sensorDataIndex = \"0\";\n }\n //sensorDataIndex = \"0\";\n\n if(path.contains(buyForURL)){\n manuelOrder(sensorDataIndex);\n message = makeOneStringList();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"List of products : \";\n pathForRefresh = listURL;\n }\n if(path.equals(invoiceURL)){\n message = makeOneStringInvoice();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"Invoise : \";\n pathForRefresh = invoiceURL;\n }\n if(path.equals(historyURL)){\n message = makeOneStringHistory();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"History of products : \";\n pathForRefresh = historyURL;\n }\n if(path.equals(listURL)){\n message = makeOneStringList();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"List of products : \";\n pathForRefresh = listURL;\n /** compare Data from actualSensorData with response Data */\n //testShowList(message);\n }\n /** if path not equals /list or /history will be BAD REQUEST with status 400 */\n if(!path.equals(listURL) && !path.equals(historyURL) && !path.equals(invoiceURL) && !path.contains(buyForURL)){\n message = \"<h1 style='color:red'> BAD REQUEST, ALLOWED ONLY HTTP GET /list or /history REQUESTS </h1>\";\n httpStatus = \"HTTP/1.1 400\";\n topic = \"<h1 style='color:red'> ERROR </h1>\";\n pathForRefresh = testBadURL;\n }\n\n }\n\n /** Color test */\n //testColor(message,httpStatus);\n\n out = new PrintWriter(socket.getOutputStream());\n out.println(httpStatus);\n out.println(\"Content-type: text/html\");\n out.println(\"Server-name: myServer\");\n response = \"<html>\" + \"<head>\"\n + \"<meta http-equiv=\\\"refresh\\\" content=\\\"2\\\"; url=localhost:8282\" + pathForRefresh + \">\"\n + \"<meta charset='utf-8'>\" // Umlauts\n + \"<link rel=\\\"icon\\\" href=\\\"data:;base64,iVBORw0KGgo=\\\">\" // How to prevent favicon.ico requests?\n + \"<title>My Web Server</title></head>\"\n + \"<h1>Your request: \" + request + \"</h3>\"\n + \"<table width=\\\"200\\\">\"\n + \"<td><h3><a href=\\\"/list \\\">List</a></h3></td>\"\n + \"<td><h3><a href=\\\"/history \\\">History</a></h3></td>\"\n + \"<td><h3><a href=\\\"/testError \\\">TestError</a></h3></td>\"\n + \"<td><h3><a href=\\\"/invoice \\\">Invoice</a></h3></td>\"\n + \"<td><h3><a href=\\\"/buyFor \\\">BuyFor</a></h3></td>\"\n + \"</table>\"\n + \"<h1>\" + topic + \"</h1>\"\n + \"<table width=\\\"200\\\">\"\n + \"<h3>\" + message + \"</h3>\"\n + \"</table>\"\n + \"</html>\";\n out.println(\"Content-length: \" + response.length());\n out.println(\"\");\n out.println(response);\n out.flush();\n //out.close();\n //bufferedReader.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Failed respond to client request: \" + e.getMessage());\n }\n\n }",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }",
"public String getBalance(String accountNo ,String bank) {\r\n\t ClientBuilder clientBuilder = ClientBuilder.newBuilder();\r\n\t String message = null;\r\n\t //creating empty Client\r\n\t Client client = clientBuilder.build(); \r\n\t WebTarget target = client.target(JERSEY_BASE_URI).path(\"/account\").path(\"/balance\").queryParam(\"bank\", bank);\r\n\t System.out.println(\"base uri \"+target.toString());\r\n\t Invocation.Builder invocationBuilder = target.request();\r\n\t invocationBuilder.header(\"accountNo\",accountNo);\r\n\t /*After creation of invocation Builder Object we need to pass header or cookie parameter values to it \r\n\t * There are Two parts of the request is there\r\n\t * 1)Address part or WebAddress(Url with query and path and matrix paramters available)\r\n\t * 2)Request Part\r\n\t * Again it was divided into two more parts \r\n\t * 1)Cokkie or Requesty Headers \r\n\t * 2)Request Body(Here you can pass your own object or text or any thing as Entity class)\r\n\t * ## Once after completion of request object means after providing the webaddress to it we can able to send the \r\n\t * Header Parameters and cookie parameters to it \r\n\t * \r\n\t * Here Invocation invocation = invocationBuilder.build(\"GET\");\r\n\t * or\r\n\t * Invocation invocation = invocationBuilder.buildGet();\r\n\t * Then invocation.invoke() or invocation.invoke(ClassType) so that it will invoke the target class resource \r\n\t * \r\n\t * or \r\n\t * Response response = invocationBuilder.get() \r\n\t * Here This class contains one builder method that internally creates Invoke object and and it will invoke on it and \r\n\t * it will return Response to us directly\r\n\t * \r\n\t * \r\n\t * */\r\n\t Invocation invocation = invocationBuilder.buildGet();\r\n\t Response response = invocation.invoke();\r\n\t if(response.getStatus() == 200) {\r\n\t\t System.out.println(\"inside if block\");\r\n\t\t response.bufferEntity(); //To strore in buffer before closing outputstream \r\n\t\t message = response.readEntity(String.class);\r\n\t }\r\n\t return message;\r\n }",
"@Override\n protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n try {\n // attempt to find the existing session..\n TwiMLResponse twiMLResponse;\n String id = getWorkflowSessionId(req);\n PyObject twilioRequest = buildRequestTuple(req);\n PyGenerator pygen = workflowSessionCache.getIfPresent(id);\n if (null == pygen) {\n // load the workflow provided\n Invocable f = loadWorkflow(getWorkflowName(req));\n // create the python generator\n pygen = (PyGenerator) f.invokeFunction(\"execute\", twilioRequest);\n twiMLResponse = toTwiMLResponse(pygen.next());\n } else {\n // execute the next request..\n twiMLResponse = toTwiMLResponse(pygen.send(twilioRequest));\n }\n\n // determine if this is the last response..\n if (twiMLResponse instanceof LastTwilioResponse) {\n workflowSessionCache.invalidate(id);\n } else {\n workflowSessionCache.put(id, pygen);\n }\n\n // send back the Twilio response..\n resp.addCookie(new Cookie(\"uuid\", id));\n resp.getWriter().write(twiMLResponse.toXML());\n } catch (Exception ex) {\n throw new ServletException(ex);\n }\n }",
"protected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException\r\n\t{\r\n\t\t/**\r\n\t\t * Note: the \"resp\" is the only destination for an incoming requests\r\n\t\t */\r\n\t\tfinal long clientChannelID = Long.valueOf(req.getHeader(\"channelID\"));\r\n\t\t//final String clientID = req.getProtocol() + req.getRemoteAddr() + clientChannelID;\r\n\t\t\r\n\t\tSmartObjectInputStream input = new SmartObjectInputStream(req.getInputStream());\r\n\r\n\t\tLong xid = 0L;\r\n\t\tfinal WaitingCallback blocking = new WaitingCallback();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tchannelEndpoint.updateDeserializingThread(Thread.currentThread(),\r\n\t\t\t\t\ttrue);\r\n\t\t\tfinal CommMessage msg = CommMessage.parse(input);\r\n\t\t\txid = msg.getXID();\r\n\r\n\t\t\tsynchronized (callbacks)\r\n\t\t\t{\r\n\t\t\t\tcallbacks.put(xid + clientChannelID, blocking);\r\n\t\t\t}\r\n\t\t\tmsg.setXID(xid + clientChannelID); //update ID for preventing naming conflict\r\n\t\t\t\r\n\t\t\tchannelEndpoint.getChannelFacade().receivedMessage(this, msg);\r\n\t\t}\r\n\t\tcatch (final IOException ioe)\r\n\t\t{\r\n\t\t\tchannelEndpoint.getChannelFacade().receivedMessage(this, null);\r\n\t\t}\r\n\t\tcatch (final Throwable t)\r\n\t\t{\r\n\t\t\tt.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tchannelEndpoint.updateDeserializingThread(Thread.currentThread(),\r\n\t\t\t\t\tfalse);\r\n\t\t}\r\n\r\n\t\tCommMessage responseMsg = null;\r\n\r\n\t\t// wait for the reply\r\n\t\tsynchronized (blocking)\r\n\t\t{\r\n\t\t\tfinal long timeout = System.currentTimeMillis()\r\n\t\t\t\t\t+ CommConstants.TIMEOUT;\r\n\t\t\tresponseMsg = blocking.getResult();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\twhile (responseMsg == null && System.currentTimeMillis() < timeout)\r\n\t\t\t\t{\r\n\t\t\t\t\tblocking.wait(CommConstants.TIMEOUT);\r\n\t\t\t\t\tresponseMsg = blocking.getResult();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException ie)\r\n\t\t\t{\r\n\t\t\t\tthrow new RemoteCommException(\r\n\t\t\t\t\t\t\"Interrupted while waiting for callback\", ie);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (responseMsg != null)\r\n\t\t{\r\n\t\t\tresponseMsg.setXID(responseMsg.getXID() - clientChannelID);//reset ID\r\n\t\t\tresp.setContentType(\"multipart/x-dpartner\");\r\n\t\t\tSmartObjectOutputStream output = new SmartObjectOutputStream(resp.getOutputStream());\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tchannelEndpoint.updateSerializing(Thread.currentThread(), true);\r\n\t\t\t\tresponseMsg.send(output);\r\n\t\t\t\tresp.flushBuffer();\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\tthrow e;\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tchannelEndpoint.updateSerializing(Thread.currentThread(), false);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new RemoteCommException(\r\n\t\t\t\t\t\"Method Invocation failed, timeout exceeded.\");\r\n\t\t}\r\n\t}",
"ResponseHandler createResponseHandler();",
"@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n//\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}",
"public void sendResponse(ResponseNetObject response){\r\n\r\n sendObject(response);\r\n\r\n }",
"protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (bufferedOutputStream != null) {\n\n // make sure the writer flushes everything to the underlying output stream\n if (bufferedWriter != null) {\n bufferedWriter.flush();\n }\n\n // send the buffered response to the client\n bufferedOutputStream.writeBufferTo(getResponse().getOutputStream());\n\n }\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not flush response buffer\", e);\n }\n\n }",
"public HTTPResponse get(HTTPRequest request) {\n\t\tHTTPResponse response = new HTTPResponse();\n\t\tresponse.setResponseHeader(request.getProtocol(), HTTPConstants.STATUS_OK, HTTPConstants.STATUS_CODE_OK);\n\t\tresponse.setResponse(getResponseString(true));\n\t\treturn response;\n\t}",
"public ResponseFromHTTP makeRequest() throws CustomRuntimeException\n\t{\n\t\tResponseFromHTTP result=null;\n\t\tCloseableHttpClient httpclient=null;\n\t\tCloseableHttpResponse response=null;\n\t\tboolean needAuth=false;\n\t\tboolean viaProxy=httpTransportInfo.isUseProxy() && StringUtils.isNotBlank(httpTransportInfo.getProxyHost());\n\n\t\tHttpHost target = new HttpHost(httpTransportInfo.getHost(), httpTransportInfo.getPort(),httpTransportInfo.getProtocol());\n\t\t//basic auth for request\n\t\tCredentialsProvider credsProvider = new BasicCredentialsProvider();\n\t\tif(StringUtils.isNotBlank(httpTransportInfo.getLogin()) && \n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getPassword()))\n\t\t{\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(target.getHostName(), target.getPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getLogin(), httpTransportInfo.getPassword()));\n\t\t\tneedAuth=true;\n\t\t}\n\n\t\t//proxy auth?\n\t\tif(viaProxy && StringUtils.isNotBlank(httpTransportInfo.getProxyLogin()) &&\n\t\t\t\tStringUtils.isNotBlank(httpTransportInfo.getProxyPassword()))\n\t\t{\n\t\t\t//proxy auth setting\n\t\t\tcredsProvider.setCredentials(\n\t\t\t\t\tnew AuthScope(httpTransportInfo.getProxyHost(), httpTransportInfo.getProxyPort()),\n\t\t\t\t\tnew UsernamePasswordCredentials(httpTransportInfo.getProxyLogin(), httpTransportInfo.getProxyPassword()));\n\t\t}\n\n\t\ttry\n\t\t{\n\n\t\t\tHttpClientBuilder httpclientBuilder = HttpClients.custom()\n\t\t\t\t\t.setDefaultCredentialsProvider(credsProvider);\n\t\t\t//https\n\t\t\tif(\"https\".equalsIgnoreCase(httpTransportInfo.getProtocol()))\n\t\t\t{\n\t\t\t\t//A.K. - Set stub for check certificate - deprecated from 4.4.1\n\t\t\t\tSSLContextBuilder sslContextBuilder=SSLContexts.custom();\n\t\t\t\tTrustStrategyLZ trustStrategyLZ=new TrustStrategyLZ();\n\t\t\t\tsslContextBuilder.loadTrustMaterial(null,trustStrategyLZ);\n\t\t\t\tSSLContext sslContext = sslContextBuilder.build();\n\t\t\t\tSSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n\t\t\t\thttpclientBuilder.setSSLSocketFactory(sslsf);\n\t\t\t}\n\n\t\t\thttpclient=httpclientBuilder.build();\n\n\t\t\t//timeouts\n\t\t\tBuilder builder = RequestConfig.custom()\n\t\t\t\t\t.setSocketTimeout(httpTransportInfo.getSocketTimeoutSec()*1000)\n\t\t\t\t\t.setConnectTimeout(httpTransportInfo.getConnectTimeoutSec()*1000);\n\n\t\t\t//via proxy?\n\t\t\tif(viaProxy)\n\t\t\t{\n\t\t\t\t//proxy setting\n\t\t\t\tHttpHost proxy = new HttpHost(httpTransportInfo.getProxyHost(),httpTransportInfo.getProxyPort(),httpTransportInfo.getProxyProtocol());\n\t\t\t\tbuilder.setProxy(proxy);\n\t\t\t}\n\n\t\t\tRequestConfig requestConfig=builder.build();\n\n\t\t\t// Create AuthCache instance\n\t\t\tAuthCache authCache = new BasicAuthCache();\n\t\t\t// Generate BASIC scheme object and add it to the local\n\t\t\t// auth cache\n\t\t\tBasicScheme basicAuth = new BasicScheme();\n\t\t\tauthCache.put(target, basicAuth);\n\n\t\t\t// Add AuthCache to the execution context\n\t\t\tHttpClientContext localContext = HttpClientContext.create();\n\t\t\tlocalContext.setAuthCache(authCache);\n\n\t\t\tPathParser parsedPath=new PathParser(getUri());\n\t\t\tif(restMethodDef.isUseOriginalURI())\n\t\t\t{\n\t\t\t\t//in this case params from URI will not add to all params\n\t\t\t\tparsedPath.getParams().clear();\n\t\t\t}\n\t\t\tparsedPath.getParams().addAll(getRequestDefinition().getParams());\n\t\t\t//prepare URI\n\t\t\tURIBuilder uriBuilder = new URIBuilder().setPath(parsedPath.getUri());\n\t\t\tif(!getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\t//form's parameters - GET/DELETE/OPTIONS/PUT\n\t\t\t\tfor(NameValuePair nameValuePair : parsedPath.getParams())\n\t\t\t\t{\n\t\t\t\t\turiBuilder.setParameter(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tURI resultUri =(restMethodDef.isUseOriginalURI())?new URI(getUri()):uriBuilder.build();\n\n\t\t\t//\t\t\tHttpRequestBase httpPostOrGet=(getRequestDefinition().isHttpMethodPost())?\n\t\t\t//\t\t\t\t\tnew HttpPost(resultUri):\n\t\t\t//\t\t\t\t\tnew HttpGet(resultUri);\n\n\t\t\tHttpRequestBase httpPostOrGetEtc=null;\n\t\t\t//\n\t\t\tswitch(getRequestDefinition().getHttpMethod())\n\t\t\t{\n\t\t\t\tcase POST: httpPostOrGetEtc=new HttpPost(resultUri);break;\n\t\t\t\tcase DELETE: httpPostOrGetEtc=new HttpDelete(resultUri);break;\n\t\t\t\tcase OPTIONS: httpPostOrGetEtc=new HttpOptions(resultUri);break;\n\t\t\t\tcase PUT: httpPostOrGetEtc=new HttpPut(resultUri);break;\n\n\t\t\t\tdefault: httpPostOrGetEtc=new HttpGet(resultUri);break;\n\t\t\t}\n\n\t\t\t//Specifie protocol version\n\t\t\tif(httpTransportInfo.isVersionHttp10())\n\t\t\t\thttpPostOrGetEtc.setProtocolVersion(HttpVersion.HTTP_1_0);\n\n\t\t\t//user agent\n\t\t\thttpPostOrGetEtc.setHeader(HttpHeaders.USER_AGENT,httpTransportInfo.getUserAgent());\n\t\t\t//заголовки из запроса\n\t\t\tif(getRequestDefinition().getHeaders().size()>0)\n\t\t\t{\n\t\t\t\tfor(NameValuePair nameValuePair : getRequestDefinition().getHeaders())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getName()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(nameValuePair.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(nameValuePair.getName(),nameValuePair.getValue());\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Additional HTTP headers from httpTransportInfo\n\t\t\tif(httpTransportInfo.getAddHeaders()!=null)\n\t\t\t{\n\t\t\t\tfor(Map.Entry<String, String> entry:httpTransportInfo.getAddHeaders().entrySet())\n\t\t\t\t{\n\t\t\t\t\tif(org.apache.commons.lang.StringUtils.isNotBlank(entry.getKey()) &&\n\t\t\t\t\t\t\torg.apache.commons.lang.StringUtils.isNotBlank(entry.getValue()))\n\t\t\t\t\t{\n\t\t\t\t\t\thttpPostOrGetEtc.setHeader(entry.getKey(),entry.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\thttpPostOrGetEtc.setConfig(requestConfig);\n\t\t\t//Form's parameters, request POST\n\t\t\tif(getRequestDefinition().isHttpMethodPost())\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t\telse if(parsedPath.getParams().size()>0)\n\t\t\t\t{\n\t\t\t\t\tUrlEncodedFormEntity entityForm = new UrlEncodedFormEntity(parsedPath.getParams(), httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPost) (httpPostOrGetEtc)).setEntity(entityForm);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Body for PUT\n\t\t\tif(getRequestDefinition().getHttpMethod()==HttpMethod.PUT)\n\t\t\t{\n\t\t\t\tif(getPostBody()!=null)\n\t\t\t\t{\n\t\t\t\t\tStringEntity stringEntity=new StringEntity(getPostBody(),httpTransportInfo.getCharset());\n\t\t\t\t\t((HttpPut) (httpPostOrGetEtc)).setEntity(stringEntity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresponse = httpclient.execute(target, httpPostOrGetEtc, (needAuth)?localContext:null);\n\t\t\t//response.\n\t\t\tHttpEntity entity = response.getEntity();\n\t\t\tif(entity!=null)\n\t\t\t{\n\t\t\t\t//charset\n\t\t\t\tContentType contentType = ContentType.get(entity);\n\t\t\t\tString currentCharSet=httpTransportInfo.getCharset();\n\t\t\t\tif(contentType!=null)\n\t\t\t\t{\n\t\t\t\t\t//String mimeType = contentType.getMimeType();\n\t\t\t\t\tif(contentType.getCharset()!=null)\n\t\t\t\t\t\tcurrentCharSet=contentType.getCharset().name();\n\t\t\t\t}\n\t\t\t\tInputStream inputStream=entity.getContent();\n\t\t\t\tif(getRequestDefinition().isBinaryResponseBody())\n\t\t\t\t{\n\t\t\t\t\t//binary content\n\t\t\t\t\tbyte[] bodyBin = IOUtils.toByteArray(inputStream);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),bodyBin,response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//copy content to string\n\t\t\t\t\tStringWriter writer = new StringWriter();\n\t\t\t\t\tIOUtils.copy(inputStream, writer, currentCharSet);\n\t\t\t\t\tresult=new ResponseFromHTTP(response.getAllHeaders(),writer.toString(),response.getStatusLine().getStatusCode());\n\t\t\t\t}\n\t\t\t\tinputStream.close();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new CustomRuntimeException(\"fetchData over http uri: \"+getUri(),e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(response!=null)\n\t\t\t\t\tresponse.close();\n\t\t\t\tif(httpclient!=null)\n\t\t\t\t\thttpclient.close();\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t} \t\n\t\t}\t\t\n\t\treturn result;\n\n\t}",
"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}",
"public Object getResponse ()\r\n {\r\n\r\n return response_;\r\n }",
"R get() throws IOException, ClientProtocolException;"
] | [
"0.71534806",
"0.6761867",
"0.6721567",
"0.6690706",
"0.6682303",
"0.66477954",
"0.6621936",
"0.66075796",
"0.6606492",
"0.6577515",
"0.6546094",
"0.65407616",
"0.65321136",
"0.6510369",
"0.64647657",
"0.63734144",
"0.6369521",
"0.6366952",
"0.63529503",
"0.634321",
"0.63336265",
"0.63336265",
"0.6326258",
"0.6305948",
"0.6299045",
"0.6222384",
"0.6221969",
"0.6221969",
"0.6221391",
"0.6220136",
"0.6197308",
"0.61936456",
"0.61936456",
"0.61936456",
"0.61713886",
"0.6171283",
"0.61685675",
"0.61072874",
"0.6094872",
"0.6086722",
"0.60860157",
"0.6075504",
"0.60738385",
"0.60536164",
"0.60468966",
"0.60430384",
"0.60422087",
"0.603835",
"0.60345495",
"0.6034212",
"0.6016689",
"0.6013733",
"0.597664",
"0.5962978",
"0.5957531",
"0.59569454",
"0.5936629",
"0.59351367",
"0.59351367",
"0.59315306",
"0.59231377",
"0.5921666",
"0.59193426",
"0.59179413",
"0.59077185",
"0.59071636",
"0.58905715",
"0.58903986",
"0.5884808",
"0.58760947",
"0.5862715",
"0.5862497",
"0.5859408",
"0.58488625",
"0.58386874",
"0.58294165",
"0.58264804",
"0.5826436",
"0.57948345",
"0.57924074",
"0.578973",
"0.5787705",
"0.57830584",
"0.5780115",
"0.57783425",
"0.57772946",
"0.57755506",
"0.577384",
"0.57734776",
"0.5768177",
"0.57636046",
"0.5757141",
"0.57530993",
"0.5746",
"0.573159",
"0.5725622",
"0.5724978",
"0.5722735",
"0.57155913",
"0.5714255"
] | 0.69932956 | 1 |
HTTP HELPERS get the status code for based on the HTTP method and request from the client | private int getStatusCode(String sHTTPMethod, String sHTTPRequest) {
// default is internal server error
int iStatusCode = 500;
// update based on method and request
if (!isSupportedMethod(sHTTPMethod)) {
iStatusCode = 403;
} else if (isRedirect(sHTTPRequest)) {
iStatusCode = 301;
} else if (!isValidFile(sHTTPRequest)) {
iStatusCode = 404;
} else if (!isValidContentType(sHTTPRequest)) {
iStatusCode = 415;
} else if (isSupportedMethod(sHTTPMethod) && !isRedirect(sHTTPRequest)
&& isValidFile(sHTTPRequest) && isValidContentType(sHTTPRequest)) {
iStatusCode = 200;
}
// return final status code
return iStatusCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Http.Status status();",
"int getStatusCode( );",
"int getStatusCode();",
"int getStatusCode();",
"public abstract int statusCode();",
"HttpStatusCode getStatusCode();",
"RequestStatus getStatus();",
"abstract Integer getStatusCode();",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"public StatusCode GetStatus();",
"public int get_http_status_code () {\n\t\treturn http_status_code;\n\t}",
"public static Integer getStatusCode() {\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n return res.then().extract().statusCode();\n //return SerenityRest.then().extract().statusCode();\n }",
"public int statusCode(){\n return code;\n }",
"@Test\n public void teststatusCode() {\n\t \n\t given().\n\t \tget(\"https://reqres.in/api/unknown\").\n\t then().\t\t\n\t \tstatusCode(200);\n\t \n }",
"@Test(priority=1)\n\tpublic void teststatuscode() {\n\t\t\n\t\twhen()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/1\")\n\t\t.then()\n\t\t\t.statusCode(200);\n\t\t\t//.log().all();\n\t}",
"public abstract int getHttpStatusErrorCode();",
"public int getHttpStatusCode() {\n return httpStatusCode;\n }",
"public int getHttpStatusCode() {\n return httpStatusCode;\n }",
"@Test(priority=1)\r\n\tpublic void validateStatusCode()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then()\r\n\t\t.statusCode(200);\r\n\t\t\r\n\t}",
"@Test\n\tpublic void teststatuscode() {\n\t\t\n\t\tgiven()\n\t\t\n\t\t.when()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/5\")\n\t\t.then()\n\t\t\t.statusCode(200)\n\t\t\t.log().all();\n\t}",
"Response.StatusType getStatus(Exception exception);",
"private int getSuccessCode(String method) {\n if (\"POST\".equals(method)) {\n return 201;\n } else {\n return 200;\n }\n }",
"trinsic.services.common.v1.CommonOuterClass.ResponseStatus getStatus();",
"public short getRequestStatus() {\n return requestStatus;\n }",
"@GET(\"system/status\")\n Call<InlineResponse200> getStatus();",
"public HTTPRequestMethod getMethod();",
"public static int getStatusCode() {\r\n\r\n\r\n\r\n\t\tCloseableHttpResponse response= postSoapRequest(\"getDealList_Request\",baseURI);\r\n\r\n\r\n\r\n\t\tint statuseCode=response.getStatusLine().getStatusCode();\r\n\r\n\t\tSystem.out.println(\"statuseCode= \"+statuseCode);\r\n\r\n\t\t//Assert.assertEquals(200,statuseCode);\r\n\r\n\t\treturn statuseCode;\r\n\r\n\t}",
"public HttpStatus getHttpStatus();",
"public int getResponseCode() throws IOException {\n/* 317 */ return this.delegate.getResponseCode();\n/* */ }",
"public static int executeHttpRequest(HttpRequest request) {\n try {\n HttpResponse<String> response = client.send(request, HttpResponse.BodyHandler.asString());\n System.out.println(\"Status code: \" + response.statusCode());\n System.out.println(response.body());\n return response.statusCode();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n return -1;\n }",
"public int getHttpCode() {\n return httpCode;\n }",
"@Override\n public RestStatus status() {\n return response.status();\n }",
"private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }",
"com.google.rpc.Status getStatus();",
"com.google.rpc.Status getStatus();",
"private String sendRequest(String responseType, String token, Object body, String path, String expectResult, int statusCode) {\n RestAssured.config = RestAssured.config().sslConfig(SSLConfig.sslConfig().allowAllHostnames());\n\n Map<String, Object> header = new HashMap<>();\n header.put(\"Accept-Language\", \"en,ar\");\n if (body != null) {\n if (body instanceof Map) {\n Map<String, Object> bodyMap = (Map) body;\n if (bodyMap.containsKey(\"Accept-Language\")) {\n header.put(\"Accept-Language\", bodyMap.get(\"Accept-Language\"));\n }\n }\n }\n if (token != null) header.put(\"Authorization\", token);\n\n RequestSpecification request = given()\n .contentType(\"application/json\")\n .headers(header);\n\n if (body != null) request.body(body);\n\n request.when();\n\n// bypass statusCode - 429 ------------------------------------------------------\n Response resp = setResponse(responseType, request, path);\n\n if (resp.statusCode() == statusCode429) {\n sleep(2000);\n log(\"statusCode - \" + resp.statusCode());\n resp = setResponse(responseType, request, path);\n }\n\n String response = resp\n .then()\n .log().all()\n .statusCode(statusCode)\n .extract().response()\n .asString();\n// ---------------------------------------------------------------------------------\n\n\n// without bypass statusCode - 429 ----------------------------------------------\n// String response = setResponse(responseType, request, path)\n// .then()\n// .statusCode(statusCode)\n// .log().all()\n// .extract().response()\n// .asString();\n// ---------------------------------------------------------------------------------\n\n if (expectResult.equals(allResult)) return response;\n return from(response).getString(expectResult);\n }",
"private String setServerStatusCode()\n\t{\n\t\t\n\t\tString response = null;\n\t HttpClient client = new DefaultHttpClient();\n\t HttpPost post = new HttpPost(\"http://10.184.0.132:8005/ContextAwareFrameworkWebService/apiCheckTest1\");\n\t Log.d(\"Debug\",\"test1\");\n\t // set values you'd like to send\n\t List pairs = new ArrayList();\n\t //pairs.add(new BasicNameValuePair(\"devEmail\", developerEmail));\n\t //pairs.add(new BasicNameValuePair(\"apiKey\", ApiKey));\n\t pairs.add(new BasicNameValuePair(\"pkgName\", appPkgName));\n\t pairs.add(new BasicNameValuePair(\"appId\", appId));\n\t pairs.add(new BasicNameValuePair(\"userEmail\", userEmailId));\n\t pairs.add(new BasicNameValuePair(\"\", deviceId));\n\t pairs.add(new BasicNameValuePair(\"random\", \"randomConstant\"));\n\t try {\n\t post.setEntity(new UrlEncodedFormEntity(pairs));\n\t // set ResponseHandler to handle String responses\n\t ResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t response = client.execute(post, responseHandler);\n\t serverRequestStatus = true;\n\t serverStatus = response;\n\t Log.v(\"HttpPost\", \"Response: \" + serverStatus);\n\t } \n\t catch (Exception e) \n\t {\n\t \tLog.e(\"Debug\",\"Error in post method\");\n\t \te.printStackTrace();\n\t }\n\t \n\t return response;\n\t}",
"public HttpResponse(int status, String method, String protocolVersion){\r\n ResourceManager manager = new ResourceManager();\r\n File res = manager.getResourceFor(status);\r\n header = new HttpHeader(status, res.getPath(), protocolVersion);\r\n if (method.equals(\"HEAD\"))\r\n resource = null;\r\n else \r\n resource = res;\r\n \r\n }",
"public String getHttpStatusCode() {\n return this.httpStatusCode;\n }",
"long getInnerStatusCode();",
"@java.lang.Override\n public int getRequestStatusValue() {\n return requestStatus_;\n }",
"@Test\r\n\tpublic void testResponseCode(){\r\n\t\t\r\n\t\tint code = get(api1).getStatusCode();\r\n\t\tSystem.out.println(\"Code: \"+code);\r\n\t\tAssert.assertEquals(code, 200);\r\n\t}",
"public int getRequestCode() {\n return requestCode;\n }",
"public int getHttpStatusCode() {\n return JsoHelper.getAttributeAsInt(jsObj, \"http_status\");\n }",
"public String getRequestStatus() {\n return RequestStatus;\n }",
"public boolean getResponseStatus();",
"private String getStatusLine(int iStatusCode) {\n String sStatus = \"HTTP/1.1 \";\n if (iStatusCode == 200) {\n sStatus += iStatusCode + \" OK\";\n } else if (iStatusCode == 301) {\n sStatus += iStatusCode + \" Moved Permanently\";\n } else if (iStatusCode == 403) {\n sStatus += iStatusCode + \" Forbidden\";\n } else if (iStatusCode == 404) {\n sStatus += iStatusCode + \" Not Found\";\n } else if (iStatusCode == 415) {\n sStatus += iStatusCode + \" Unsupported Media Type\";\n } else if(iStatusCode == 500) {\n sStatus += iStatusCode + \" Internal Server Error\";\n }\n return sStatus;\n }",
"public int getStatusCode() {\n return code;\n }",
"public static Integer getResponseCode(String url) throws IOException {\n\n String chrome_user_agent = \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\";\n\n\n HttpClient client = HttpClientBuilder.create().build();\n HttpGet request = new HttpGet(url);\n request.addHeader(\"User-Agent\", chrome_user_agent);\n HttpResponse response = null;\n try {\n response = client.execute(request);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* System.out.println(\"Response Code : \"\n + response.getStatusLine().getStatusCode());\n*/\n /*BufferedReader rd = new BufferedReader(\n new InputStreamReader(response.getEntity().getContent()));\n\n StringBuffer result = new StringBuffer();\n String line = \"\";\n while ((line = rd.readLine()) != null) {\n result.append(line);\n }\n*/\n return response.getStatusLine().getStatusCode();\n }",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatusCode() {\n return statusLine.getStatusCode();\n }",
"@java.lang.Override\n public int getRequestStatusValue() {\n return requestStatus_;\n }",
"public interface IHttpStatus {\n\n /**\n * <p>Get the status code.</p>\n *\n * @return the status code\n */\n HttpStatusCode getStatusCode();\n\n}",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"private String computeMethodForRedirect(String initialMethod, String responseCode) {\n if (!HTTPConstants.HEAD.equalsIgnoreCase(initialMethod)) {\n return HTTPConstants.GET;\n }\n return initialMethod;\n }",
"boolean service(Request request, Response response) throws IOException;",
"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}",
"public int accept(HttpResponseProlog prolog, HttpHeaders headers);",
"public interface CodeHandler {\n void onCode(int statusCode, Response response);\n}",
"private Integer getStatus(Map<String, Object> info) {\n return 200;\n }",
"public synchronized int getResponseCode() throws IOException {\n //avoid dup validateConnection\n if ((replyHeaders.responseCode == -1)\n || (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n validateConnection();\n }\n\n return replyHeaders.responseCode;\n }",
"public interface HttpCode {\n\n int NO_RESOURCE = 404;\n int SUCCESS = 200;\n int NO_TOKEN_HEADER = 401;\n int NO_TOKEN_FOUND = 403;\n int SYSTEM_EXCEPTION = 500;\n int NO_ACCOUNT_PROJECT = 402;\n int NO_ACCOUNT_NORMAL = 405;\n int ACCOUNT_OVERDUE = 406;\n int ERROR_ACCOUN_TOKEN = 407;\n int NO_RESOURCE_RIGHT = 408;\n int NO_EXAM_TIMES = 40601;\n int NO_KNOWLEDEG_TIMES = 40501;\n int NO_COURSE_TIME = 40801;\n int NO_COURSE_RIGHT = 40802;\n int SYSTEM_ERROR_REJECT = 409;\n int SYSTEM_ERROR_REFRESH_REPEAT = 410;\n int BUSINESS_ERROR_REPEAT = 411;\n int BUSINESS_ERROR_REFRESH_TOO_FAST = 412;\n int SMS_VERIFYCODE_NEED_WAIT = 40101;\n int SMS_NO_TEMPLATE = 40102;\n int SMS_NO_SEND_TIMES = 40103;\n int VERIFYCODE_DIFFERENT = 40104;\n int VERIFYCODE_NO_MORE_CHECKTIMES = 40105;\n int VERIFYCODE_EXPIRE = 40106;\n int SMS_NO_TELEPHONE = 40107;\n int VERIFYCODE_NULL = 40108;\n int SMS_SUCCESS = 20101;\n int HAS_NULL_REQUEST_PARAM = 413;\n int TOO_LONG_LENGTH = 414;\n int TOO_SHORT_LENGTH = 415;\n\n //公共功能\n int NO_RULE_FOUND = 40001;\n int NO_RULE_HANDLER_FOUND = 40002;\n int NO_ACCOUNT_FOUND = 40003;\n\n //用户登录(03)\n int FIND_PASSWORD_SUCCESS = 20301;\n int CHECK_USER_LOGIN_FAILURE = 40301;\n int CHECK_LOGINFORM_FAILURE = 40302;\n int CHECK_FIND_PASSWORD_FORM_FAILURE = 40303;\n int CHECK_USER_BY_TELEPHONE_FAILURE = 40304;\n int USER_TELEPHONE_ISNULL_CODE = 40305;\n int USER_LOGIN_SUCCESS_CODE = 40306;\n\n //用户中心(04)\n int MODIFY_USERINFO_SUCCESS = 20401;\n int MODIFY_PASSWORD_SUCCESS = 20402;\n int CHECK_OLD_PASSWORD_FAILURE = 40401;\n int CHECK_MODIFY_PASSWORD_FORM_FAILURE = 40402;\n int CHECK_USERINFO_FORM_FAILURE = 40403;\n int CHECK_BIND_MOBILE_FAILURE = 40404;\n int REPETITION_BIND_MOBILE = 40405;\n int BIND_MOBILE_FAILURE = 40406;\n\n //用户注册(02)\n int CHECK_TELEPHONE_EXIST = 40201;\n int CHECK_IDCARD_EXIST = 40202;\n int CHECK_ACCOUNT_EXIST = 40203;\n int CHECK_VERIFYCODE_FAILURE = 40204;\n int TELEPHONE_NULL = 40205;\n int TELEPHONE_ERROR = 40206;\n int PASSWORD_NULL = 40207;\n int PASSWORD_LENGTH_OVERLONG = 40208;\n int REGISTER_FAILURE = 40209;\n //身份证校验\n int IDCARD_LENGTH_ERROR=40210;\n int IDCARD_NUMERIC_ERROR=40211;\n int IDCARD_BIRTHDAY_INVALID=40212;\n int IDCARD_BIRTHDAY_OVER_LIMIT=40213;\n int IDCARD_MONTH_INVALID=40214;\n int IDCARD_DATE_INVALID=40215;\n int IDCARD_AREACODE_ERROR=40216;\n int IDCARD_ILLEGAL=40217;\n //身份证号不能为空\n int IDCARD_NULL=40218;\n\n\n //学习卡绑定(09)\n int PAYCARD_USED = 40901;\n int PAYCARD_NOTEXIST = 40902;\n int PAYCARD_PASSWORD_ERROR = 40903;\n int PAYCARD_BOUND = 40904;\n int PAYCARD_INVALID = 40905;\n int PAYCARD_UNNORMAL = 40906;\n int PROJECT_EXIST = 40907;\n int BIND_PROJECT_ERROR = 40908;\n int ADD_RULES_ERROR = 40909;\n int ADD_PROJECT_COMPLETERATE_ERROR = 40910;\n int INIT_KNOWLEDGE_QUESTIONS_ERROR = 40911;\n int PAYCARD_MEAL_NOTEXIST = 40912;\n int PAYCARD_MEAL_MISMATCHING = 40913;\n int NO_AUTH_BIND_PROJECT = 40914;\n int PAYCARD_RENEW_NO_SAME_JG = 40915;\n int PAYCARD_RENEW_NO_SAME_PRICE = 40916;\n int PAYCARD_RENEW_NO_SAME_CARDTYPE = 40917;\n int PAYCARD_RENEW_NO_SAME_TRAINTYPE = 40918;\n int PAYCARD_RENEW_NO_ID_PASSWORD = 40919;\n int PAYCARD_RENEW_NO_ACCOUNT_PROJECT_ID = 40920;\n int REQUEST_VR_NODEJS_URL = 40921;\n int NO_PROVINCE_TK = 40922;\n\n //培训考核\n int NO_EXAM_QUESTIONS = 40602;\n int PAPER_NOT_COMPLETE = 40603;\n int NO_EXAM_RULES = 40604;\n int TOO_MANY_EXAM_RULES = 40605;\n int CHECK_MARK_EXAM_QUESTION_FORM_FAILURE = 40606;\n int CHECK_SAVE_EXAM_ANSWER_FORM_FAILURE = 40607;\n int PAPER_OR_SUBJECT_NOT_EXISTS = 40608;\n int SHORT_OF_WELD_SELECT = 40609;\n int NOT_WELD_PROJECT = 40610;\n\n //知识点学习(05)\n int GET_QUESTION_FAILURE = 40502;\n int NO_QUESTION_FLAG = 40503;\n int CHECK_ANSWER_QUESTION_FORM_FAILURE = 40504;\n int NO_FLAG = 40506;\n\n //(完成度)计算(10)\n int WCD_CALCULATE_TARGET_ERROR = 41001;\n\n //vr实操 知识点练习(11)\n int CHECK_VR_KNOWLEDGE_TRAIN_FORM_FAILURE = 41101;\n int NO_VR_KNOWLEDEG_TIMES = 41102;\n int CHECK_SAVE_VR_EXAM_ANSWER_FORM_FAILURE = 41103;\n int CHECK_VR_COMMIT_PAPER_FAILURE = 41104;\n int CONNECT_VR_FAILURE= 41105;\n int WRONG_STBH=41106;\n int NO_TRAIN_MX=41107;\n int NO_TRAIN=41108;\n int NO_PAPER_EXISTS=41109;\n\n int CHECK_VERSION_FAILURE = 42101;\n\n //机构登录(36)\n int FIND_JGPASSWORD_SUCCESS = 23601;\n int CHECK_JG_LOGIN_FAILURE = 43601;\n int CHECK_JGLOGINFORM_FAILURE = 43602;\n int CHECK_FIND_JGPASSWORD_FORM_FAILURE = 43603;\n int CHECK_JG_BY_TELEPHONE_FAILURE = 43604;\n int NO_MENUS = 43605;\n\n //机构信息(37)\n int MODIFY_JGINFO_SUCCESS = 23701;\n int MODIFY_JGPASSWORD_SUCCESS = 23702;\n int CHECK_OLD_JGPASSWORD_FAILURE = 43701;\n int CHECK_MODIFY_JGPASSWORD_FORM_FAILURE = 43702;\n int CHECK_JGINFO_FORM_FAILURE = 43703;\n // 公用查询(30)\n int CHECK_MANAGER_COMMON_EMPTY = 43001;\n\n // 注册绑卡(31)\n int CHECK_MANAGER_REGISTER_EMPTY = 43101;\n int CHECK_MANAGER_REGISTER_TO_LONG_NAME = 43102;\n int CHECK_MANAGER_REGISTER_TELEPHONE_FAILURE = 43103;\n int CHECK_MANAGER_REGISTER_RECHECK_NO_EXPIREDATE = 43104;\n int CHECK_MANAGER_REGISTER_SUBORG_NO_PAYSTATE = 43105;\n int CHECK_MANAGER_REGISTER_NO_PLAN = 43106;\n int CHECK_MANAGER_REGISTER_PROJECT_SAME = 43107;\n int CHECK_MANAGER_REGISTER_PROJECT_SAME_ALREADY = 43108;\n int CHECK_MANAGER_REGISTER_NO_PAR_CARD_NEW = 43109;\n int CHECK_MANAGER_REGISTER_NO_PAR_CARD_RECHECK = 43110;\n int CHECK_MANAGER_REGISTER_NO_PAR_CARD_PRACTICAL = 43111;\n int CHECK_MANAGER_REGISTER_PLANTYPE_FAILURE = 43112;\n int CHECK_MANAGER_REGISTER_PAYCARD_IS_EMPTY = 43113;\n\n /*培训记录提取成功*/\n int EXTRACT_TRAIN_CERTIFY_SUCCESS = 23201;\n /*存在已提取学员*/\n int EXTRACT_REPEAT = 43201;\n /*培训不及格*/\n int EXTRACT_NOT_PASS_TRAIN = 43202;\n /*未查询到学员*/\n int EXTRACT_NO_STUDENT = 43203;\n\n int STUDENT_REPORT_DATE_ERROR = 43301;\n int DATEBEGIN_NULL_ERROR = 43302;\n int DATEEND_NULL_ERROR = 43303;\n\n //班次名称是否已存在\n int CHECK_BATCH_NAME = 43403;\n\n //机构班次人员管理\n int CHECK_ADD_BATCH_STUDENT_FAILURE = 43501;\n int CHECK_DELETE_BATCH_STUDENT_FAILURE = 43502;\n\n int ADD_BATCH_STUDENT_ERROR = 43503;\n int DELETE_BATCH_STUDENT_ERROR = 43504;\n\n int BATCH_COUNT_ERROR = 43505;\n int BATCH_STATE_ERROR = 43506;\n\n /*微信返回空*/\n int DO_NOTHING = 43801;\n /*公众号配置错误*/\n int NO_CONFIG = 43802;\n /*签名错误*/\n int SIGN_ERROR = 43803;\n /*获取token异常*/\n int CAN_NOT_GET_TOKEN = 43804;\n /*获取token异常*/\n int CAN_NOT_GET_TICKET = 43805;\n\n /*未绑定微信账号*/\n int NO_BIND_WECHAT = 43806;\n /*未绑定培训项目*/\n int NO_BIND_PROJECT = 43807;\n\n /*项目数据异常*/\n int PROJECT_MESSAGE_ERROR = 43808;\n\n /*获取用户微信信息失败*/\n int GET_USERINFO_ERROR = 43809;\n\n /*成功绑定项目*/\n int SAVE_APID_SUCCESS = 43810;\n\n /*获取openId为空*/\n int GET_OPENID_ERROR= 43811;\n\n\n int EXAM_RULE_IS_NOT_REACH = 99001;// 开始考试前,有内容未达标。\n int EXAM_RULE_IS_NEED_NOTICE = 99002;// 开始考试前,有内容未达标,需要提示信息。\n\n /* Redis 相关参数 */\n int REDIS_PARAM_IS_EMPTY = 43900;\n\n /* 题库代码和题库版本为空*/\n int NO_TKDM_OR_VERSION_NOW = 43901;\n int NO_TKDM_OR_VERSION = 43902;\n}",
"public StatusCode getStatusCode() {\n return statusCode;\n }",
"public static int httpMethodId(final String httpMethod) {\n if (startsWith(httpMethod, GET) || startsWith(httpMethod, HEAD)) {\n return 0;\n } else if (startsWith(httpMethod, POST) || startsWith(httpMethod, PUT)) {\n return 1;\n } else if (startsWith(httpMethod, CONNECT)) {\n return 2;\n } else if (startsWith(httpMethod, OPTIONS)) {\n return 3;\n } else {\n return -1;\n /**\n * No match...\n * Following methods are not implemented: ||\n * startsWith(httpMethod,\"TRACE\")\n */\n }\n }",
"public int getStatusCode() {\n\t\treturn response.getStatusLine().getStatusCode();\n\t}",
"public interface ResponseStatusConstants {\n\n\t/** Status code for resource not found exception. */\n\tint RESOURCE_NOT_FOUND = 404;\n\n\t/** Status code for resource not created exception. */\n\tint RESOURCE_NOT_CREATED = 400;\n\n\t/** Status code for resource invalid exception. */\n\tint RESOURCE_INVALID = 400;\n\n\t/** Status code for not authorized exception. */\n\tint UNAUTHORIZED = 401;\n\n}",
"@Override\n public Status getStatus() throws IOException;",
"interface LockssGetMethod extends HttpMethod {\n long getResponseContentLength();\n }",
"public Integer getStatusCode() {\n return statusCode;\n }",
"public int getStatus();",
"public int getStatus();",
"public int getStatus();",
"String getHttpMethod();",
"String getHttpMethod();",
"public int getStatusCode()\n {\n return Integer.parseInt(startLine.split(\" \")[1]);\n }",
"public int getResponse() {return response;}",
"@Test\n\tpublic void testStatusCode() {\n\t\tgiven().\n\t\tget(Endpoint.GET_COUNTRY).then().statusCode(200);\n\t}",
"public HttpStatus getHttpStatus() {\n return httpStatus;\n }",
"public HttpStatus getHttpStatus() {\n return httpStatus;\n }",
"TransmissionProtocol.Status getStatus();",
"private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }",
"@Override\n\tpublic int getStatus();",
"@Override\n\tpublic int getStatus();",
"public int getResponseStatus() {\n return responseStatus;\n }",
"public HttpStatus getStatusCode() {\n return statusCode;\n }",
"@RequestLine(\"GET /status\")\n Status getNeustarNetworkStatus();",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }"
] | [
"0.79022324",
"0.7504849",
"0.742197",
"0.742197",
"0.72349036",
"0.7226157",
"0.72035074",
"0.7151141",
"0.7062775",
"0.69155204",
"0.6700309",
"0.66408074",
"0.662412",
"0.6576522",
"0.6567496",
"0.6526421",
"0.6525116",
"0.64627796",
"0.64070505",
"0.6401836",
"0.64013565",
"0.6378084",
"0.63708603",
"0.6359676",
"0.631666",
"0.63101774",
"0.63030684",
"0.62949437",
"0.6255432",
"0.625287",
"0.62401414",
"0.6225849",
"0.62223977",
"0.62084466",
"0.62084466",
"0.6194632",
"0.6188682",
"0.6150238",
"0.61407226",
"0.6129296",
"0.6121498",
"0.61087024",
"0.6106529",
"0.6100401",
"0.60869884",
"0.60743374",
"0.607167",
"0.6048981",
"0.6021086",
"0.6020114",
"0.6020114",
"0.6020114",
"0.6020114",
"0.6019589",
"0.5998784",
"0.59711915",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.5960917",
"0.59542614",
"0.59502447",
"0.5926014",
"0.59247047",
"0.5920093",
"0.59141934",
"0.5910271",
"0.59070295",
"0.58993185",
"0.58989245",
"0.5874494",
"0.58619684",
"0.5837282",
"0.5835793",
"0.58327174",
"0.581905",
"0.581905",
"0.581905",
"0.5806572",
"0.5806572",
"0.57883114",
"0.57740843",
"0.5773516",
"0.5762986",
"0.5762986",
"0.5758815",
"0.57358754",
"0.57166046",
"0.57166046",
"0.57067406",
"0.57014287",
"0.56980705",
"0.5675794"
] | 0.6671865 | 11 |
check if HTTP method is supported | private boolean isSupportedMethod(String sHTTPMethod) {
return Arrays.asList(SUPPORTED_METHODS).contains(sHTTPMethod.toUpperCase());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasHttpMethod();",
"Collection<HttpMethod> getMinimalSupportedHttpMethods();",
"public HTTPRequestMethod getMethod();",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"String getHttpMethod();",
"String getHttpMethod();",
"private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }",
"public boolean isMethodSupported(String methodName) throws IOException;",
"@Override\r\n\tprotected ResponseEntity<Object> handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex,\r\n\t\t\tHttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\treturn super.handleHttpRequestMethodNotSupported(ex, headers, status, request);\r\n\t}",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"public static boolean isGet(String argRequestMethod) {\r\n\t\treturn HttpConstants.GET.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}",
"private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }",
"@Override\n\tpublic boolean supports(MethodParameter methodParameter, Type targetType,\n\t\t\tClass<? extends HttpMessageConverter<?>> converterType) {\n\t\tSystem.out.println(\"from Requestbodyaddvice support method\");\n\t\treturn false;\n\t}",
"public static boolean isPost(String argRequestMethod) {\r\n\t\treturn HttpConstants.POST.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"@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 }",
"@ResponseStatus (HttpStatus.METHOD_NOT_ALLOWED)\n\t@ExceptionHandler (HttpRequestMethodNotSupportedException.class)\n\tpublic Result handleHttpRequestMethodNotSupportedException (HttpRequestMethodNotSupportedException e)\n\t{\n\t\treturn new Result ().failure (\"request_method_not_supported\");\n\t}",
"public void setMethod(HTTPMethod method);",
"@Override\n public ServiceResponse allowedMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.allowedMethods(request, this.getTargetUrl());\n }",
"public String getHttpMethod() {\n return httpMethod;\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkProtocol() {\n\t\tboolean flag = oTest.checkProtocol();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn false;\r\n\t}",
"@ExceptionHandler(HttpRequestMethodNotSupportedException.class)\r\n public ResponseEntity<DefaultErrorList> handlerMethodNotSupported(HttpRequestMethodNotSupportedException ex, HttpServletRequest request) {\r\n\t\tLOGGER.error(\"Error metodo HTTP no soportado para este endpoint, {}\", request.getRequestURL().toString());\r\n\t\treturn new ResponseEntity<DefaultErrorList>(new DefaultErrorList(new DefaultError\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(GeneralCatalog.GRAL001.getCode(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getMessage(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getLevelException().toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Metodo HTTP no soportado para este endpoint\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trequest.getRequestURL().toString()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)), HttpStatus.INTERNAL_SERVER_ERROR);\r\n }",
"boolean hasProtocol();",
"public boolean hasReqMethod() {\n return fieldSetFlags()[6];\n }",
"Set<HttpMethod> optionsForAllow(URI url) throws RestClientException;",
"public String getHttpmethod() {\n return httpmethod;\n }",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"protected boolean isApplicable(SPRequest req) {\n\n Log.debug(\"isApplicable ? \" + req.getPath() + \" vs \" + getRoute());\n\n if (!req.getMethod().equals(getHttpMethod()))\n return false;\n\n String[] uri = req.getSplitUri();\n String[] tok = splitPath;\n if (uri.length != tok.length && splatIndex == -1)\n return false;\n\n if (uri.length <= splatIndex)\n return false;\n\n for (int i = 0; i < tok.length; i++) {\n if (tok[i].charAt(0) != ':' && tok[i].charAt(0) != '*' && !tok[i].equals(uri[i]))\n return false;\n }\n\n return true;\n }",
"boolean isActionMethod(Method m) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n if (mapping==null)\n return false;\n if (mapping.value().length()==0) {\n warnInvalidActionMethod(m, \"Url mapping cannot be empty.\");\n return false;\n }\n if (Modifier.isStatic(m.getModifiers())) {\n warnInvalidActionMethod(m, \"method is static.\");\n return false;\n }\n Class<?>[] argTypes = m.getParameterTypes();\n for (Class<?> argType : argTypes) {\n if (!converterFactory.canConvert(argType)) {\n warnInvalidActionMethod(m, \"unsupported parameter '\" + argType.getName() + \"'.\");\n return false;\n }\n }\n Class<?> retType = m.getReturnType();\n if (retType.equals(void.class)\n || retType.equals(String.class)\n || Renderer.class.isAssignableFrom(retType)\n )\n return true;\n warnInvalidActionMethod(m, \"unsupported return type '\" + retType.getName() + \"'.\");\n return false;\n }",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"@ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)\n @ExceptionHandler(HttpRequestMethodNotSupportedException.class)\n public Result<Object> handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {\n logger.error(\"\", e);\n return new Result<Object>(405,\"不支持当前请求方法\");\n }",
"public boolean isSupported(MediaType mediaType);",
"public boolean isFileTransferHttpSupported() {\n\t\tLogger.i(TAG, \"isFileTransferHttpSupported value\" + fileTransferHttpSupported);\n\t\treturn fileTransferHttpSupported;\n\t}",
"public String getRequestMethod()\n {\n return requestMethod;\n }",
"public abstract boolean isAppropriateRequest(Request request);",
"public static boolean isGet(HttpServletRequest argRequest) {\r\n\t\treturn HttpConstants.GET.equalsIgnoreCase(argRequest.getMethod());\r\n\t}",
"protected boolean methodForbidden() {\n return methodToTest.getName().equals(\"getClassNull\")\n || methodToTest.getName().startsWith(\"isA\")\n || methodToTest.getName().equals(\"create\")\n || methodToTest.getName().equals(\"getTipString\")\n || methodToTest.getName().equals(\"toString\");\n }",
"protected Set<String> supportedMethods() {\n return SUPPORTED_METHODS;\n }",
"public void setHttpMethod(int httpMethod) {\n method = httpMethod;\n }",
"private static boolean supportsLanModeResponse(int method) {\n switch (method) {\n case AylaRestService.PUT_LOCAL_REGISTRATION:\n case AylaRestService.POST_LOCAL_REGISTRATION:\n case AylaRestService.PROPERTY_CHANGE_NOTIFIER:\n case AylaRestService.REACHABILITY:\n case AylaRestService.GET_DEVICES_LANMODE:\n case AylaRestService.GET_NODES_LOCAL_CACHE:\n case AylaRestService.GET_PROPERTIES_LANMODE:\n \t\n case AylaRestService.GET_NODE_PROPERTIES_LANMODE:\n case AylaRestService.GET_NODE_DATAPOINT_LANMODE:\n case AylaRestService.CREATE_NODE_DATAPOINT_LANMODE:\n \t\n case AylaRestService.GET_PROPERTY_DETAIL_LANMODE:\n case AylaRestService.GET_DATAPOINT_LANMODE:\n case AylaRestService.GET_DATAPOINTS_LANMODE:\n case AylaRestService.CREATE_DATAPOINT_LANMODE:\n case AylaRestService.GET_NODES_CONNECTION_STATUS_LANMODE:\n \t\n case AylaRestService.GET_NODES_CONNECTION_STATUS_ZIGBEE_LANMODE:\n \t\n // For secure wifi setup\n case AylaRestService.SEND_NETWORK_PROFILE_LANMODE:\n // For delete wifi profile secure session\n case AylaRestService.DELETE_NETWORK_PROFILE_LANMODE:\n \t\n return true;\n }\n return false;\n }",
"public List<String> getSupportedMethods(Set<String> restParams) {\n //we try to avoid hardcoded mappings but the index api is the exception\n if (\"index\".equals(name) || \"create\".equals(name)) {\n List<String> indexMethods = Lists.newArrayList();\n for (String method : methods) {\n if (restParams.contains(\"id\")) {\n //PUT when the id is provided\n if (HttpPut.METHOD_NAME.equals(method)) {\n indexMethods.add(method);\n }\n } else {\n //POST without id\n if (HttpPost.METHOD_NAME.equals(method)) {\n indexMethods.add(method);\n }\n }\n }\n return indexMethods;\n }\n\n return methods;\n }",
"private boolean isJSONPRequest(String callbackMethod) {\n\t\treturn (callbackMethod != null && callbackMethod.length() > 0);\n\t}",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n httpMethod_ = s;\n }\n return s;\n }\n }",
"private void setRequestMethod() {\n switch (type) {\n case GET:\n try {\n connection.setRequestMethod(GET);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as GET successfully\");\n LOG.severe(e.toString());\n }\n break;\n case POST:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(POST);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as POST successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PUT:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PUT);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PUT successfully\");\n LOG.severe(e.toString());\n }\n break;\n case DELETE:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(DELETE);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as DELETE successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PATCH:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PATCH);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PATCH successfully\");\n LOG.severe(e.toString());\n }\n break;\n }\n }",
"@Override\n public boolean isEntityAvailable() {\n if (getMethod().equals(Method.GET) || getMethod().equals(Method.HEAD)\n || getMethod().equals(Method.DELETE)) {\n return false;\n }\n\n return super.isEntityAvailable();\n }",
"@ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)\n @ExceptionHandler(HttpRequestMethodNotSupportedException.class)\n public AjaxResult<String> handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {\n log.error(\"不支持当前请求方法\", e);\n return new AjaxResult<String>(ResultStatusCode.METHOD_NOT_ALLOWED.getCode(), ResultStatusCode.METHOD_NOT_ALLOWED.getMsg());\n }",
"public HttpMethod getMethod()\r\n/* 29: */ {\r\n/* 30:56 */ return this.method;\r\n/* 31: */ }",
"public Set<HttpMethod> getAllow()\r\n/* 137: */ {\r\n/* 138:209 */ String value = getFirst(\"Allow\");\r\n/* 139:210 */ if (value != null)\r\n/* 140: */ {\r\n/* 141:211 */ List<HttpMethod> allowedMethod = new ArrayList(5);\r\n/* 142:212 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 143:213 */ for (String token : tokens) {\r\n/* 144:214 */ allowedMethod.add(HttpMethod.valueOf(token));\r\n/* 145: */ }\r\n/* 146:216 */ return (Set)EnumSet.copyOf(allowedMethod);\r\n/* 147: */ }\r\n/* 148:219 */ return (Set)EnumSet.noneOf(HttpMethod.class);\r\n/* 149: */ }",
"boolean supportsAccepts();",
"@ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)\n @ExceptionHandler(HttpRequestMethodNotSupportedException.class)\n public String handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {\n log.error(\"不支持当前请求方法\", e);\n return new Msg().fail().addVal(Msg.msg, \"request_method_not_supported\").toJson();\n }",
"@Nonnull\n protected String getRequestSpec(WebTarget target, String method) {\n return method + \" \" + target.getUri().getPath();\n }",
"@Override\n public HttpMethods getMethod() {\n return HttpMethods.EVAL;\n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"@java.lang.Override\n public boolean hasProtocol() {\n return protocol_ != null;\n }",
"public static boolean isConnect(String argMethod) {\r\n\t\treturn HttpConstants.CONNECT.equalsIgnoreCase(argMethod);\r\n\t}",
"public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"boolean send(URL url, String method, byte[] body) {\n close();\n if (url.scheme != \"http\" || url.hostname == null) {\n return false;\n }\n var address = InetAddress.get(url.hostname);\n if (address == null) {\n return false;\n }\n var port = url.port > 0 ? url.port : Http.HTTP_PORT;\n var socket = new Socket();\n var status = socket.connect(address, port);\n if (status != 0) {\n System.println(\"connect: \" + System.strerror(status));\n return false;\n }\n var portText = url.port > 0 ? \":\" + url.port : \"\";\n var text = method + \" \" + url.getRequestUri() + \" \" + Http.VERSION +\n \"\\r\\n\" + Http.HOST + \": \" + url.hostname + portText + \"\\r\\n\" +\n Http.USER_AGENT + \": \" + USER_AGENT + \"\\r\\n\" +\n Http.CONTENT_LENGTH + \": \" + (body == null ? 0 : body.length) +\n \"\\r\\n\\r\\n\";\n socket.write(text.toByteArray());\n if (body != null) {\n socket.write(body);\n }\n\n var lineReader = new LineReader(socket);\n var parser = new HttpParser(lineReader);\n var statusLine = parser.parseStatusLine();\n if (statusLine == null) {\n socket.close();\n return false;\n }\n this.httpVersion = statusLine[0];\n this.status = System.parseInt(statusLine[1]);\n this.headers = new map[String]String;\n while (true) {\n var header = parser.parseHeader();\n if (header == null || header.length == 0) {\n break;\n }\n this.headers[header[0]] = header[1];\n }\n this.reader = lineReader;\n return true;\n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public HttpMethod getMethod() {\n return method;\n }",
"public static boolean isPost(HttpServletRequest argRequest) {\r\n\t\treturn HttpConstants.POST.equalsIgnoreCase(argRequest.getMethod());\r\n\t}",
"public void setReqMethod(java.lang.String value) {\n this.req_method = value;\n }",
"boolean isValid()\n {\n return isRequest() && isResponse();\n }",
"boolean hasApiUrl();",
"private static boolean supportsOfflineResponse(int method) {\n switch (method) {\n case AylaRestService.GET_DEVICES_LANMODE:\n case AylaRestService.GET_NODES_LOCAL_CACHE:\n case AylaRestService.CREATE_DATAPOINT_LANMODE:\n case AylaRestService.CREATE_NODE_DATAPOINT_LANMODE:\n \t\n case AylaRestService.GET_DATAPOINT_LANMODE:\n case AylaRestService.GET_DATAPOINTS_LANMODE:\n \t\n case AylaRestService.GET_PROPERTIES_LANMODE:\n case AylaRestService.GET_NODE_PROPERTIES_LANMODE:\n case AylaRestService.GET_NODE_DATAPOINT_LANMODE:\n \t\n case AylaRestService.GET_NODES_CONNECTION_STATUS_ZIGBEE_LANMODE:\n \t\n case AylaRestService.GET_PROPERTY_DETAIL_LANMODE:\n case AylaRestService.GET_NODES_CONNECTION_STATUS_LANMODE:\n case AylaRestService.POST_USER_LOGIN:\n\n\t\t\t// These APIs are used during wifi setup / registration where we may not be\n\t\t\t// connected to the cloud, but rather to the device's wifi AP.\n case AylaRestService.SET_DEVICE_CONNECT_TO_NETWORK:\n case AylaRestService.GET_MODULE_WIFI_STATUS:\n case AylaRestService.START_NEW_DEVICE_SCAN_FOR_APS:\n case AylaRestService.GET_NEW_DEVICE_STATUS:\n case AylaRestService.PUT_NEW_DEVICE_TIME:\n case AylaRestService.DELETE_DEVICE_WIFI_PROFILE:\n case AylaRestService.CONNECT_NEW_DEVICE_TO_SERVICE:\n case AylaRestService.SET_HOST_NETWORK_CONNECTION:\n case AylaRestService.DELETE_HOST_NETWORK_CONNECTION:\n case AylaRestService.DELETE_HOST_NETWORK_CONNECTIONS:\n case AylaRestService.CONFIRM_NEW_DEVICE_TO_SERVICE_CONNECTION:\n \t\n case AylaRestService.RETURN_HOST_SCAN:\n case AylaRestService.RETURN_HOST_NETWORK_CONNECTION:\n case AylaRestService.CONNECT_TO_NEW_DEVICE:\n case AylaRestService.GET_NEW_DEVICE_SCAN_RESULTS_FOR_APS:\n case AylaRestService.PUT_DISCONNECT_AP_MODE:\n \n // While this call should require network access, it is made right after re-connecting\n\t\t\t// to the original wifi network during wifi setup, and on certain devices the\n\t\t\t// check for reachability fails before this call is made. Including this API\n\t\t\t// in the list here allows these devices to complete setup.\n case AylaRestService.GET_NEW_DEVICE_CONNECTED:\n case AylaRestService.PROPERTY_CHANGE_NOTIFIER:\n case AylaRestService.PUT_LOCAL_REGISTRATION:\n \n // for same-lan wifi setup\n case AylaRestService.POST_LOCAL_REGISTRATION:\n case AylaRestService.DELETE_NETWORK_PROFILE_LANMODE:\n case AylaRestService.SEND_NETWORK_PROFILE_LANMODE:\n case AylaRestService.GET_NEW_DEVICE_WIFI_STATUS:\n\n // Confirm reachability state is finalized locally, either service or device, or both. \n case AylaRestService.REACHABILITY:\n return true;\n }\n return false;\n }",
"@Test\n public void testSupports() {\n assertTrue(instance.supports(SpringRestService.class));\n // JAX-RS RestService class\n assertFalse(instance.supports(StandardRestService.class));\n // Default RestService class\n assertFalse(instance.supports(DefaultRestService.class));\n // No annotated RestService class\n assertFalse(instance.supports(RestService.class));\n // null\n assertFalse(instance.supports(null));\n }",
"String getMethod();",
"String getMethod();",
"@Nullable\n public static EHTTPMethod getHttpMethod (@Nonnull final HttpServletRequest aHttpRequest)\n {\n ValueEnforcer.notNull (aHttpRequest, \"HttpRequest\");\n\n final String sMethod = aHttpRequest.getMethod ();\n return EHTTPMethod.getFromNameOrNull (sMethod);\n }",
"Set<HttpMethod> optionsForAllow(String url, Object... uriVariables) throws RestClientException;",
"private Set<Protocol> discoverSupportedProtocols() throws IOException {\n HttpHead head = new HttpHead(uri);\n head.addHeader(HttpHeaders.ACCEPT, \"text/xml, application/x-frpc\");\n HttpResponse response = httpClient.execute(head);\n // get all \"Accept\" header values as Set of strings\n Set<String> acceptHeaderValues = Arrays.stream(response.getHeaders(HttpHeaders.ACCEPT))\n .map(Header::getElements).flatMap(Arrays::stream).map(HeaderElement::getName)\n .collect(Collectors.toSet());\n // check if they contain \"application/x-frpc\" or \"text/xml\" or both\n Set<Protocol> result = EnumSet.noneOf(Protocol.class);\n if (acceptHeaderValues.contains(Protocol.FRPC.getContentType())) {\n result.add(Protocol.FRPC);\n }\n if (acceptHeaderValues.contains(Protocol.XML_RPC.getContentType())) {\n result.add(Protocol.XML_RPC);\n }\n // return the result as set of protocols supported by the server\n return result;\n }",
"@Nullable @NotEmpty public String getMethod() {\n return StringSupport.trimOrNull(method);\n }",
"public static boolean isDelete(String argMethod) {\r\n\t\treturn HttpConstants.DELETE.equalsIgnoreCase(argMethod);\r\n\t}",
"public static int httpMethodId(final String httpMethod) {\n if (startsWith(httpMethod, GET) || startsWith(httpMethod, HEAD)) {\n return 0;\n } else if (startsWith(httpMethod, POST) || startsWith(httpMethod, PUT)) {\n return 1;\n } else if (startsWith(httpMethod, CONNECT)) {\n return 2;\n } else if (startsWith(httpMethod, OPTIONS)) {\n return 3;\n } else {\n return -1;\n /**\n * No match...\n * Following methods are not implemented: ||\n * startsWith(httpMethod,\"TRACE\")\n */\n }\n }",
"public void setRequestMethod(String requestMethod){\n this.requestMethod = requestMethod;\n }",
"@Override\n\tprotected Set<RequestTypeEnum> provideAllowableRequestTypes() {\n\t\treturn Collections.singleton(RequestTypeEnum.POST);\n\t}",
"boolean hasMethod();",
"boolean hasMethod();",
"boolean hasMethod();",
"public boolean canHandle(HttpServletRequest request) {\n if (log.isDebugEnabled()) {\n log.debug(\"Inside Token2Authenticator canHandle method\");\n }\n return StringUtils.isNotEmpty(request.getParameter(Token2Constants.CODE));\n }",
"public HttpMethod method() {\n\t\treturn method;\n\t}",
"@Override\r\n\tprotected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex,\r\n\t\t\tHttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\treturn super.handleMethodArgumentNotValid(ex, headers, status, request);\r\n\t}",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n httpMethod_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"private boolean isFormPost(HttpServletRequest request)\r\n/* 91: */ {\r\n/* 92:118 */ return (request.getContentType() != null) && (request.getContentType().contains(\"application/x-www-form-urlencoded\")) && (\"POST\".equalsIgnoreCase(request.getMethod()));\r\n/* 93: */ }",
"public boolean hasMethod() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }",
"@ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)\n @ExceptionHandler(HttpRequestMethodNotSupportedException.class)\n public ModelAndView handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {\n //log.error(\"不支持当前请求方法\", e);\n String message = \"【不支持当前请求方法】\" + e.getMessage();\n ModelAndView modelAndView = new ModelAndView(\"error/error\");\n modelAndView.addObject(\"message\", message);\n modelAndView.addObject(\"code\", 405);\n modelAndView.addObject(\"exception\", e);\n return modelAndView;\n }",
"public boolean isSupported() {\n\t\treturn true;\r\n\t}"
] | [
"0.82364774",
"0.7192524",
"0.7117007",
"0.7085474",
"0.7084208",
"0.70812386",
"0.70812386",
"0.6905309",
"0.67807746",
"0.65462375",
"0.648353",
"0.64081204",
"0.6369265",
"0.6305307",
"0.6294494",
"0.6255011",
"0.6211679",
"0.61534435",
"0.614888",
"0.6142477",
"0.6130073",
"0.61259747",
"0.6086455",
"0.6045772",
"0.6043718",
"0.6002273",
"0.5989092",
"0.598214",
"0.594633",
"0.59399563",
"0.59138733",
"0.5912464",
"0.5881434",
"0.5879257",
"0.58778554",
"0.5875699",
"0.586653",
"0.5851735",
"0.5845799",
"0.5830858",
"0.58155066",
"0.5774312",
"0.5744847",
"0.56846493",
"0.56721216",
"0.565404",
"0.56536734",
"0.5645662",
"0.5616867",
"0.5599038",
"0.55967736",
"0.5589621",
"0.558711",
"0.5575439",
"0.5568401",
"0.5566009",
"0.5566009",
"0.5566009",
"0.5566009",
"0.5566009",
"0.5566009",
"0.5566009",
"0.5566009",
"0.5566009",
"0.5566009",
"0.55595624",
"0.5556486",
"0.5550255",
"0.55401796",
"0.5518049",
"0.550479",
"0.550152",
"0.5489986",
"0.548887",
"0.54884636",
"0.548358",
"0.5479595",
"0.5471472",
"0.54708266",
"0.54708266",
"0.5466228",
"0.5463624",
"0.54570854",
"0.5445961",
"0.54450876",
"0.54250926",
"0.54185826",
"0.5417911",
"0.54176474",
"0.54176474",
"0.54176474",
"0.5415503",
"0.54065734",
"0.54047644",
"0.54008096",
"0.53936356",
"0.5388931",
"0.53874236",
"0.53765815",
"0.537336"
] | 0.79390204 | 1 |
get the response that should be sent to the client based on HTTP method, request, & status code | private String getResponse(String sHTTPMethod, String sHTTPRequest, int iStatusCode) {
// default is internal server error
String sResponse = HTML_START + "There was an internal error with the server." + HTML_END;
// update based on status code
if (iStatusCode == 403) {
sResponse = HTML_START + "HTTP method not supported" + HTML_END;
} else if (iStatusCode == 301) {
sResponse = getRedirectURL(sHTTPRequest);
} else if (iStatusCode == 404) {
sResponse = HTML_START + "File not found" + HTML_END;
} else if (iStatusCode == 415) {
sResponse = HTML_START + "The server does not support this file type" + HTML_END;
} else if (iStatusCode == 200 ) {
sResponse = (sHTTPMethod.equalsIgnoreCase("GET")) ? getFilePath(sHTTPRequest) : "";
}
// return final response
return sResponse;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getResponse();",
"public int getResponse() {return response;}",
"public abstract String getResponse();",
"public HTTPResponse get(HTTPRequest request) {\n\t\tHTTPResponse response = new HTTPResponse();\n\t\tresponse.setResponseHeader(request.getProtocol(), HTTPConstants.STATUS_OK, HTTPConstants.STATUS_CODE_OK);\n\t\tresponse.setResponse(getResponseString(true));\n\t\treturn response;\n\t}",
"String getResponse();",
"public ServletResponse getResponse();",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"int getStatusCode();",
"int getStatusCode();",
"int getStatusCode( );",
"protected HttpResponse doReceiveResponse(final HttpRequest request, final HttpClientConnection conn,\n final HttpContext context)\n throws HttpException, IOException\n {\n// log.debug(\"EspMeshHttpRequestExecutor::doReceiveResponse()\");\n if (request == null)\n {\n throw new IllegalArgumentException(\"HTTP request may not be null\");\n }\n if (conn == null)\n {\n throw new IllegalArgumentException(\"HTTP connection may not be null\");\n }\n if (context == null)\n {\n throw new IllegalArgumentException(\"HTTP context may not be null\");\n }\n \n HttpResponse response = null;\n int statuscode = 0;\n \n // check whether the request is instantly, instantly request don't wait the response\n boolean isInstantly = request.getParams().isParameterTrue(EspHttpRequest.ESP_INSTANTLY);\n if (isInstantly)\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n // let the connection used only once to check whether the device is available\n context.setAttribute(\"timeout\", 1);\n response = ResponseFactory.newHttpResponse(statusline, context);\n Header contentLengthHeader = new BasicHeader(HTTP.CONTENT_LEN, \"0\");\n response.addHeader(contentLengthHeader);\n }\n else\n {\n if (!request.getRequestLine().getMethod().equals(EspHttpRequest.METHOD_COMMAND))\n {\n while (response == null || statuscode < HttpStatus.SC_OK)\n {\n \n response = conn.receiveResponseHeader();\n if (canResponseHaveBody(request, response))\n {\n conn.receiveResponseEntity(response);\n }\n statuscode = response.getStatusLine().getStatusCode();\n \n } // while intermediate response\n }\n else\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n response = ResponseFactory.newHttpResponse(statusline, context);\n // copy request headers\n // Header[] requestHeaders = request.getAllHeaders();\n // for (Header requestHeader : requestHeaders) {\n // System.out.println(\"requestHeader:\" + requestHeader);\n // response.addHeader(requestHeader);\n // }\n \n Header[] contentLengthHeader = request.getHeaders(HTTP.CONTENT_LEN);\n if (contentLengthHeader == null || contentLengthHeader.length != 1)\n {\n throw new IllegalArgumentException(\"contentLengthHeader == null || contentLengthHeader.length != 1\");\n }\n // at the moment, mesh command request and response len is the same\n response.addHeader(contentLengthHeader[0]);\n \n conn.receiveResponseEntity(response);\n }\n }\n \n // for device won't reply \"Connection: Keep-Alive\" by default, add the header by manual\n if (response != null && response.getFirstHeader(HTTP.CONN_DIRECTIVE) == null)\n {\n response.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);\n }\n \n return response;\n \n }",
"HttpServletResponse getCurrentResponse();",
"Http.Status status();",
"abstract Integer getStatusCode();",
"private static HttpResponseMessage extractResponseInformation(HttpMethod method) {\n // Create and return HttpResponseMethod\n HttpResponseMessage responseMessage = new HttpResponseMessage();\n responseMessage.setStatusCode(method.getStatusCode());\n try {\n responseMessage.setResponseBody(method.getResponseBodyAsString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return responseMessage;\n }",
"public abstract int statusCode();",
"private String sendRequest(String responseType, String token, Object body, String path, String expectResult, int statusCode) {\n RestAssured.config = RestAssured.config().sslConfig(SSLConfig.sslConfig().allowAllHostnames());\n\n Map<String, Object> header = new HashMap<>();\n header.put(\"Accept-Language\", \"en,ar\");\n if (body != null) {\n if (body instanceof Map) {\n Map<String, Object> bodyMap = (Map) body;\n if (bodyMap.containsKey(\"Accept-Language\")) {\n header.put(\"Accept-Language\", bodyMap.get(\"Accept-Language\"));\n }\n }\n }\n if (token != null) header.put(\"Authorization\", token);\n\n RequestSpecification request = given()\n .contentType(\"application/json\")\n .headers(header);\n\n if (body != null) request.body(body);\n\n request.when();\n\n// bypass statusCode - 429 ------------------------------------------------------\n Response resp = setResponse(responseType, request, path);\n\n if (resp.statusCode() == statusCode429) {\n sleep(2000);\n log(\"statusCode - \" + resp.statusCode());\n resp = setResponse(responseType, request, path);\n }\n\n String response = resp\n .then()\n .log().all()\n .statusCode(statusCode)\n .extract().response()\n .asString();\n// ---------------------------------------------------------------------------------\n\n\n// without bypass statusCode - 429 ----------------------------------------------\n// String response = setResponse(responseType, request, path)\n// .then()\n// .statusCode(statusCode)\n// .log().all()\n// .extract().response()\n// .asString();\n// ---------------------------------------------------------------------------------\n\n if (expectResult.equals(allResult)) return response;\n return from(response).getString(expectResult);\n }",
"public interface RequestResponse {\n /**\n * Checks if the request was successful and returned no error.\n * @return true if the request was successful\n */\n boolean isSuccessful();\n\n /**\n * Gets HTTP status code received by the server as a reaction to the request.\n * @return response status code\n */\n int getStatusCode();\n\n /**\n * Gets HTTP status message received by the server as a reaction to the request.\n * @return response status message\n */\n String getStatusMessage();\n\n /**\n * <p>Checks, if the request failed because of rate limitation.</p>\n * <p>If this happens, you probably used too many similar requests (like add reaction) one after another.\n * If this happens because of spamming requests, try waiting after each one with {@link Future#get()}.\n * If this happens randomly, it can be caused by different modules doing same actions. Try again.</p>\n * <p><b>Warning:</b> if you exceed the limits too often, you risk getting banned.</p>\n * @return true if the request failed due to rate limit\n */\n boolean isRateLimited();\n}",
"public int getResponseCode() throws IOException {\n/* 317 */ return this.delegate.getResponseCode();\n/* */ }",
"private synchronized void processHttpRequest\n\t\t(HttpRequest request,\n\t\t HttpResponse response)\n\t\tthrows IOException\n\t\t{\n\t\tlong now = System.currentTimeMillis();\n\n\t\t// Reject an invalid HTTP request.\n\t\tif (! request.isValid())\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_400_BAD_REQUEST);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"400 Bad Request\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all methods except GET.\n\t\telse if (! request.getMethod().equals (HttpRequest.GET_METHOD))\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_501_NOT_IMPLEMENTED);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"501 Not Implemented\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the status document.\n\t\telse if (request.getUri().equals (\"/\") ||\n\t\t\t\t\trequest.getUri().equals (\"/?\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tprintStatusHtmlBody (out, now);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Print the debug document.\n\t\telse if (request.getUri().equals (\"/debug\"))\n\t\t\t{\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintDebugHtmlStart (out, now);\n\t\t\tprintDebugHtmlBody (out);\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Reject all other URIs.\n\t\telse\n\t\t\t{\n\t\t\tresponse.setStatusCode\n\t\t\t\t(HttpResponse.Status.STATUS_404_NOT_FOUND);\n\t\t\tPrintWriter out = response.getPrintWriter();\n\t\t\tprintStatusHtmlStart (out, now);\n\t\t\tout.println (\"<P>\");\n\t\t\tout.println (\"404 Not Found\");\n\t\t\tprintStatusHtmlEnd (out);\n\t\t\t}\n\n\t\t// Send the response.\n\t\tresponse.close();\n\t\t}",
"private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }",
"String getResponseHeader();",
"public abstract Response read(Request request, Response response);",
"HttpStatusCode getStatusCode();",
"public int getRequestCode() {\n return requestCode;\n }",
"public int getResponse() {\r\n return response;\r\n }",
"RequestStatus getStatus();",
"String getResponse(String state, String message, Throwable throwable);",
"public int statusCode(){\n return code;\n }",
"public int getResponseCode()\r\n {\r\n return this.responseCode;\r\n }",
"private MockHttpServletResponse httpServletResponse(HttpMethod httpMethod, String url, String json,\n\t\t\tResultMatcher status) throws Exception {\n\t\tMockHttpServletRequestBuilder requestBuilder = null;\n\n\t\tif (HttpMethod.POST.equals(httpMethod)) {\n\t\t\trequestBuilder = post(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t} else if (HttpMethod.GET.equals(httpMethod)) {\n\t\t\trequestBuilder = get(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t} else if (HttpMethod.PUT.equals(httpMethod)) {\n\t\t\trequestBuilder = put(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t} else if (HttpMethod.DELETE.equals(httpMethod)) {\n\t\t\trequestBuilder = delete(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t}\n\n\t\tif (json != null) {\n\t\t\tObjects.requireNonNull(requestBuilder).content(json);\n\t\t}\n\n\t\treturn mockMvc.perform(Objects.requireNonNull(requestBuilder)).andDo(print()).andExpect(status).andReturn()\n\t\t\t\t.getResponse();\n\t}",
"static void invokeResponse(RoutingContext rc, Method m, Object toret, String resultType) {\n String[] _corsAllowedIPs = getCORS(m);\n \n if (_corsAllowedIPs != null && _corsAllowedIPs.length > 0) {\n CORS.allow(rc, _corsAllowedIPs);\n }\n \n // Combine errors\n if (toret == null || !(toret instanceof RestResponse)){\n\n \t// Handling function didn't return a RestResponse object, return an appropriate error message\n rc.response().setStatusCode(500).setStatusMessage(\"Error: Function didn't return a RestResponse object\").end();\n \n // We don't \"have\" to throw an exception, a 500 may suffice and client may log error and message in their logs\n// new RuntimeException(\"The return type of a REST function must be a RestResponse\");\n }else {\n \t\n \t// Put the custom headers first, if any\n \tputHeaders(((RestResponse) toret).getHeaders(), rc);\n \t\n \t// PUt the custom status code/message, if any\n \tputStatus((RestResponse) toret, rc);\n \t\n if (resultType != null) {\n\n if (resultType.equals(\"file\")) {\n \t\n // Send the file\n rc.response().sendFile(((RestResponse) toret).getBody()).end();\n } else if (resultType.equals(\"json\")) {\n\n // Set the header for json content - will override any custom header for content-type\n rc.response().putHeader(\"content-type\", \"application/json; charset=utf-8\");\n \n rc.response().end(((RestResponse) toret).getBody());\n }\n } else {\n \t\n \t// New assumption: If result type not set, we're sending back whatever the custom headers say to return\n \t// or else if no custom headers for content-type, we'll return text\n \t\n \tif (!rc.response().headers().contains(\"content-type\")) {\n \t\trc.response().putHeader(\"content-type\", \"text/plain\");\n \t}\n \t\n \tString result = ((((RestResponse) toret).getBody() != null) ? ((RestResponse) toret).getBody() : \" \");\n \t\n rc.response().end(result);\n }\n }\n }",
"public HttpResponseCode getCode() {\n return code;\n }",
"public GrizzletResponse getResponse();",
"public String getResponseMessage();",
"public boolean getResponseStatus();",
"public synchronized int getResponseCode() throws IOException {\n //avoid dup validateConnection\n if ((replyHeaders.responseCode == -1)\n || (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n validateConnection();\n }\n\n return replyHeaders.responseCode;\n }",
"private void getResponse() {\n response = new Response();\n\n getResponseCode();\n getResponseMessage();\n getResponseBody();\n\n LOG.info(\"--- RESPONSE ---\");\n LOG.info(\"Code: \" + response.getResponseCode());\n LOG.info(\"Message: \" + response.getResponseMessage());\n LOG.info(\"Body: \" + response.getResponseBody());\n LOG.info(\"*************************************\");\n }",
"public Object getResponse ()\r\n {\r\n\r\n return response_;\r\n }",
"public HTTPRequestMethod getMethod();",
"public int accept(HttpResponseProlog prolog, HttpHeaders headers);",
"boolean service(Request request, Response response) throws IOException;",
"public int getResponseCode() {\n return responseCode;\n }",
"public int getResponseCode() {\n return responseCode;\n }",
"public int getResponseCode() {\n return responseCode;\n }",
"public abstract void handle(Request request, Response response) throws Exception;",
"static void replyWith(HttpExchange t, int code, String contentType, String response)\n throws IOException {\n Headers headers = t.getResponseHeaders();\n headers.add(\"contentType\", contentType);\n t.sendResponseHeaders(code, response.length());\n OutputStream os = t.getResponseBody();\n os.write(response.getBytes());\n os.close();\n }",
"ReplayableHttpServletResponse getReplayableResponse();",
"Response createResponse();",
"ResponseHandler createResponseHandler();",
"public interface Response {\n\n\tint getResponseCode();\n\n\tvoid setResponseCode(int responseCode);\n\n\tList<Object> getHeader(Object key);\n\n\tObject putHeader(String key, Object value);\n\n\tList<Object> removeHeader(Object key);\n\n\tvoid putAllHeader(Map<? extends String, ? extends List<Object>> m);\n\n//\tObject replaceHeader(String key, Object value);\n\n\tvoid append(CharSequence s) throws IOException;\n\n\tvoid append(byte[] s) throws IOException;\n\n\tList<ByteData> getOut();\n\n\tMap<String, List<Object>> getHeaders();\n\n\tvoid sendRedirect(String url);\n\n\tString getSendRedirectUrl();\n\n\tlong getContentLength();\n\n\tvoid append(ByteData buf) throws IOException;\n\n}",
"String execute(HttpServletRequest req, HttpServletResponse res);",
"@Override\r\n\tpublic String getResponse(String request, RequestType requestType, Context context) {\n\t\treturn null;\r\n\t}",
"private void sendStatus(HttpRequest request, HttpResponse response) {\r\n\t\tresponse.setHeader(\"Content-Type\", MediaType.JSON_UTF_8.toString());\r\n\t\tresponse.setStatus(200);\r\n\t\ttry {\r\n\t\t\tObject status = buildStatus(request);\r\n\t\t\tString reply = json.toJson(status);\r\n\t\t\t\r\n\t\t\t// do we return the whole status or just a part of it ?\r\n\t\t\tString jsonPath = request.getQueryParameter(\"jsonpath\");\r\n\t\t\tif (jsonPath != null) {\r\n\t\t\t\tstatus = JsonPath.using(jsonPathConf).parse(reply).read(jsonPath);\r\n\t\t\t\treply = status instanceof String ? status.toString() : json.toJson(status);\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tresponse.setContent(reply.getBytes(UTF_8));\r\n\t\t} catch (Throwable e) {\r\n\t\t\tthrow new GridException(e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"private MockHttpServletResponse getHttpServletResponse(String url, ResultMatcher status) throws Exception {\n\t\treturn httpServletResponse(HttpMethod.GET, url, null, status);\n\t}",
"public int getResponseCode() {\n return this.responseCode;\n }",
"@Override\n public RestStatus status() {\n return response.status();\n }",
"public java.lang.CharSequence getResponseCode() {\n return ResponseCode;\n }",
"public ClientResponse getResponse() {\n return r;\n }",
"GetResponse() {\n\t}",
"public String getResponsecode() {\n return responsecode;\n }",
"public void processResponse(String requestType) throws IOException {\n\t\tint last = 0, c = 0;\n\t\t/**\n\t\t * Process the header and add it to the header StringBuffer.\n\t\t */\n\n\t\tboolean inHeader = true; // loop control\n\t\twhile (inHeader && ((c = istream.read()) != -1)) {\n\t\t\tswitch (c) {\n\t\t\tcase '\\r':\n\t\t\t\tbreak;\n\t\t\tcase '\\n':\n\t\t\t\tif (c == last) {\n\t\t\t\t\tinHeader = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlast = c;\n\t\t\t\theader.append(\"\\r\\n\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlast = c;\n\t\t\t\theader.append((char) c);\n\t\t\t}\n\t\t}\n\t\theader.append(CRLF);\n\t\tif (requestType.equals(\"GET\")) {\n\t\t\t/**\n\t\t\t * Read the contents and add it to the response StringBuffer.\n\t\t\t */\n\t\t\tString[] tokens = getHeader().split(\"\\\\s+\");\n\t\t\tstatusCode = tokens[1];\n\t\t\tint fileLength = 0;\n\t\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\t\tif (tokens[i].equals(\"Content-Length:\")) {\n\t\t\t\t\tfileLength = Integer.parseInt(tokens[i + 1]);\n\t\t\t\t\t// Get the length of file\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontent = new StringBuilder(fileLength + 1);\n\t\t\tint revBytes = 0;\n\t\t\tint len = 0;\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\twhile ((len = istream.read(buffer, 0, BUFFER_SIZE)) > 0) {\n\t\t\t\t// Get the data of the specified length from server\n\t\t\t\trevBytes += len;\n\t\t\t\tcontent.append(new String(buffer, 0, len, ENCODING));\n\t\t\t\tif (revBytes >= fileLength) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}",
"public String getResponseCode() {\n return responseCode;\n }",
"public void sendRequest() {\n\t\tURL obj;\n\t\ttry {\n\t\t\t// Instantiating HttpURLConnection object for making GET request.\n\t\t\tobj = new URL(REQUEST_URL);\n\t\t HttpURLConnection connection = (HttpURLConnection) obj.openConnection();\n\t\t connection.setRequestMethod(REQUEST_METHOD);\n\t\t connection.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t connection.setInstanceFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\tHttpURLConnection.setFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\n\t\t\t// Checking response code for successful request.\n\t\t\t// If responseCode==200, read the response,\n\t\t\t// if responseCode==3xx, i.e., a redirect, then make the request to \n\t\t\t// new redirected link, specified by 'Location' field. \n\t\t\t// NOTE: Only one level of redirection is supported for now. \n\t\t\t// Can be modified to support multiple levels of Redirections.\n\t\t\tint responseCode = connection.getResponseCode();\n\t\t\tif(responseCode == HttpURLConnection.HTTP_MOVED_PERM ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_MOVED_TEMP ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_SEE_OTHER) {\n\t\t\t\tlogger.info(\"Redirect received in responseCode\");\n\t\t\t\tString newUrl = connection.getHeaderField(\"Location\");\n\t\t\t\tconnection = (HttpURLConnection) new URL(newUrl).openConnection();\n\t\t\t}\n\t\t\tresponseCode = connection.getResponseCode();\n\t\t\t\n\t\t\t// process response message if responseCode==200 i.e., success.\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tconnection.getInputStream()));\n\t\t\t\tString inputLine;\n\t\t\t\tStringBuffer response = new StringBuffer();\n\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\t\tresponse.append(inputLine);\n\t\t\t\t}\n\t\t\t\tin.close();\n\t\t\t\t//Uncomment following line to log response data.\n\t\t\t\t//logger.info(response.toString());\n\t\t\t} else {\n\t\t\t\tlogger.warning(\"Http GET request was unsuccessful!\");\n\t\t\t}\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.severe(\"MalformedURLException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tlogger.severe(\"IOException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public HttpServletResponse getResponse() {\r\n\t\treturn response_;\r\n\t}",
"public interface CodeHandler {\n void onCode(int statusCode, Response response);\n}",
"@Override\n\tpublic Response getResponse(String url, Map<String, String> params) {\n\t\tString code = params.get(\"NanoHttpd.QUERY_STRING\");\n\t\t\n\t\tArray<MessageData> messages = new Array<MessageData>();\n\t\tif (!provider.compile(code, messages)) {\n\t\t\tHTMLBuilder builder = new HTMLBuilder();\n\t\t\tfor (MessageData m : messages) {\n\t\t\t\tbuilder.div(\"alert alert-danger alert-dismissable\").add(m.message).pop();\n\t\t\t}\n\t\t\treturn new Response(builder.toString());\n\t\t} else {\n\t\t\tHTMLBuilder builder = new HTMLBuilder();\n\t\t\tbuilder.div(\"alert alert-success\").add(\"Execution succeeded\").pop();\n\t\t\treturn new Response(builder.toString());\n\t\t}\n\t}",
"public HttpServletResponse getHttpResponse() {\n return httpResponse;\n }",
"public static HttpResponse getResponse(URL url, HttpRequestMethod requestMethod) throws IOException {\n HttpClient httpClient = new DefaultHttpClient();\n HttpRequestBase httpRequest;\n switch (requestMethod) {\n case HEAD:\n httpRequest = new HttpHead(url.toString());\n break;\n case OPTIONS:\n httpRequest = new HttpOptions(url.toString());\n break;\n case DELETE:\n httpRequest = new HttpDelete(url.toString());\n break;\n case TRACE:\n httpRequest = new HttpTrace(url.toString());\n break;\n case POST:\n httpRequest = new HttpPost(url.toString());\n break;\n case PUT:\n httpRequest = new HttpPut(url.toString());\n break;\n case PATCH:\n httpRequest = new HttpPatch(url.toString());\n break;\n case GET:\n httpRequest = new HttpGet(url.toString());\n break;\n default:\n throw new RuntimeException(\"Unknown request method: \" + requestMethod);\n }\n return httpClient.execute(httpRequest);\n }",
"private int getSuccessCode(String method) {\n if (\"POST\".equals(method)) {\n return 201;\n } else {\n return 200;\n }\n }",
"public ResponseTranslator get() {\n setMethod(\"GET\");\n return doRequest();\n }",
"private String callHandlerResponse(String tail, String requestMethod) throws IOException {\n String baseEndpoint = \"https://kax95zucj1.execute-api.us-west-2.amazonaws.com/dev/deckocards\";\n URL url = new URL(baseEndpoint + tail);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(requestMethod);\n con.setRequestProperty(\"Content-Type\", \"application/json\");\n con.setConnectTimeout(5000);\n con.setReadTimeout(7000);\n int status = con.getResponseCode();\n InputStreamReader reader;\n if (status > 299) {\n reader = new InputStreamReader(con.getErrorStream());\n } else {\n reader = new InputStreamReader(con.getInputStream());\n }\n BufferedReader in = new BufferedReader(reader);\n String inputLine;\n StringBuilder content = new StringBuilder();\n while ((inputLine = in.readLine()) != null) {\n content.append(inputLine);\n }\n in.close();\n con.disconnect();\n return content.toString();\n }",
"public AuthorizationResponseCode getResponseCode()\n {\n return responseCode;\n }",
"private static Response process(Object result) {\n if (result == null) return Response.serverError().build();\n if (result instanceof Response.Status) return Response.status((Response.Status) result).build();\n return Response.ok(result).build();\n }",
"private String sendRequest(String responseType, String path, String expectResult, int statusCode) {\n return sendRequest(responseType, null, null, path, expectResult, statusCode);\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n ResponseResult result = null;\n\n try {\n P2PBridgeWebServiceStub stub = new P2PBridgeWebServiceStub();\n GetStatus stat = new GetStatus();\n stat.setIpAddress(request.getParameter(\"ip_address\"));\n stat.setMake(request.getParameter(\"device\"));\n stat.setModel(request.getParameter(\"model\"));\n stat.setUserName(request.getParameter(\"username\"));\n stat.setPassword(request.getParameter(\"password\"));\n\n GetStatusResponse res = stub.getStatus(stat);\n result = res.get_return();\n\n System.out.println(result.getResult());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Utils.generateResponse(result, response);\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 public void handle(final ClassicHttpRequest request,\n final ClassicHttpResponse response,\n final HttpContext context)\n throws HttpException, IOException {\n\n final String method = request.getMethod();\n if (!\"GET\".equalsIgnoreCase(method) &&\n !\"HEAD\".equalsIgnoreCase(method) &&\n !\"POST\".equalsIgnoreCase(method) &&\n !\"PUT\".equalsIgnoreCase(method)) {\n throw new MethodNotSupportedException(method + \" not supported by \" + getClass().getName());\n }\n final URI uri;\n try {\n uri = request.getUri();\n } catch (final URISyntaxException ex) {\n throw new ProtocolException(ex.getMessage(), ex);\n }\n final String path = uri.getPath();\n final int slash = path.lastIndexOf('/');\n if (slash != -1) {\n final String payload = path.substring(slash + 1);\n final long n;\n if (!payload.isEmpty()) {\n try {\n n = Long.parseLong(payload);\n } catch (final NumberFormatException ex) {\n throw new ProtocolException(\"Invalid request path: \" + path);\n }\n } else {\n // random length, but make sure at least something is sent\n n = 1 + (int)(Math.random() * 79.0);\n }\n response.setCode(HttpStatus.SC_OK);\n response.setEntity(new RandomEntity(n));\n } else {\n throw new ProtocolException(\"Invalid request path: \" + path);\n }\n }",
"public HTTPResponse getHttpResponse(InputStream httpRequest) {\n\t\t\n\t\tHTTPRequest req = new HTTPRequest(httpRequest);\n\t\tIResponse response;\n\t\t//Seleccionamos virtualhost\n\t\tVirtualHost v = server.getVHosts().get(req.getHeaderValue(\"Host\"));\n\t\tif(v == null) {\n\t\t\tv = server.getVHosts().entrySet().iterator().next().getValue();\n\t\t}\n\t\t\n\t\tswitch (req.getHTTPMethod()) {\n\t\tcase \"GET\":\n\t\t\tresponse = new ResponseGET(v,req);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"HEAD\":\n\t\t\tresponse = new ResponseHEAD(v,req);\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tresponse = new ResponseMethodNotAllowed();\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\treturn response.getHttpResponse();\n\t}",
"protected abstract ClassicHttpResponse execute(ClassicHttpRequest request, HttpClientContext context) throws IOException;",
"public static int executeHttpRequest(HttpRequest request) {\n try {\n HttpResponse<String> response = client.send(request, HttpResponse.BodyHandler.asString());\n System.out.println(\"Status code: \" + response.statusCode());\n System.out.println(response.body());\n return response.statusCode();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n return -1;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse()\r\n {\r\n return this.response;\r\n }",
"private void sendResponse(String sHTTPMethod, String sHTTPRequest, int iStatusCode, String sResponse, boolean bPersistentConnection) {\n // determine if sending file and if redirect -> determines response\n boolean bIsFileSend = sHTTPMethod.equalsIgnoreCase(\"GET\") && iStatusCode == 200;\n boolean bIsRedirect = iStatusCode == 301;\n\n // write header\n String sStatus = getStatusLine(iStatusCode) + END_LINE;\n String sLocation = (bIsRedirect) ? (\"Location: \" + sResponse) + END_LINE : (\"\"); // only if redirect\n String sServerDetails = getServerDetails() + END_LINE;\n String sContentLength = \"Content-Length: \" + sResponse.length() + END_LINE;\n String sContentType = getContentType(sHTTPRequest) + END_LINE;\n String sConnection = getConnectionLine(bPersistentConnection) + END_LINE;\n String sSpaceBetweenHeaderAndBody = END_LINE;\n FileInputStream fin = null;\n\n // update content length if sending a file -> create file input stream\n if (bIsFileSend) {\n try {\n fin = new FileInputStream(ROOT_FOLDER.toString() + \"/\" + sResponse); // if file request, then sResponse is the file path\n sContentLength = \"Content-Length: \" + Integer.toString(fin.available()) + END_LINE;\n } catch (IOException e) {\n System.out.println(\"There was an error creating the file input stream for the response:\");\n System.out.println(\" \" + e);\n }\n }\n\n try {\n // send HTTP Header\n outToClient.writeBytes(sStatus);\n if (bIsRedirect) {\n outToClient.writeBytes(sLocation); // only send Location on redirect\n }\n outToClient.writeBytes(sServerDetails);\n outToClient.writeBytes(sContentType);\n outToClient.writeBytes(sContentLength);\n outToClient.writeBytes(sConnection);\n outToClient.writeBytes(sSpaceBetweenHeaderAndBody);\n\n // send HTTP Body\n if (bIsFileSend) {\n sendFile(fin, outToClient); // send file\n } else if (!bIsRedirect && !sHTTPMethod.equalsIgnoreCase(\"HEAD\")) {\n outToClient.writeBytes(sResponse); // send HTML msg back\n }\n\n // print HTTP Header and Body to console\n System.out.println(sStatus);\n System.out.println(sServerDetails);\n System.out.println(sContentType);\n System.out.println(sContentLength);\n System.out.println(sConnection);\n if (bIsRedirect) {\n System.out.println(sLocation);\n }\n if (bIsFileSend) {\n System.out.println(\"File sent: \" + sResponse);\n } else {\n System.out.println(\"Response: \" + sResponse);\n }\n System.out.println();\n\n // close connection\n if (!bPersistentConnection) {\n outToClient.close();\n }\n\n } catch (IOException e) {\n System.out.println(\"writeBytes did not complete:\");\n System.out.println(\" \" + e + \"\\n\");\n }\n }",
"private String sendRequest(String responseType, String token, String path, String expectResult, int statusCode) {\n return sendRequest(responseType, token, null, path, expectResult, statusCode);\n }",
"public int getResponseStatus() {\n return responseStatus;\n }",
"public java.lang.CharSequence getResponseCode() {\n return ResponseCode;\n }",
"interface Response {\n void send(HttpServletRequest request, HttpServletResponse response, TreeLogger logger)\n throws IOException;\n}",
"String getAnswerResponse();",
"public void get(HttpRequest request, HttpResponse response) {\n\t\tresponse.setStatus(HttpStatus.SERVER_ERROR_NOT_IMPLEMENTED);\n\t\tresponse.write(\" \");\n\t}",
"public String requestAction2(){\n return \"Response Two\";\n }",
"@Nonnull\n @Nonempty\n public static String getHttpResponseMessage (final int nResponseCode)\n {\n final String sMsg;\n switch (nResponseCode)\n {\n // 1XX\n case HTTP_CONTINUE:\n sMsg = \"Continue\";\n break;\n case HTTP_SWITCHING_PROTOCOLS:\n sMsg = \"Switching Protocols\";\n break;\n case HTTP_EARLY_HINTS:\n sMsg = \"Early Hints\";\n break;\n // 2XX\n case HTTP_OK:\n sMsg = \"OK\";\n break;\n case HTTP_CREATED:\n sMsg = \"Created\";\n break;\n case HTTP_ACCEPTED:\n sMsg = \"Accepted\";\n break;\n case HTTP_NON_AUTHORITATIVE_INFORMATION:\n sMsg = \"Non-Authoritative Information\";\n break;\n case HTTP_NO_CONTENT:\n sMsg = \"No Content\";\n break;\n case HTTP_RESET_CONTENT:\n sMsg = \"Reset Content\";\n break;\n case HTTP_PARTIAL_CONTENT:\n sMsg = \"Partial Content\";\n break;\n // 3XX\n case HTTP_MULTIPLE_CHOICES:\n sMsg = \"Multiple Choices\";\n break;\n case HTTP_MOVED_PERMANENTLY:\n sMsg = \"Moved Permanently\";\n break;\n case HTTP_MOVED_TEMPORARY:\n sMsg = \"Moved Temporary\";\n break;\n case HTTP_SEE_OTHER:\n sMsg = \"See Other\";\n break;\n case HTTP_NOT_MODIFIED:\n sMsg = \"Not Modified\";\n break;\n case HTTP_USE_PROXY:\n sMsg = \"Use Proxy\";\n break;\n case HTTP_SWITCH_PROXY:\n sMsg = \"Switch Proxy\";\n break;\n case HTTP_TEMPORARY_REDIRECT:\n sMsg = \"Temporary Redirect\";\n break;\n case HTTP_PERMANENT_REDIRECT:\n sMsg = \"Permanent Redirect\";\n break;\n // 4xx\n case HTTP_BAD_REQUEST:\n sMsg = \"Bad Request\";\n break;\n case HTTP_UNAUTHORIZED:\n sMsg = \"Unauthorized\";\n break;\n case HTTP_PAYMENT_REQUIRED:\n sMsg = \"Payment Required\";\n break;\n case HTTP_FORBIDDEN:\n sMsg = \"Forbidden\";\n break;\n case HTTP_NOT_FOUND:\n sMsg = \"Not Found\";\n break;\n case HTTP_METHOD_NOT_ALLOWED:\n sMsg = \"Method Not Allowed\";\n break;\n case HTTP_NOT_ACCEPTABLE:\n sMsg = \"Not Acceptable\";\n break;\n case HTTP_PROXY_AUTH_REQUIRED:\n sMsg = \"Proxy Authentication Required\";\n break;\n case HTTP_REQUEST_TIMEOUT:\n sMsg = \"Request Time-out\";\n break;\n case HTTP_CONFLICT:\n sMsg = \"Conflict\";\n break;\n case HTTP_GONE:\n sMsg = \"Gone\";\n break;\n case HTTP_LENGTH_REQUIRED:\n sMsg = \"Length Required\";\n break;\n case HTTP_PRECONDITION_FAILED:\n sMsg = \"Precondition Failed\";\n break;\n case HTTP_ENTITY_TOO_LARGE:\n sMsg = \"Request Entity Too Large\";\n break;\n case HTTP_REQUEST_URI_TOO_LONG:\n sMsg = \"Request-URI Too Large\";\n break;\n case HTTP_UNSUPPORTED_MEDIA_TYPE:\n sMsg = \"Unsupported Media Type\";\n break;\n case HTTP_REQUESTED_RANGE_NOT_SATISFIABLE:\n sMsg = \"Requested Range not satisfiable\";\n break;\n case HTTP_EXPECTATION_FAILED:\n sMsg = \"Expectation Failed\";\n break;\n case HTTP_IM_A_TEAPOT:\n sMsg = \"I'm a teapot\";\n break;\n case HTTP_UNPROCESSABLE_ENTITY:\n sMsg = \"Unprocessable Entity\";\n break;\n case HTTP_UPGRADE_REQUIRED:\n sMsg = \"Upgrade Required\";\n break;\n case HTTP_PRECONDITION_REQUIRED:\n sMsg = \"Precondition Required\";\n break;\n case HTTP_TOO_MANY_REQUESTS:\n sMsg = \"Too Many Requests\";\n break;\n case HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE:\n sMsg = \"Request Header Fields Too Large\";\n break;\n case HTTP_UNAVAILABLE_FOR_LEGAL_REASONS:\n sMsg = \"Unavailable For Legal Reasons\";\n break;\n // 5xx\n case HTTP_INTERNAL_SERVER_ERROR:\n sMsg = \"Internal Server Error\";\n break;\n case HTTP_NOT_IMPLEMENTED:\n sMsg = \"Not Implemented\";\n break;\n case HTTP_BAD_GATEWAY:\n sMsg = \"Bad Gateway\";\n break;\n case HTTP_SERVICE_UNAVAILABLE:\n sMsg = \"Service Unavailable\";\n break;\n case HTTP_GATEWAY_TIMEOUT:\n sMsg = \"Gateway Time-out\";\n break;\n case HTTP_VERSION_NOT_SUPPORTED:\n sMsg = \"HTTP Version not supported\";\n break;\n case HTTP_VARIANT_ALSO_NEGOTIATES:\n sMsg = \"Variant Also Negotiates\";\n break;\n case HTTP_INSUFFICIENT_STORAGE:\n sMsg = \"Insufficient Storage\";\n break;\n case HTTP_LOOP_DETECTED:\n sMsg = \"Loop Detected\";\n break;\n case HTTP_NETWORK_AUTHENTICATION_REQUIRED:\n sMsg = \"Network Authentication Required\";\n break;\n default:\n sMsg = \"Unknown (\" + nResponseCode + \")\";\n break;\n }\n return sMsg;\n }",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"public String produceResponse() {\n processData();\n return response;\n }"
] | [
"0.7020867",
"0.68637896",
"0.6836475",
"0.6781197",
"0.6726867",
"0.65801936",
"0.6563718",
"0.6532034",
"0.6532034",
"0.6526765",
"0.6502836",
"0.64847034",
"0.64675325",
"0.64541924",
"0.64538807",
"0.6350708",
"0.6340801",
"0.6305348",
"0.62977326",
"0.62746066",
"0.62604016",
"0.6197131",
"0.61905515",
"0.6188491",
"0.6166781",
"0.6118665",
"0.6099245",
"0.6097984",
"0.60876894",
"0.60712296",
"0.606562",
"0.6065525",
"0.6042734",
"0.60400325",
"0.6027606",
"0.599755",
"0.59952307",
"0.59926623",
"0.5990452",
"0.5977343",
"0.59552854",
"0.59552574",
"0.5950762",
"0.5950762",
"0.5950762",
"0.59492505",
"0.5933325",
"0.5930057",
"0.5926276",
"0.5920373",
"0.59185874",
"0.5910536",
"0.5909909",
"0.58843684",
"0.58723843",
"0.58723843",
"0.58714366",
"0.5870534",
"0.5861052",
"0.585711",
"0.58553094",
"0.58545923",
"0.58447564",
"0.58412194",
"0.583356",
"0.58304197",
"0.58276916",
"0.58263004",
"0.58208656",
"0.5807467",
"0.5789458",
"0.57866776",
"0.5784459",
"0.57764536",
"0.5771129",
"0.5770367",
"0.57691056",
"0.5764",
"0.57628554",
"0.5762538",
"0.57583123",
"0.5754966",
"0.5754154",
"0.5753655",
"0.5753655",
"0.5753655",
"0.5753655",
"0.5753655",
"0.57501614",
"0.57499844",
"0.57494396",
"0.57456154",
"0.57392925",
"0.57361025",
"0.57355046",
"0.57269704",
"0.5726027",
"0.571744",
"0.5717006",
"0.57080066"
] | 0.6275796 | 19 |
get the status line to return based on status code | private String getStatusLine(int iStatusCode) {
String sStatus = "HTTP/1.1 ";
if (iStatusCode == 200) {
sStatus += iStatusCode + " OK";
} else if (iStatusCode == 301) {
sStatus += iStatusCode + " Moved Permanently";
} else if (iStatusCode == 403) {
sStatus += iStatusCode + " Forbidden";
} else if (iStatusCode == 404) {
sStatus += iStatusCode + " Not Found";
} else if (iStatusCode == 415) {
sStatus += iStatusCode + " Unsupported Media Type";
} else if(iStatusCode == 500) {
sStatus += iStatusCode + " Internal Server Error";
}
return sStatus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"StatusLine getStatusLine();",
"public String getStatusLine() {\n\n StringBuilder builder = new StringBuilder(SL_11_START.length() + 4 + message.length());\n builder.append(SL_11_START).append(code).append(' ').append(message);\n return builder.toString();\n }",
"public int getStatusCode()\n {\n return Integer.parseInt(startLine.split(\" \")[1]);\n }",
"public int getStatusCode() {\n return statusLine.getStatusCode();\n }",
"public String getStatusLine() {\r\n\t\t\r\n\t\treturn statusLine;\r\n\t\r\n\t}",
"int getStatusCode( );",
"public StatusLine getStatusLine() {\n return statusLine;\n }",
"int getStatusCode();",
"int getStatusCode();",
"abstract Integer getStatusCode();",
"public StatusCode GetStatus();",
"HttpStatusCode getStatusCode();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"public int statusCode(){\n return code;\n }",
"protected String getStatusMessage(int code) {\n\t\tStatus status = null;\n\n\t\ttry {\n\t\t\tstatus = Status.values()[code];\n\t\t} catch (Exception ex) {\n\t\t\tstatus = Status.ERROR;\n\t\t}\n\n\t\treturn status.toString();\n\t}",
"public String getStatusText() {\n return statusLine.getReasonPhrase();\n }",
"public int status() {\n\t\treturn code;\n\t}",
"public int getStatusCode() {\n return code;\n }",
"int getReturnCode();",
"int getReturnCode();",
"public StatusLine parseStatusLine(CharArrayBuffer buffer, ParserCursor cursor) throws ParseException {\n/* 359 */ Args.notNull(buffer, \"Char array buffer\");\n/* 360 */ Args.notNull(cursor, \"Parser cursor\");\n/* 361 */ int indexFrom = cursor.getPos();\n/* 362 */ int indexTo = cursor.getUpperBound();\n/* */ try {\n/* */ int statusCode;\n/* */ String reasonPhrase;\n/* 366 */ ProtocolVersion ver = parseProtocolVersion(buffer, cursor);\n/* */ \n/* */ \n/* 369 */ skipWhitespace(buffer, cursor);\n/* 370 */ int i = cursor.getPos();\n/* */ \n/* 372 */ int blank = buffer.indexOf(32, i, indexTo);\n/* 373 */ if (blank < 0) {\n/* 374 */ blank = indexTo;\n/* */ }\n/* */ \n/* 377 */ String s = buffer.substringTrimmed(i, blank);\n/* 378 */ for (int j = 0; j < s.length(); j++) {\n/* 379 */ if (!Character.isDigit(s.charAt(j))) {\n/* 380 */ throw new ParseException(\"Status line contains invalid status code: \" + buffer.substring(indexFrom, indexTo));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ try {\n/* 386 */ statusCode = Integer.parseInt(s);\n/* 387 */ } catch (NumberFormatException e) {\n/* 388 */ throw new ParseException(\"Status line contains invalid status code: \" + buffer.substring(indexFrom, indexTo));\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 393 */ i = blank;\n/* */ \n/* 395 */ if (i < indexTo) {\n/* 396 */ reasonPhrase = buffer.substringTrimmed(i, indexTo);\n/* */ } else {\n/* 398 */ reasonPhrase = \"\";\n/* */ } \n/* 400 */ return createStatusLine(ver, statusCode, reasonPhrase);\n/* */ }\n/* 402 */ catch (IndexOutOfBoundsException e) {\n/* 403 */ throw new ParseException(\"Invalid status line: \" + buffer.substring(indexFrom, indexTo));\n/* */ } \n/* */ }",
"String getStatusMessage( );",
"String getStatusMessage();",
"long getInnerStatusCode();",
"public abstract int statusCode();",
"public abstract int getHttpStatusErrorCode();",
"public int getStatusOrdinal() { return status.ordinal(); }",
"public StrColumn getStatusCode() {\n return delegate.getColumn(\"status_code\", DelegatingStrColumn::new);\n }",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"java.lang.String getPatStatusCode();",
"java.lang.String getPatStatusCode();",
"public String getStatus() {\n\t\tString result = getName() + \"\\n-----------------------------\\n\\n\";\n\t\tfor(int i = 0; i < lines.size(); i++) {\n\t\t\tresult = result + lines.get(i).getStatus() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public String getStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\treturn background.getStatus();\n\t}",
"public static Integer getStatusCode() {\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n return res.then().extract().statusCode();\n //return SerenityRest.then().extract().statusCode();\n }",
"public int getStatus();",
"public int getStatus();",
"public int getStatus();",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatusCode() {\n return statusCode;\n }",
"public int getStatus(int mCode)\r\n\t {\r\n\t\t return MRs[mCode].getStatus();\r\n\t }",
"public int getStatusCode() {\r\n\t\treturn mStatus;\r\n\t}",
"private void setStatusCode(String statusLine) {\n \n \t\tString[] each = statusLine.split( \" \" );\n \t\tresponseHTTPVersion = each[0];\n \t\tstatusCode = each[1];\n\t\treasonPhrase = each[2];\n \t}",
"public StatusCode getStatusCode() {\n return statusCode;\n }",
"public StatusLine getLastStatus() {\r\n return lastStatusLine;\r\n }",
"protected StatusLine createStatusLine(ProtocolVersion ver, int status, String reason) {\n/* 422 */ return new BasicStatusLine(ver, status, reason);\n/* */ }",
"private ResponseStatus(int code) {\n this.code = code;\n this.formatted = format(code, \"???\");\n this.symbolicName = String.format(\"0x%04x\", code);\n }",
"public Integer getStatusCode() {\n return statusCode;\n }",
"Integer getStatus();",
"public static String getStatusValue (int statusCode) {\r\n\t\tif (statusCode == OK ) {\r\n\t\t\treturn STATUS_OK;\r\n\t\t} else if (statusCode == ZERO_RESULTS) {\r\n\t\t\treturn STATUS_ZERO_RESULTS;\r\n\t\t} else if (statusCode == OVER_QUERY_LIMIT) {\r\n\t\t\treturn STATUS_OVER_QUERY_LIMIT;\r\n\t\t} else if (statusCode == REQUEST_DENIED) {\r\n\t\t\treturn STATUS_REQUEST_DENIED;\r\n\t\t} else if (statusCode == INVALID_REQUEST) {\r\n\t\t\treturn STATUS_INVALID_REQUEST;\r\n\t\t} else if (statusCode == UNKNOWN_ERROR) {\r\n\t\t\treturn STATUS_UNKNOWN_ERROR;\r\n\t\t} else if (statusCode == NOT_FOUND) {\r\n\t\t\treturn STATUS_NOT_FOUND;\r\n\t\t} else if (statusCode == ERROR) {\r\n\t\t\treturn STATUS_ERROR;\r\n\t\t}\r\n\t\treturn STATUS_ERROR;\r\n\t}",
"public static int getStatusCode() {\r\n\r\n\r\n\r\n\t\tCloseableHttpResponse response= postSoapRequest(\"getDealList_Request\",baseURI);\r\n\r\n\r\n\r\n\t\tint statuseCode=response.getStatusLine().getStatusCode();\r\n\r\n\t\tSystem.out.println(\"statuseCode= \"+statuseCode);\r\n\r\n\t\t//Assert.assertEquals(200,statuseCode);\r\n\r\n\t\treturn statuseCode;\r\n\r\n\t}",
"public java.lang.CharSequence getStatus() {\n return status;\n }",
"public int getStatus()\n {\n return status;\n }",
"int getErrcode();",
"public String getStatusCode() {\r\n\t\treturn statusCode;\r\n\t}",
"@Override\n\tpublic int getStatus();",
"@Override\n\tpublic int getStatus();",
"public StatusCode getStatusCode() {\r\n\t\treturn statusCode;\r\n\t}",
"String status();",
"String status();",
"public int getHttpStatusCode() {\n return httpStatusCode;\n }",
"public final Status getStatus() {\n/* 199 */ return this.status;\n/* */ }",
"public int getStatus ()\n {\n return status;\n }",
"public int getStatus ()\n {\n return status;\n }",
"public int getStatusCode() {\n\t\treturn getStatusCode(iReason);\n\t}",
"public int get_http_status_code () {\n\t\treturn http_status_code;\n\t}",
"public java.lang.CharSequence getStatus() {\n return status;\n }",
"public String getStatusCode() {\n\t\treturn statusCode;\n\t}",
"public String getStatusCode() {\n\t\treturn statusCode;\n\t}",
"public int getHttpStatusCode() {\n return httpStatusCode;\n }",
"public static HttpStatus valueOfStatusLine(String statusLine) {\n\n if (!statusLine.startsWith(SL_11_START)) {\n throw new IllegalArgumentException(statusLine);\n }\n int code =\n Integer.parseInt(statusLine.substring(SL_11_START.length(), SL_11_START.length() + 3));\n return valuesByInt.get(code);\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatus() {\n return status_;\n }",
"public int getStatusCode() {\n\t\treturn response.getStatusLine().getStatusCode();\n\t}"
] | [
"0.81150985",
"0.7552662",
"0.7415008",
"0.7310059",
"0.7243096",
"0.702844",
"0.7024562",
"0.6921105",
"0.6921105",
"0.6871629",
"0.67230093",
"0.6665587",
"0.6629091",
"0.6629091",
"0.6629091",
"0.6629091",
"0.66212684",
"0.66131794",
"0.6519089",
"0.6510767",
"0.64916015",
"0.6461249",
"0.6461249",
"0.64583105",
"0.64493513",
"0.63339967",
"0.6329785",
"0.6320561",
"0.631647",
"0.62999225",
"0.62946105",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6285697",
"0.6270345",
"0.6270345",
"0.6270345",
"0.6270345",
"0.6270345",
"0.62674946",
"0.62674946",
"0.6240974",
"0.62342703",
"0.6225916",
"0.6218758",
"0.6218758",
"0.6218758",
"0.61822015",
"0.61822015",
"0.61822015",
"0.61822015",
"0.616513",
"0.6161746",
"0.6149455",
"0.6145134",
"0.6140064",
"0.61253136",
"0.6125231",
"0.6089399",
"0.6087038",
"0.60693055",
"0.60530025",
"0.60477865",
"0.6046635",
"0.6041906",
"0.6038186",
"0.6035844",
"0.6035844",
"0.60342973",
"0.6031078",
"0.6031078",
"0.60309654",
"0.6024952",
"0.6024733",
"0.6024733",
"0.6017466",
"0.60126275",
"0.60048413",
"0.5999997",
"0.5999997",
"0.59958875",
"0.59893876",
"0.5978174",
"0.5978174",
"0.5978174",
"0.5978174",
"0.5978174",
"0.5978174",
"0.5978174",
"0.5978174",
"0.5978174",
"0.59721667"
] | 0.724805 | 4 |
get the connection line | private String getConnectionLine(boolean bPersistentConnection) {
String sConnection = "Connection: ";
String sConnectionStatus = (bPersistentConnection ? "keep-alive" : "close");
return sConnection + sConnectionStatus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLine() {\n return this.line;\n }",
"public String getLine() {\n\t\treturn line.toString();\n\t}",
"public String getline() {\n\t\treturn _line;\n\t}",
"public String getLine ()\n {\n return line;\n }",
"public int getLine() {\n return line;\n }",
"public String getCmndLine()\n {\n return cmndLine;\n }",
"public int getLine() {\r\n return line;\r\n }",
"public int getLine() {\n return line;\n }",
"public int getLine() {\n\t\treturn line;\n\t}",
"public int getLine() {\r\n\t\treturn line;\r\n\t}",
"public Line getLine()\n {\n return line;\n }",
"public int getLine() { return cl; }",
"public static int getLine() {\r\n\t\treturn rline;\r\n\t}",
"public String getLine() {\n \treturn this.lineColor;\n }",
"public int getLine() {return _line;}",
"String getCurrentLine();",
"@Override\n public Line getLine() {\n return line;\n }",
"public final int getLine() {\n/* 377 */ return this.bufline[this.bufpos];\n/* */ }",
"public int line() {\r\n return line;\r\n }",
"public MInOutLine getLine()\n\t{\n\t\tif (m_line == null)\n\t\t\tm_line = new MInOutLine (getCtx(), getM_InOutLine_ID(), get_TrxName());\n\t\treturn m_line;\n\t}",
"public String getLine() {\r\n\t\treturn currentString;\r\n\t}",
"public String getLine()\n\t{\n\t\ttry\n\t\t{\n\t\t\tline = reader.readLine();\n\t\t} catch (IOException ioe)\n\t\t{\n\t\t\t//\n\t\t}\n\n\t\treturn line;\n\t}",
"public int getLine() {\n return lineNum;\n }",
"public String getLine() {\r\n\t\treturn content;\r\n\t}",
"public Line getLine ()\r\n {\r\n if (line == null) {\r\n computeLine();\r\n }\r\n\r\n return line;\r\n }",
"public String getBeamline()\n\t{\n\t\tif (dcsConnector == null)\n\t\t\treturn \"\";\n\n\t\treturn dcsConnector.getBeamline();\n\t}",
"public CommandLine getLine() {\n return line;\n }",
"public String getSourceLine (int line);",
"public String getLine();",
"private String getRequestLine(HttpConnection conn) {\n return HttpMethodBase.generateRequestLine(conn, getName(),\n getPath(), getQueryString(), getHttpVersion());\n }",
"public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}",
"public int getLineNr() {\n return this.lineNr;\n }",
"@Pure\n\tST getArrivalConnection();",
"public String getCellLine()\n {\n return this.cellLine;\n }",
"public String getLineId() {\n return lineId;\n }",
"public int getSelectedLine() {\n\t\treturn selectedLine;\n\t}",
"public String readLine() {\n if(in.hasNextLine()) {\n return in.nextLine();\n } else {\n // remote host closed connection!\n cleanup();\n return null;\n }\n }",
"public int getStartLine() {\r\n \r\n return startLine;\r\n }",
"public java.lang.String getLine2() {\r\n return line2;\r\n }",
"public String getLine2() {\n return line2;\n }",
"public Color getLineColor()\n {\n return lineacolore;\n }",
"public String getAddressLine() {\n\t\treturn this.addressLine;\n\t}",
"public String getLine2() {\n return line2;\n }",
"public StatusLine getStatusLine() {\n return statusLine;\n }",
"public static Connect getConnect() {\n\t\treturn connection;\n\t}",
"public String getStatusLine() {\r\n\t\t\r\n\t\treturn statusLine;\r\n\t\r\n\t}",
"public int getCurrentLine() {\n return buffer.lineNumber();\n }",
"public String getHeaderLine() {\r\n\t\tif(header == null)return \"\";\r\n\t\treturn header;\r\n\t}",
"ResponseItem getConnectTo();",
"public String getLineName() {\n return lineName;\n }",
"public String getLineColor()\n {\n return lineColor;\n }",
"public int getLineNo()\n\t{\n\t\treturn getIntColumn(OFF_LINE_NO, LEN_LINE_NO);\n\t}",
"public String toLine() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(profileName);\r\n\t\tsb.append(';');\r\n\t\tsb.append(hostname);\r\n\t\tsb.append(';');\r\n\t\tsb.append(port);\r\n\t\treturn sb.toString();\r\n\t}",
"public String getXpeContractLine() {\n return (String) getAttributeInternal(XPECONTRACTLINE);\n }",
"public Paint getTransportLineColor()\r\n {\r\n return line_color;\r\n }",
"public int getLinePosition() {\n return linePosition;\n }",
"public int getLinePos() {\n return linePos;\n }",
"public int getStartLine() {\r\n return this.startLine;\r\n }",
"public int getLine()\n/* */ {\n/* 1312 */ return this.line;\n/* */ }",
"public Color getLineColor() {\n return lineColor;\n }",
"char getBusLine()\n\t{\n\t\treturn this.BUSline;\n\t\t\n\t}",
"public String getLine1() {\n return line1;\n }",
"public int getLine();",
"public int getLine();",
"public int getLine();",
"public int getLineNumber() {\n return line;\n }",
"Node<UnderlyingData> getCurrentLineNode();",
"public String getLine1() {\n return line1;\n }",
"public Number getLineId() {\n return (Number) getAttributeInternal(LINEID);\n }",
"public String getCurrentInputString() { return line; }",
"public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }",
"public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }",
"public String getConnection()\n {\n return this.connection;\n }",
"public int getLineNumber() {\n return line;\n }",
"LineReferenceType getLineReference();",
"public KochLine getLineC(){\n\t\tKochLine lineC= new KochLine(p3,p4);\n\t\treturn lineC;\n\t\t\n\t}",
"public int getLineToStart() {\r\n\t\treturn this.lineToStart;\r\n\t}",
"public java.lang.String getLine1() {\r\n return line1;\r\n }",
"public int getLineNum() {\n\t\treturn lineNum;\n\t}",
"public int getLineNo();",
"private int getSelectedLine(HttpServletRequest request) {\n int selectedLine = -1;\n String parameterName = (String) request.getAttribute(KRADConstants.METHOD_TO_CALL_ATTRIBUTE);\n if (StringUtils.isNotBlank(parameterName)) {\n String lineNumber = StringUtils.substringBetween(parameterName, \".line\", \".\");\n selectedLine = Integer.parseInt(lineNumber);\n }\n\n return selectedLine;\n }",
"public char getBusLine() {\n\t\t\treturn busLine;\n\t\t}",
"public String findMyConnection(BufferedReader lines) throws IOException{\n\t\tList<List<String>> cnCentral = new ArrayList<>();\n\t\tList<String> cnTypes = new ArrayList<>();\n\t\tcnTypes.add(\"Ethernet\");\n\t\tcnTypes.add(\"Wireless\");\n\t\tString connectionname = \"\";\n\t\tString s = null;\n\t\tList<String> cnInfo = new ArrayList<>();\n\t\twhile ((s = lines.readLine()) != null) {\n\t\t\tif(cnTypes.contains(s.split(\" \")[0])) {\n\t\t\t\tcnCentral.add(cnInfo);\n\t\t\t\tcnInfo= new ArrayList<>();\n\t\t\t}\n\t\t\tfor(String word : s.split(\" \")) {\n\t\t\t\tcnInfo.add(word);\n\t\t\t}\n\t\t}\n\t\tcnCentral.add(cnInfo);\n\t\tfor(List<String> networkInfo: cnCentral) {\n\t\t\tif(networkInfo.contains(\"disconnected\") || networkInfo.contains(\"Local\") || networkInfo.contains(\"Configuration\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(String word : networkInfo) {\n\t\t\t\tif(word.equals(\"adapter\")) {\n\t\t\t\t\tconnectionname = networkInfo.get(networkInfo.indexOf(word)+1);\n\t\t\t\t\tif(connectionname.contains(\":\")) {\n\t\t\t\t\t\tconnectionname = connectionname.substring(0, connectionname.length()-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconnectionname = connectionname + \" \" + networkInfo.get(networkInfo.indexOf(word)+2).substring(0, \n\t\t\t\t\t\t\t\tnetworkInfo.get(networkInfo.indexOf(word)+2).length()-1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\\\"\"+connectionname + \"\\\"\";\n\n}",
"public String getCline(){\r\n\t\treturn cline;\r\n\t}",
"public int getLineColor() {\r\n return LineColor;\r\n }",
"public abstract String getLine(int lineNumber);",
"public String getLine4() {\n return line4;\n }",
"public BufferedReader getSocketIn() {\n\t\treturn socketIn;\n\t}",
"String getLine (int line);",
"public ArrayList<Line> searchLinesByConnection(Connection currentConnection) {\n if (currentConnection != null) {\n ArrayList<Line> currentLines = new ArrayList<>();\n for (int i = 0; i < lines.size(); i++) {\n /*\n if ((lines.get(i).getStartX() == currentConnection.x1 && lines.get(i).getStartY() == currentConnection.y1 &&\n lines.get(i).getEndX() == currentConnection.x2 && lines.get(i).getEndY() == currentConnection.y2) ||\n (lines.get(i).getStartX() == currentConnection.x2 && lines.get(i).getStartY() == currentConnection.y2 &&\n lines.get(i).getEndX() == currentConnection.x1 && lines.get(i).getEndY() == currentConnection.y1)) {\n currentLines.add(lines.get(i));\n }\n */\n if (doesLineMatchConnection(lines.get(i), currentConnection)) {\n currentLines.add(lines.get(i));\n }\n }\n return currentLines;\n }\n return null;\n }",
"public String getSecondLine() {\n return this.secondLine;\n }",
"private int getLastLine() {\n return lastSourcePosition.line;\n }",
"public abstract String getFirstLine();",
"public String getFirstLine() {\r\n return this.firstLine;\r\n }",
"String getLine();",
"private String getLineAt(int linenum) {\n\t\ttry {\n\t\t\tint start = mainTextArea.getLineStartOffset(linenum);\n\t\t\tint end = mainTextArea.getLineEndOffset(linenum);\n\t\t\treturn mainTextArea.getText(start, end - start);\n\t\t} catch (BadLocationException e) {\n\t\t\treturn (\"\");\n\t\t}\n\t}",
"public String getFirstLine() {\n return this.firstLine;\n }",
"public VCFLine getNextLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn reader.getCurrentLine();\n\t}",
"public java.lang.Short getOriginatingLineInfo() {\r\n return originatingLineInfo;\r\n }",
"public int getLineNumber() {\n return lineNumber;\n }"
] | [
"0.6916044",
"0.6842314",
"0.67717725",
"0.6711854",
"0.66935116",
"0.66882586",
"0.666875",
"0.6668173",
"0.66477567",
"0.6642723",
"0.65657914",
"0.655207",
"0.65501153",
"0.6531744",
"0.6531054",
"0.6520084",
"0.6515465",
"0.6412692",
"0.6404704",
"0.63204044",
"0.6279292",
"0.62655866",
"0.623877",
"0.61912024",
"0.6174491",
"0.6148024",
"0.6122605",
"0.6100366",
"0.60494745",
"0.60274833",
"0.6016598",
"0.5986255",
"0.59650356",
"0.5931842",
"0.5928502",
"0.59229934",
"0.59068847",
"0.59047586",
"0.58994704",
"0.5882071",
"0.5848042",
"0.5841808",
"0.58404696",
"0.58386177",
"0.5824812",
"0.58096564",
"0.5807209",
"0.5805275",
"0.5795301",
"0.5795066",
"0.5792725",
"0.5787662",
"0.5777748",
"0.5767985",
"0.57631356",
"0.57321805",
"0.5727209",
"0.5720038",
"0.57198286",
"0.5716828",
"0.5715746",
"0.571353",
"0.57075614",
"0.57075614",
"0.57075614",
"0.57039934",
"0.56907266",
"0.5682204",
"0.5672473",
"0.56714547",
"0.56664425",
"0.56664425",
"0.56614006",
"0.56500524",
"0.56462044",
"0.5643111",
"0.56381726",
"0.5625643",
"0.5620099",
"0.55998725",
"0.55983114",
"0.55956614",
"0.5584708",
"0.5579849",
"0.5570098",
"0.55699176",
"0.5569398",
"0.5563757",
"0.55488074",
"0.5546916",
"0.55425715",
"0.55413264",
"0.5534794",
"0.55287254",
"0.55242324",
"0.55176467",
"0.551508",
"0.55145514",
"0.5511181",
"0.55089635"
] | 0.6666927 | 8 |
get the server details (secure or unsecure) | private String getServerDetails() {
String sServerLine = "Server: Ramon's Killer ";
String sSocketType = (bIsSecure ? "(SECURE)" : "(unsecure)");
sServerLine = sServerLine + sSocketType + " Server";
return sServerLine;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getServerDetails();",
"public static List<Object[]> getServerDetails(){\n\t\t\n\t\tString filePath = Holders.getFlatConfig().get(\"statusFile.use\").toString();\n\n\t\treturn getServerDetailsFromCSV(filePath, \"hostname\", \"user\",\"password\");\n\t}",
"public String[] getConnessionDetails() {\r\n\t\treturn new String[]{server.getText(),port.getText(),database.getText(),user.getText(),password.getText()};\r\n\t}",
"public String getServer()\n {\n return server;\n }",
"public static String getServer() {\n\t\tif(produccion){\n\t\t\treturn server_produccion;\n\t\t}else{\n\t\t\treturn server;\n\t\t}\t\t\n\t}",
"public String getServerDescription();",
"public String getServerName();",
"public String getServer() {\r\n return server;\r\n }",
"public String getSERVER() {\n \t\treturn SERVER;\n \t}",
"@Deprecated\n public synchronized ODocument getServerInfo() throws IOException {\n checkConnected();\n return remote.getServerInfo(user, password);\n }",
"java.lang.String getServerAddress();",
"public String getServerIP()\n\t{\n\t\treturn this.serverIP;\n\t}",
"HostInfo getHostInfo();",
"public String getServerAddress() {\r\n\t\treturn this.serverAddress;\r\n\t}",
"public String getServername() {\r\n return servername;\r\n }",
"S getServer();",
"String getHost();",
"public static String getServerIP() {\n return serverIP;\n }",
"public String getServerip() {\n return serverip;\n }",
"public String getIpServer()\n \t{\n \t\treturn ipServer;\n \t}",
"public static String getServerUrl(Context context) {\n if (mServerUrl == null) {\n ApplicationInfo appInfo = null;\n try {\n appInfo = context.getPackageManager()\n .getApplicationInfo(context.getPackageName(),\n PackageManager.GET_META_DATA);\n mServerUrl = appInfo.metaData.getString(\"WHISPER_SERVER_ADDRESS\");\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n }\n return mServerUrl;\n }",
"public String getServerIP() {\n\t\treturn serverIP;\n\t}",
"public String getHost();",
"public String getHost();",
"public String getServerName() {\n return serverName;\n }",
"public String getServerName() {\n return serverName;\n }",
"java.lang.String getHost();",
"java.lang.String getHost();",
"public static String getServerIpAddress() {\n return _serverIpAddress;\n }",
"protected String getServerUrl() {\r\n\t\treturn server;\r\n\t}",
"public String getCredentials() {\n return serverGroup.getCredentials();\n }",
"public String getServerUrl() {\n return ipAddress;\n }",
"public String getNiceServerIP(){\n\t\treturn(niceServerAddress);\n\t}",
"@Override\n public SecurityInfo getInfo() {\n return info;\n }",
"public String getServerName(){\n return this.serverName;\n }",
"public String getServerAddress() {\n\t\treturn mServerAddress;\n\t}",
"ServerEntry getServer();",
"String getServerName() {\n return game.z.C;\n }",
"public String toString() {\r\n\t\tString host;\r\n\t\tint port;\r\n\t\tString tmpStr = \"\";\r\n\t\ttmpStr += \"Server(s):\\n\";\r\n\t\ttmpStr += \"----------\";\r\n\t\tfor(int i=0; i<listHostPort.size(); i++) {\r\n\t\t\thost = ((DNSHostPort)listHostPort.get(i)).getHost();\r\n\t\t\tport = ((DNSHostPort)listHostPort.get(i)).getPort();\r\n\t\t\ttmpStr += \" \" + host + \":\" + port + \"\\n\";\r\n\t\t}\r\n\t\treturn tmpStr;\r\n\t}",
"public String getServerIp() {\n return serverIp;\n }",
"public String getServerIp() {\n return serverIp;\n }",
"public String getServerIp() {\r\n\t\treturn serverIp;\r\n\t}",
"ch.epfl.dedis.proto.ServerIdentityProto.ServerIdentity getServer();",
"String getRemoteAddr();",
"public String getStunServer();",
"public String getClientMachine();",
"public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }",
"@Override\n\t\tpublic String getServerName() {\n\t\t\treturn null;\n\t\t}",
"public String getServerURL() {\n return serverURL;\n }",
"public String getHost() {\r\n \t\treturn properties.getProperty(KEY_HOST);\r\n \t}",
"public Map<String, String> getConnectionDetails() {\n\t\treturn connectionDetails;\n\t}",
"protected final String getServerUrl() {\n return this.serverUrl;\n }",
"public static server getServer(){\n return thisServer;\n }",
"String getServletInfo();",
"@NonNull\n public String getServerAddr() {\n if (mIkeTunConnParams == null) return mServerAddr;\n\n final IkeSessionParams ikeSessionParams = mIkeTunConnParams.getIkeSessionParams();\n return ikeSessionParams.getServerHostname();\n }",
"String getServerId();",
"@Override\n\tpublic String getServerName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getServerName() {\n\t\treturn null;\n\t}",
"public String getServerBase() {\n HttpServletRequest request = FxJsfUtils.getRequest().getRequest();\n return \"http\" + (request.isSecure() ? \"s://\" : \"://\") + FxRequestUtils.getExternalServerName(request);\n }",
"public String getServerVersion();",
"private String[] getNetworkInformation(Context context)\n {\n String[] output = new String[4];\n\n WifiManager wifiMgr = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiMgr.getConnectionInfo();\n int ip = wifiInfo.getIpAddress();\n String ipAddress = Formatter.formatIpAddress(ip);\n output[0] = ipAddress;\n // Get DNS Server\n final DhcpInfo dhcp = wifiMgr.getDhcpInfo();\n output[1] = Formatter.formatIpAddress(dhcp.netmask);\n output[2] = Formatter.formatIpAddress(dhcp.gateway);\n output[3] = Formatter.formatIpAddress(dhcp.dns1);\n return output;\n }",
"java.lang.String getRemoteHost();",
"public String getServerUrl() {\n return mServerUrl;\n }",
"public Properties getProperties() {\n return this.serverProperties;\n }",
"public String toString()\n {\n return serverAddress == null?\"null\":serverAddress.toString();\n }",
"private static String[] getServerAddress(String p_78863_0_) {\n/* */ try {\n/* 87 */ String var1 = \"com.sun.jndi.dns.DnsContextFactory\";\n/* 88 */ Class.forName(\"com.sun.jndi.dns.DnsContextFactory\");\n/* 89 */ Hashtable<Object, Object> var2 = new Hashtable<>();\n/* 90 */ var2.put(\"java.naming.factory.initial\", \"com.sun.jndi.dns.DnsContextFactory\");\n/* 91 */ var2.put(\"java.naming.provider.url\", \"dns:\");\n/* 92 */ var2.put(\"com.sun.jndi.dns.timeout.retries\", \"1\");\n/* 93 */ InitialDirContext var3 = new InitialDirContext(var2);\n/* 94 */ Attributes var4 = var3.getAttributes(\"_minecraft._tcp.\" + p_78863_0_, new String[] { \"SRV\" });\n/* 95 */ String[] var5 = var4.get(\"srv\").get().toString().split(\" \", 4);\n/* 96 */ return new String[] { var5[3], var5[2] };\n/* */ }\n/* 98 */ catch (Throwable var6) {\n/* */ \n/* 100 */ return new String[] { p_78863_0_, Integer.toString(25565) };\n/* */ } \n/* */ }",
"public String getCredentials();",
"public static InetAddress getServerInet(){\n return thisServer.getIp();\n }",
"public String getSiteHttpServerName() {\n return mSiteHttpServerName;\n }",
"public static server getNameServer(){\n return nameServer;\n }",
"String getRemoteHostName();",
"default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }",
"String host();",
"public String getServerUrl() {\n\t return Config.SERVER_URL;\n }",
"public ServerProperties getServerProperties()\n\t{\n\t\tif (serverProperties == null)\n\t\t{\n\t\t\tConfig config = configService.getConfig(\"Server\");\n\t\t\tserverProperties = (ServerConfigElement)config.getConfigElement(ServerConfigElement.CONFIG_ELEMENT_ID);\n\t\t}\n\t\treturn serverProperties;\n\t}",
"String getUserInfoFromServer(String userID);",
"private void requestServerToGetInformation() {\n Net net = Net.getInstance();\n Log.i(TAG, \"requestServerToGetInformation: Start connect server\");\n net.get(AppConstant.SERVER_COMBO_URL, new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.i(TAG, \"onFailure: connect error; \" + e.getMessage());\n }\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n // get the JSON from responses.\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }\n });\n }",
"public String getPortalInfo() {\r\n return getPortalName() + \"/\" + getPortalVersion();\r\n }",
"public String getServerName() {\n\t\treturn m_serverName;\n\t}",
"public String getDataServerIp() {\n return dataServerIp;\n }",
"private ServerDetail fetchServerDetails(String hostname, String coreName, SolrServer realTimeThoth) throws SolrServerException {\n System.out.println(\"Fetching server details for hostname(\"+hostname+\") coreName(\"+coreName+\")\");\n QueryResponse qr = realTimeThoth.query(new SolrQuery(\"hostname_s:\\\"\" + hostname + \"\\\"\" +\" AND \" + \"coreName_s:\\\"\" +coreName + \"\\\" AND NOT exception_b:true AND NOT slowQuery_b:true\").setRows(1));\n SolrDocumentList solrDocumentList = qr.getResults();\n ServerDetail sd = null;\n if (qr.getResults().getNumFound() > 0) {\n String pool = (String)solrDocumentList.get(0).getFieldValue(POOL);\n String port = solrDocumentList.get(0).getFieldValue(PORT).toString();\n sd = new ServerDetail(hostname, pool, port, coreName);\n }\n return sd;\n }",
"public String getEventingServer() {\n\t\treturn eventingServer;\n\t}",
"public String getServer () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"protected String getAuthInfo ()\n\t{\n\t\treturn authInfo;\n\t}",
"public String[] getDetailsAboutThisMachine() throws StoreFactoryException;",
"public static NetworkInfo getNetworkInfo(Context context){\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n return cm.getActiveNetworkInfo();\n }",
"public static NetworkInfo getNetworkInfo(Context context){\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n return cm.getActiveNetworkInfo();\n }",
"public Optional<String> tlsServerName() {\n return Codegen.stringProp(\"tlsServerName\").config(config).get();\n }",
"default String protocol() {\n return (String) metadata().get(\"x-server-protocol\");\n }",
"private String getServerStatusData() throws IOException {\r\n File keyFile = resources.ResourceLoader.getFile(\"key.txt\");\r\n String key = new Scanner(keyFile).nextLine();\r\n\r\n URLConnection conn = new URL(baseURL).openConnection();\r\n conn.setDoOutput(true);\r\n conn.setRequestProperty(\"X-Riot-Token\", key);\r\n\r\n try(BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\r\n String line = in.readLine();\r\n in.close();\r\n return line.replace(\"\\\\r\\\\n\", \"\");\r\n }\r\n catch(UnknownHostException e) {\r\n System.out.println(e);\r\n throw e;\r\n }\r\n }",
"@Override\n public String getServerDisplayName() {\n return serverDisplayName;\n }",
"abstract String getRemoteAddress();",
"private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }",
"@NonNull\n public String getServerHostname() {\n return mServerHostname;\n }",
"public final static String getServerIdentificator() {\r\n\t\treturn serverID;\r\n\t}",
"public String getHostName();",
"public String[] serverInfo(int id) throws RemoteException {\n\t\t\tServiceInfo info = m_services.get(id);\n\t\t\t\n\t\t\tif (info != null)\n\t\t\t\treturn new String[] {info.getName(), info.getNiceTextString()};\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}",
"java.lang.String getCred();",
"public static String getServerSSLConfigFileName() {\n return getSSLConfigFileName(\"ssl-server\");\n }",
"public String getConnectionDetails() {\n return getName();\n }"
] | [
"0.8138273",
"0.7112578",
"0.6737043",
"0.6591903",
"0.65498316",
"0.65450245",
"0.6542783",
"0.6493376",
"0.645927",
"0.64332265",
"0.634277",
"0.62657297",
"0.623563",
"0.6234245",
"0.6192464",
"0.6180939",
"0.6173558",
"0.6164954",
"0.61233836",
"0.6122236",
"0.6101568",
"0.60908353",
"0.60418075",
"0.60418075",
"0.6014722",
"0.6014722",
"0.6002886",
"0.6002886",
"0.59647745",
"0.5962728",
"0.5961986",
"0.59566236",
"0.59542674",
"0.5954162",
"0.5954104",
"0.5946523",
"0.59285676",
"0.5915277",
"0.59049237",
"0.5900697",
"0.5900697",
"0.5890829",
"0.58815277",
"0.5871719",
"0.5865428",
"0.5864036",
"0.5855588",
"0.578414",
"0.5780713",
"0.57751465",
"0.57675236",
"0.57609266",
"0.5753593",
"0.5735696",
"0.57253456",
"0.57124025",
"0.570324",
"0.570324",
"0.56985855",
"0.5685379",
"0.5681418",
"0.56775653",
"0.56767875",
"0.56667423",
"0.5666473",
"0.56549543",
"0.5636835",
"0.56332916",
"0.5625058",
"0.561986",
"0.56171685",
"0.56151617",
"0.56064063",
"0.55947816",
"0.55946153",
"0.5581361",
"0.5577034",
"0.55712855",
"0.55702454",
"0.55657536",
"0.55566335",
"0.5556272",
"0.5550642",
"0.5537549",
"0.5521313",
"0.5518483",
"0.5518483",
"0.5516123",
"0.5514922",
"0.550583",
"0.55016595",
"0.54981524",
"0.54950505",
"0.54935926",
"0.54900527",
"0.5489901",
"0.5485852",
"0.5484153",
"0.54792",
"0.54788435"
] | 0.79051 | 1 |
get the content type to return | private String getContentType(String sHTTPRequest) {
String sContentType = "Content-Type: ";
// update based on file extension or if response starts with HTML/URL
String sFileExtension = getFileExtension(sHTTPRequest);
if (sFileExtension.equalsIgnoreCase(".html") || sFileExtension.equalsIgnoreCase(".htm")) {
sContentType += "text/html";
} else if (sFileExtension.equalsIgnoreCase(".txt")) {
sContentType += "text/plain";
} else if (sFileExtension.equalsIgnoreCase(".pdf")) {
sContentType += "application/pdf";
} else if (sFileExtension.equalsIgnoreCase(".png")) {
sContentType += "image/png";
} else if (sFileExtension.equalsIgnoreCase(".jpeg") || sFileExtension.equalsIgnoreCase(".jpg")) {
sContentType += "image/jpeg";
} else {
sContentType += "text/html"; // default response
}
// return final content type
return sContentType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getContentType();",
"String getContentType();",
"String getContentType();",
"public String getContentType();",
"public String getContentType();",
"public String getContenttype() {\n return contenttype;\n }",
"public String getContenttype() {\n return contenttype;\n }",
"public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }",
"public String getContenttype() {\n\t\treturn contenttype;\n\t}",
"int getContentTypeValue();",
"public String getContentType() {\n return getProperty(Property.CONTENT_TYPE);\n }",
"com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType();",
"public String getContentType() {\n return getHeader(\"Content-Type\");\n }",
"public java.lang.Object getContentType() {\r\n return contentType;\r\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return this.response.getContentType();\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n\t\tString ct = header.getContentType();\n\t\treturn Strings.substringBefore(ct, ';');\n\t}",
"@Override\n\tpublic String getContentType()\n\t{\n\t\treturn contentType;\n\t}",
"@Override\n\tpublic String getContentType() {\n\t\treturn CONTENT_TYPE;\n\t}",
"public String getContentType() {\n return contentType;\n }",
"abstract ContentType getContnentType();",
"public CharSequence getContentType() {\n return contentType;\n }",
"public String getContentType() {\r\n try {\r\n ContentType newCtype = new ContentType(super.getContentType());\r\n ContentType retCtype = new ContentType(cType.toString());\r\n retCtype.setParameter(\"boundary\", newCtype.getParameter(\"boundary\"));\r\n return retCtype.toString();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return \"null\";\r\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"public String getContentType() {\n return contentType;\n }",
"public java.lang.String getContentType() {\n return contentType;\n }",
"protected String getContentType()\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n String ext = FilenameUtils.getExtension(fullAttachmentFilename);\n if (ext == null)\n {\n return null;\n }\n if (ext.equalsIgnoreCase(\"pdf\"))\n {\n return \"application/pdf\";\n } else if (ext.equalsIgnoreCase(\"zip\"))\n {\n return \"application/zip\";\n } else if (ext.equalsIgnoreCase(\"jpg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"jpeg\"))\n {\n return \"image/jpeg\";\n\n } else if (ext.equalsIgnoreCase(\"html\"))\n {\n return \"text/html\";\n\n } else if (ext.equalsIgnoreCase(\"png\"))\n {\n return \"image/png\";\n\n } else if (ext.equalsIgnoreCase(\"gif\"))\n {\n return \"image/gif\";\n\n }\n log.warn(\"Content type not found for file extension: \" + ext);\n return null;\n }",
"public MimeType mimetype() {\r\n return getContent().mimetype();\r\n }",
"@java.lang.Override public int getContentTypeValue() {\n return contentType_;\n }",
"public String getContentType() {\n\t\treturn null;\n\t}",
"public String getContentType() {\n\t\treturn contentType;\n\t}",
"public String getContentType() {\n\t\treturn contentType;\n\t}",
"public String getMimeType ()\n {\n final String METHOD_NAME = \"getMimeType\";\n this.logDebug(METHOD_NAME + \"1/2: Started\");\n\n String mimeType = null;\n try\n {\n\tint contentType = this.document.getContentType();\n\tif ( contentType >= 0 ) mimeType = MediaType.nameFor[contentType];\n }\n catch (Exception exception)\n {\n\tthis.logWarn(METHOD_NAME + \"Failed to retrieve mime type\", exception);\n }\n\n this.logDebug(METHOD_NAME + \" 2/2: Done. mimeType = \" + mimeType);\n return mimeType;\n }",
"@java.lang.Override public int getContentTypeValue() {\n return contentType_;\n }",
"public\t ContentType getContentTypeHeader()\n { return (ContentType) this.getHeader(ContentTypeHeader.NAME);}",
"public int getEntityType(){\n\t\tIterator<ArrayList<String>> i = headerLines.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tArrayList<String> headerLines = i.next();\n\t\t\tString headerName = headerLines.get(0);\n\t\t\tif (headerName.matches(\"Content-Type:\")){\n\t\t\t\tString headerData = headerLines.get(1);\n\t\t\t\tif(headerData.contains(\"text\")){\n\t\t\t\t\treturn TEXT;\n\t\t\t\t} else if (headerData.contains(\"pdf\")){\n\t\t\t\t\treturn PDF;\n\t\t\t\t} else if (headerData.contains(\"gif\")){\n\t\t\t\t\treturn GIF;\n\t\t\t\t} else if (headerData.contains(\"jpeg\")){\n\t\t\t\t\treturn JPEG;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"@java.lang.Override\n public com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType() {\n @SuppressWarnings(\"deprecation\")\n com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType result = com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.valueOf(contentType_);\n return result == null ? com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.UNRECOGNIZED : result;\n }",
"@java.lang.Override public com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType() {\n @SuppressWarnings(\"deprecation\")\n com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType result = com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.valueOf(contentType_);\n return result == null ? com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType.UNRECOGNIZED : result;\n }",
"public Integer getOptContentType() { return(content_type); }",
"String getContentType(String fileExtension);",
"public String getContentType() {\r\n return mFile.getContentType();\r\n }",
"public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }",
"MimeType mediaType();",
"@Override\n\t\tpublic String getContentType() {\n\t\t\treturn null;\n\t\t}",
"public String getFilecontentContentType() {\n return filecontentContentType;\n }",
"@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getContentType() {\n\t\treturn null;\n\t}",
"String getMimeType();",
"public java.lang.String getContentType() {\n java.lang.Object ref = contentType_;\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 contentType_ = s;\n return s;\n }\n }",
"@AutoEscape\n\tpublic String getContentType();",
"default String getContentType() {\n return \"application/octet-stream\";\n }",
"@Override\n public int getContentType() {\n return 0;\n }",
"public java.lang.String getContentType() {\n java.lang.Object ref = contentType_;\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 contentType_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\r\n\tpublic String getContentType() {\r\n\t\treturn attachmentType;\r\n\t}",
"public ContentTypeSelDTO getContentType() {\r\n\t\ttype(ConfigurationItemType.CONTENT_TYPE);\r\n\t\treturn contentTypeValue;\r\n\t}",
"public static String getContentType(String name){\n\t\tString contentType = \"\";\n\t\tif(name.endsWith(\".html\")){\n\t\t\tcontentType = \"text/html\";\n\t\t}else if(name.endsWith(\".txt\")){\n\t\t\tcontentType = \"text/plain\";\n\t\t}else if(name.endsWith(\".gif\")){\n\t\t\tcontentType = \"image/gif\";\n\t\t}else if(name.endsWith(\".jpg\")){\n\t\t\tcontentType = \"image/jpeg\";\n\t\t}else if(name.endsWith(\".png\")){\n\t\t\tcontentType = \"image/png\";\n\t\t}\n\t\treturn contentType;\n\t}",
"@Override\n\tpublic String getContentType(String filename) {\n\t\treturn null;\n\t}",
"protected String getContentType(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) {\n String mimeType = JcrBinary.getMimeType(resource);\n if (StringUtils.isEmpty(mimeType)) {\n mimeType = ContentType.OCTET_STREAM;\n }\n return mimeType;\n }",
"java.lang.String getMimeType();",
"java.lang.String getMimeType();",
"public Optional<String> contentType() {\n return body.contentType()\n .map(\n h -> {\n if (h.contains(\";\")) {\n return h.substring(0, h.indexOf(';')).trim();\n } else {\n return h.trim();\n }\n });\n }",
"public MediaType getType() {\n return type;\n }",
"@Override\n public String getContentType() {\n return null;\n }",
"public String getType() {\n try {\n return (String)replyHeaders.getHeader(HeaderSet.TYPE);\n } catch (IOException e) {\n return null;\n }\n }",
"public String getContentType(String arg0) {\n\t\treturn null;\n\t}",
"@JsonProperty(\"contentType\")\n public String getContentType() {\n return contentType;\n }",
"public ContentDispositionType type() {\n return this.value();\n }",
"public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }",
"public static String getContentType(String format) {\n\t\tif (StringUtils.hasText(format)) {\n\t\t\tif (format.equalsIgnoreCase(XML.name())) {\n\t\t\t\treturn ContentTypes.XML.toString();\n\t\t\t} else if (format.equalsIgnoreCase(JSON.name())) {\n\t\t\t\treturn ContentTypes.JSON.toString();\n\t\t\t} else if (format.equalsIgnoreCase(PDF.name())) {\n return ContentTypes.PDF.toString();\n }\n\t\t}\n\t\treturn null;\n\t}",
"public String getMimeType();",
"public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }",
"public static ContentType extensionContentType(String fileExt) {\r\n\r\n\t\tfileExt = fileExt.toLowerCase();\r\n\r\n\t\tif (\"tiff\".equals(fileExt) || \"tif\".equals(fileExt)) {\r\n\t\t\t// return MIMEConstants.\r\n\t\t} else if (\"zip\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_ZIP;\r\n\t\t} else if (\"pdf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_PDF;\r\n\t\t} else if (\"wmv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_WMV;\r\n\t\t} else if (\"rar\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_RAR;\r\n\t\t} else if (\"swf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_SWF;\r\n\t\t} else if (\"exe\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WINDOWSEXEC;\r\n\t\t} else if (\"avi\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_AVI;\r\n\t\t} else if (\"doc\".equals(fileExt) || \"dot\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WORD;\r\n\t\t} else if (\"ico\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_ICO;\r\n\t\t} else if (\"mp2\".equals(fileExt) || \"mp3\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_MPEG;\r\n\t\t} else if (\"rtf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_RTF;\r\n\t\t} else if (\"xls\".equals(fileExt) || \"xla\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_EXCEL;\r\n\t\t} else if (\"jpg\".equals(fileExt) || \"jpeg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_JPEG;\r\n\t\t} else if (\"gif\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_GIF;\r\n\t\t} else if (\"svg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_SVG;\r\n\t\t} else if (\"png\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_PNG;\r\n\t\t} else if (\"csv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSV;\r\n\t\t} else if (\"ps\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_POSTSCRIPT;\r\n\t\t} else if (\"html\".equals(fileExt) || \"htm\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_HTML;\r\n\t\t} else if (\"css\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSS;\r\n\t\t} else if (\"xml\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_XML;\r\n\t\t} else if (\"js\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_JAVASCRIPT;\r\n\t\t} else if (\"wma\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_WMA;\r\n\t\t}\r\n\r\n\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_PLAIN;\r\n\t}",
"public String getContentTypes() {\n return contentTypes;\n }",
"public static String getContentType(String filename) {\n return getTika().detect(filename);\n }",
"protected String getDefaultContentType() {\n return DEFAULT_CONTENT_TYPE;\n }",
"protected String getReplyContentType() {\n\t\treturn this.replyContentType;\n\t}",
"@Override\r\n public String getCustomContentType() {\r\n return DirectUtils.getFileMIMEType(new File(this.imagePath));\r\n }",
"@Override\n\tpublic String getContentType(File file) {\n\t\treturn null;\n\t}",
"@NotNull\n String getMimeType();",
"public String getMimeType() {\n return mimeType;\n }",
"public String getMimeType() {\n return mimeType;\n }",
"public String getMimeType() {\r\n return mimeType;\r\n }",
"public static String getContentType(HttpServletRequest argClientRequest) {\r\n\t\tString mimeType = null;\r\n\t\tif (argClientRequest.getContentType() != null\r\n\t\t\t\t&& argClientRequest.getContentType().length() > 0) {\r\n\t\t\tString contentType = argClientRequest.getContentType();\r\n\t\t\tString[] tokens = contentType.split(SEMI_COLON);\r\n\t\t\tmimeType = tokens[0];\r\n\t\t}\r\n\t\treturn mimeType;\r\n\t}",
"public static String getContentType(HttpResponse argOriginResponse) {\r\n\t\tString mime = null;\r\n\t\tHeader header = argOriginResponse\r\n\t\t\t\t.getFirstHeader(HttpConstants.CONTENT_TYPE);\r\n\t\tif (header != null) {\r\n\t\t\tmime = header.getValue();\r\n\t\t\tint semiColonIndex = mime.indexOf(HttpConstants.SEMI_COLON);\r\n\t\t\tif (semiColonIndex != -1) {\r\n\t\t\t\tmime = mime.substring(0, semiColonIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mime;\r\n\t}",
"public List<MediaType> getContentTypes() {\n\t\treturn this.contentTypes;\n\t}",
"public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}",
"public String getType() {\n return (String) getObject(\"type\");\n }",
"public String getMimeType() {\n return mimeType;\n }",
"public String getFiletype() {\n return filetype;\n }",
"public java.lang.String getFiletype() {\n return filetype;\n }",
"@Override\n\tpublic String getType(Uri uri) {\n\t\tfinal int match = sUriMatcher.match(uri);\n\t\tswitch (match) {\n\t\tcase ROUTE_ENTRIES:\n\t\t\treturn CONTENT_TYPE;\n\t\tcase ROUTE_ENTRIES_ID:\n\t\t\treturn CONTENT_ITEM_TYPE;\n\t\tdefault:\n\t\t\tthrow new UnsupportedOperationException(\"Unknown uri: \" + uri);\n\t\t}\n\t}",
"public final String getImageType() {\n String imageType = null;\n\n if (this.url != null) {\n imageType = this.url.substring(this.url.lastIndexOf(\".\") + 1);\n }\n\n return imageType;\n }",
"public String getMimeType() {\n\t\treturn mimeType;\n\t}"
] | [
"0.8534745",
"0.8534745",
"0.8534745",
"0.8346976",
"0.8346976",
"0.82786334",
"0.82786334",
"0.82219017",
"0.81707627",
"0.8133447",
"0.80243516",
"0.79723275",
"0.79545283",
"0.793058",
"0.7905952",
"0.7852434",
"0.7842211",
"0.7842211",
"0.7842211",
"0.7839472",
"0.7816019",
"0.7814",
"0.7812732",
"0.7807186",
"0.77567667",
"0.7754537",
"0.7714942",
"0.7714942",
"0.7714942",
"0.7714942",
"0.7714942",
"0.7702317",
"0.76487803",
"0.7626778",
"0.76116914",
"0.7582275",
"0.7577707",
"0.7577707",
"0.75765795",
"0.75282127",
"0.74559015",
"0.7431844",
"0.7423359",
"0.7415848",
"0.74054885",
"0.73804766",
"0.7377166",
"0.732993",
"0.73091054",
"0.7306144",
"0.7261338",
"0.7191614",
"0.7191614",
"0.7191614",
"0.7159669",
"0.71593285",
"0.7150192",
"0.7140967",
"0.7131655",
"0.71107274",
"0.70917386",
"0.7074213",
"0.705011",
"0.7036303",
"0.7034584",
"0.700775",
"0.700775",
"0.6991277",
"0.6987026",
"0.69843316",
"0.6976895",
"0.6967252",
"0.6961743",
"0.69504535",
"0.69216126",
"0.6911096",
"0.6897654",
"0.6822918",
"0.67373914",
"0.67286956",
"0.67241263",
"0.666133",
"0.6609043",
"0.65986806",
"0.6594957",
"0.65916324",
"0.6568232",
"0.6568232",
"0.65663356",
"0.6566298",
"0.6560396",
"0.6558633",
"0.6545664",
"0.6543922",
"0.6531419",
"0.65186757",
"0.6512363",
"0.6503896",
"0.6498898",
"0.649793"
] | 0.70141894 | 65 |
check if request is redirect | private boolean isRedirect(String sHTTPRequest) {
return sRedirects.containsKey(sHTTPRequest);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\tpublic boolean isRedirected(HttpRequest request, HttpResponse response, HttpContext context)\n\t\t\t\t\t\t\tthrows ProtocolException {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}",
"@Override\n\tpublic final boolean isRedirect()\n\t{\n\t\treturn redirect;\n\t}",
"@Override\r\n\tpublic boolean isRedirect() {\n\t\treturn false;\r\n\t}",
"public boolean isRedirect() {\n switch (code) {\n case HTTP_PERM_REDIRECT:\n case HTTP_TEMP_REDIRECT:\n case HTTP_MULT_CHOICE:\n case HTTP_MOVED_PERM:\n case HTTP_MOVED_TEMP:\n case HTTP_SEE_OTHER:\n return true;\n default:\n return false;\n }\n }",
"public boolean isRedirect() {\r\n\r\n\t\tPattern pattern = Pattern.compile(\"#(.*)redirect(.*)\",\r\n\t\t\t\tPattern.CASE_INSENSITIVE);\r\n\t\tif (pattern.matcher(text).matches()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn false;\r\n\t}",
"boolean isFollowRedirect();",
"public abstract boolean isRenderRedirect();",
"private static synchronized boolean isRedirection(\n HttpServletRequest request,\n HttpServletResponse response)\n {\n logger.debug(\"+\");\n if(redirections == null) {\n redirections = new Properties();\n if(Env.getGlobalProperty(\"redirections\") != null) {\n try {\n redirections.load(\n new ByteArrayInputStream(\n Env.getGlobalProperty(\"redirections\").getBytes()));\n } catch (IOException e) {\n logger.error(\"IOException\", e);\n }\n StringBuffer redirInfo = new StringBuffer(\"DNS names - URLs:\");\n Enumeration e = redirections.keys();\n while(e.hasMoreElements()) {\n String key = (String) e.nextElement();\n redirInfo.append(\"\\r\\n\");\n redirInfo.append(key);\n redirInfo.append(\"=\");\n redirInfo.append(redirections.get(key));\n }\n logger.info(redirInfo);\n }\n }\n if(redirections.get(request.getServerName()) != null) {\n try {\n response.sendRedirect(\n (String) redirections.get(request.getServerName()));\n } catch (IOException e) {\n logger.error(\"redirection failed\", e);\n }\n logger.debug(\"- redirection\");\n return true;\n }\n logger.debug(\"- not a redirection\");\n return false;\n }",
"public abstract boolean isRenderRedirectAfterDispatch();",
"private static void checkForRedirection(Connection conn) {\n JSONObject bestServer = ServerManager.getLowestLoadServer();\n if (bestServer != null && bestServer.get(\"id\") != Settings.getServerId()) {\n Message.sendRedirect(conn, (String) bestServer.get(\"hostname\"), (int) bestServer.get(\"port\"));\n }\n }",
"private boolean processRedirectResponse(HttpConnection conn) {\n\n if (!getFollowRedirects()) {\n LOG.info(\"Redirect requested but followRedirects is \"\n + \"disabled\");\n return false;\n }\n\n //get the location header to find out where to redirect to\n Header locationHeader = getResponseHeader(\"location\");\n if (locationHeader == null) {\n // got a redirect response, but no location header\n LOG.error(\"Received redirect response \" + getStatusCode()\n + \" but no location header\");\n return false;\n }\n String location = locationHeader.getValue();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirect requested to location '\" + location\n + \"'\");\n }\n\n //rfc2616 demands the location value be a complete URI\n //Location = \"Location\" \":\" absoluteURI\n URI redirectUri = null;\n URI currentUri = null;\n\n try {\n currentUri = new URI(\n conn.getProtocol().getScheme(),\n null,\n conn.getHost(), \n conn.getPort(), \n this.getPath()\n );\n redirectUri = new URI(location.toCharArray());\n if (redirectUri.isRelativeURI()) {\n if (isStrictMode()) {\n LOG.warn(\"Redirected location '\" + location \n + \"' is not acceptable in strict mode\");\n return false;\n } else { \n //location is incomplete, use current values for defaults\n LOG.debug(\"Redirect URI is not absolute - parsing as relative\");\n redirectUri = new URI(currentUri, redirectUri);\n }\n }\n } catch (URIException e) {\n LOG.warn(\"Redirected location '\" + location + \"' is malformed\");\n return false;\n }\n\n //check for redirect to a different protocol, host or port\n try {\n checkValidRedirect(currentUri, redirectUri);\n } catch (HttpException ex) {\n //LOG the error and let the client handle the redirect\n LOG.warn(ex.getMessage());\n return false;\n }\n\n //invalidate the list of authentication attempts\n this.realms.clear();\n //remove exisitng authentication headers\n removeRequestHeader(HttpAuthenticator.WWW_AUTH_RESP); \n //update the current location with the redirect location.\n //avoiding use of URL.getPath() and URL.getQuery() to keep\n //jdk1.2 comliance.\n setPath(redirectUri.getEscapedPath());\n setQueryString(redirectUri.getEscapedQuery());\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirecting from '\" + currentUri.getEscapedURI()\n + \"' to '\" + redirectUri.getEscapedURI());\n }\n\n return true;\n }",
"@java.lang.Override\n public boolean hasRedirectRefreshInterval() {\n return redirectRefreshInterval_ != null;\n }",
"public java.lang.Boolean getRedirectIndicator() {\r\n return redirectIndicator;\r\n }",
"@java.lang.Override\n public boolean hasRedirectRefreshThreshold() {\n return redirectRefreshThreshold_ != null;\n }",
"@Override\n\t\t\t\t\tpublic HttpUriRequest getRedirect(HttpRequest request, HttpResponse response, HttpContext context)\n\t\t\t\t\t\t\tthrows ProtocolException {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}",
"public boolean hasRedirectRefreshInterval() {\n return redirectRefreshIntervalBuilder_ != null || redirectRefreshInterval_ != null;\n }",
"public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}",
"boolean followRedirects() {\n return parseBoolean(get(FOLLOW_REDIRECTS), true);\n }",
"@Override\n public boolean supportsRedirectDelegation() {\n return false;\n }",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"void redirect();",
"private boolean redirectClient(String path)\n {\n URL url;\n String reqHost = _req.requestHdr.getHeader(\"Host\");\n String fullspec = \"http://\" + reqHost + path;\n String location = null;\n String gapAddress = null;\n boolean randomGAP = false;\n boolean haveValidGAPCookie = false;\n boolean haveValidLocationCookie = false;\n String s = null;\n\n InetAddress cliAddr = _req.connection.getSocket().getInetAddress();\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Got request from \" + cliAddr.toString() + \" \"\n + _req.requestHdr.getVersion() );\n }\n\n /*\n * Check if the client's host is blocked.\n */\n if (_blockList.isBlockedHost(cliAddr.getHostAddress())) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: your host is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n s = URIDecoder.decode(path);\n }\n catch(IllegalArgumentException e) {\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Format error: request contains an invalid escape sequence: \"\n + e.getMessage());\n return false;\n }\n\n /*\n * Check if the file requested is blocked.\n */\n if (_blockList.isBlockedFile(s)) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: the requested file is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n s = URIDecoder.decode(fullspec);\n }\n catch(IllegalArgumentException e) {\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Format error: request contains an invalid escape sequence: \"\n + e.getMessage());\n return false;\n }\n\n /*\n * Check if the URL requested is blocked.\n */\n if (_blockList.isBlockedURL(s)) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: the requested URL is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n url = new URL(fullspec);\n }\n catch( MalformedURLException e ) {\n logError(\"Unsupported request-URI: \" + fullspec);\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"unsupported request-URI\");\n return false;\n }\n\n String file = url.getFile();\n\n /*\n * Redirect the client to the default URL (if defined) if the\n * object name is absent.\n */\n if (file.equals(\"/\")) {\n s = _config.getDefaultURL();\n\n if (s != null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"no object name specified -- using default URL\");\n }\n\n return sendHTTPRedirectMessage(s, null, null);\n }\n }\n\n _cookieCoords = null;\n\n /*\n * If the client sent a redirector cookie, the cookie contains the\n * hostname and port number of the client's nearest GAP, and the\n * geographical coordinates associated with the client's IP address.\n */\n if (_config.getCookieEnabledFlag()) {\n HTTPCookie clientCookie = null;\n\n if ( (s = _req.requestHdr.getHeader(\"Cookie\")) != null) {\n try {\n _httpCookie.init(s);\n clientCookie = _httpCookie;\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed cookie: \" + e.getMessage());\n\n // CONTINUE - cookie will be replaced\n }\n\n if (clientCookie != null) {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie: \" + clientCookie.toString());\n }\n\n String gap = clientCookie.getAttribute(\n RedirectorCookieFactory.COOKIE_GAP_ATTRIB);\n\n /*\n * Set the nearest GAP to the GAP indicated by the cookie. If\n * the GAP address inside the cookie is invalid or if it does\n * not refer to a GAP, the cookie is discarded (and replaced).\n */\n if (gap != null) {\n HostAddress gapHost = null;\n\n try {\n gapHost = new HostAddress(gap);\n s = gapHost.toString();\n\n // Check if gapHost still refers to an active GAP.\n if (_gapList.get(s) != null) {\n gapAddress = s;\n haveValidGAPCookie = true;\n }\n }\n catch(UnknownHostException e) {\n logError(\"Unknown host in cookie: \" + gap);\n\n // CONTINUE - GAP cookie will be replaced\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed host address in cookie: \" + gap);\n\n // CONTINUE - GAP cookie will be replaced\n }\n }\n else {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie does not contain a \"\n + RedirectorCookieFactory.COOKIE_GAP_ATTRIB\n + \" attribute\");\n }\n }\n\n /*\n * If the cookie does not contain a valid nearest GAP attribute,\n * we may need the cookie's coordinates attribute to determine the\n * nearest GAP.\n */\n if (gapAddress == null) {\n s = clientCookie.getAttribute(\n RedirectorCookieFactory.COOKIE_COORDS_ATTRIB);\n\n if (s != null) {\n try {\n _cookieCoords = new FloatCoordinate(s);\n haveValidLocationCookie = true;\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed coordinates in cookie: \" + s);\n\n // CONTINUE - location cookie will be replaced\n }\n }\n else {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie does not contain a \"\n + RedirectorCookieFactory.COOKIE_COORDS_ATTRIB\n + \" attribute\");\n }\n }\n }\n }\n }\n }\n\n /*\n * If there is no (valid) GAP cookie, find the location of the nearest\n * GAP. Pick a random GAP if the nearest GAP could not be determined.\n */\n if (gapAddress == null) {\n GlobeAccessPointRecord gaprec;\n\n if ( (gaprec = findNearestGAP(cliAddr)) == null) {\n gaprec = getRandomGAP();\n randomGAP = true;\n }\n gapAddress = gaprec.hostport;\n\n // _cookieCoords set\n }\n\n String gapCookie = null, locationCookie = null;\n\n /*\n * Create the GAP cookie value if cookies are enabled and the client\n * does not have a (valid) GAP cookie. If a GAP cookie is created,\n * create a location cookie if the client doesn't have a valid one.\n */\n if (_config.getCookieEnabledFlag()) {\n if (! haveValidGAPCookie) {\n if (randomGAP) {\n setExpiresDate(_date, 1000 * RANDOM_GAP_COOKIE_TTL);\n }\n else {\n setExpiresDate(_date, 1000 * _config.getGAPCookieTTL());\n }\n\n gapCookie = _cookieFactory.getGAPValue(gapAddress, _date);\n\n if ( ! haveValidLocationCookie) {\n if (_cookieCoords != null) {\n setExpiresDate(_date, 1000 * _config.getLocationCookieTTL());\n locationCookie = _cookieFactory.getLocationValue(_cookieCoords,\n _date);\n }\n }\n }\n }\n\n /*\n * Send a reply to redirect the client to the nearest GAP.\n */\n if (_config.getHTTPRedirectFlag()) {\n return sendHTTPRedirectMessage(gapAddress, file,\n gapCookie, locationCookie);\n }\n else {\n return sendHTMLReloadPage(gapAddress, file,\n gapCookie, locationCookie);\n }\n }",
"boolean followRedirects() {\n return parseBoolean(settings.get(FOLLOW_REDIRECTS), true);\n }",
"public boolean preHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object arg2) throws Exception {\n\t\tboolean flag = false;\n\t\tString cxtPath = request.getContextPath();\n\t\tString url = request.getRequestURI();\n\t\tfor (String param : IGNORE_URIS) {\n\t\t\tif (StringUtils.contains(param, url)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!flag) {\n\t\t\tString session = (String) request.getSession().getAttribute(\n\t\t\t\t\tConstant.SESSION_USER);\n\t\t\tif (StringUtils.isEmpty(session)) {\n\t\t\t\tif (\"XMLHttpRequest\".equalsIgnoreCase(request\n\t\t\t\t\t\t.getHeader(\"x-requested-with\"))) {\n\t\t\t\t\tresponse.setStatus(5000);\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tresponse.sendRedirect(cxtPath + \"/index.html\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t}\n\t\treturn flag;\n\n\t}",
"public abstract String redirectTo();",
"private static void checkValidRedirect(URI currentUri, URI redirectUri)\n throws HttpException {\n LOG.trace(\"enter HttpMethodBase.checkValidRedirect(HttpConnection, URL)\");\n\n String oldProtocol = currentUri.getScheme();\n String newProtocol = redirectUri.getScheme();\n if (!oldProtocol.equals(newProtocol)) {\n throw new HttpException(\"Redirect from protocol \" + oldProtocol\n + \" to \" + newProtocol + \" is not supported\");\n }\n\n try {\n String oldHost = currentUri.getHost();\n String newHost = redirectUri.getHost();\n if (!oldHost.equalsIgnoreCase(newHost)) {\n throw new HttpException(\"Redirect from host \" + oldHost\n + \" to \" + newHost + \" is not supported\");\n }\n } catch (URIException e) {\n LOG.warn(\"Error getting URI host\", e);\n throw new HttpException(\"Invalid Redirect URI from: \" \n + currentUri.getEscapedURI() + \" to: \" + redirectUri.getEscapedURI()\n );\n }\n\n int oldPort = currentUri.getPort();\n if (oldPort < 0) {\n oldPort = getDefaultPort(oldProtocol);\n }\n int newPort = redirectUri.getPort();\n if (newPort < 0) {\n newPort = getDefaultPort(newProtocol);\n }\n if (oldPort != newPort) {\n throw new HttpException(\"Redirect from port \" + oldPort\n + \" to \" + newPort + \" is not supported\");\n }\n }",
"private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }",
"public boolean hasRedirectRefreshThreshold() {\n return redirectRefreshThresholdBuilder_ != null || redirectRefreshThreshold_ != null;\n }",
"protected boolean mustTunnel (RequestHandler rh) {\n\tString auth = request.getHeader (\"Authorization\");\n\tif (auth != null) {\n\t if (auth.startsWith (\"NTLM\") || auth.startsWith (\"Negotiate\"))\n\t\treturn true;\n\t}\n\treturn false;\n }",
"@Override\r\n\tprotected String getRedirectUri(HttpServletRequest req)\r\n\t\t\tthrows ServletException, IOException {\n\t\treturn Utils.getRedirectUri(req);\r\n\t}",
"public static void redirect(HttpServletRequest req,\n HttpServletResponse resp, String redirectUrl) throws IOException {\n String isAJAXRequest = req.getParameter(\"AJAXRequest\"); // parameter\n if (isAJAXRequest == null) {\n resp.sendRedirect(redirectUrl);\n } else {\n resp.sendError(FOUR_O_ONE,\n \"Not Authorized to view the requested component\");\n }\n }",
"public abstract boolean isAppropriateRequest(Request request);",
"public URL getRedirectURL() {\r\n return redirectURL;\r\n }",
"void sendRedirect(HttpServletResponse response, String location) throws AccessControlException, IOException;",
"public boolean isConsumable(HttpServletRequest request);",
"public String getRedirect() {\r\n\t\treturn this.redirect;\r\n\t}",
"protected boolean isSigninRequest(@NonNull final HttpServletRequest request)\n\t{\n\t\tboolean isSigninRequest = false;\n\t\t// check the request url path, if it is a sign in request\n\t\tString path = getPath(request);\n\t\tif (isSigninPath(path))\n\t\t{\n\t\t\tisSigninRequest = true;\n\t\t}\n\t\treturn isSigninRequest;\n\t}",
"@Override\n\tpublic boolean checkAuthorization(HttpServletRequest request) {\n\t\treturn true;\n\t}",
"boolean match(final HttpServletRequest request) {\n\t\t\tString lMetodo = request.getMethod().toUpperCase();\n\t\t\tString lUrl = request.getRequestURL().toString();\n\t\t\treturn lMetodo.equals(this.metodo.toString()) && lUrl.contains(this.url);\n\t\t}",
"protected boolean isTraced(HttpServletRequest httpServletRequest) {\n if (skipPattern != null) {\n int contextLength =\n httpServletRequest.getContextPath() == null\n ? 0\n : httpServletRequest.getContextPath().length();\n String url = httpServletRequest.getRequestURI().substring(contextLength);\n return !skipPattern.matcher(url).matches();\n }\n\n return true;\n }",
"void redirect(Reagent reagent);",
"private boolean isValidLoginResponse(Response response) {\n\t\treturn response.header(\"Location\").toLowerCase().contains(\"testsession\");\r\n\t}",
"@Override\n\tpublic boolean matches(HttpServletRequest request) {\n\t\treturn !orRequestMatcher.matches(request);\n\t}",
"public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception {\n HttpSession session = request.getSession();\n try {\n //判断该session是否在线,若不在线则强制重定向到错误页面,若存在,则放过\n boolean Result=SessionListener.isOnline(session);\n if(Result==false){\n System.out.println(\"拦截后进入登录页面\");\n String url=request.getContextPath()+\"/Login\";\n response.sendRedirect(url);\n return false;\n }else{\n return true;\n }\n } catch (Exception e) {\n String url=request.getContextPath()+\"/error.jsp\";\n response.sendRedirect(url);\n return false;\n }\n }",
"boolean hasLoginRequest();",
"public void setRedirect(String redirect) {\r\n\t\tthis.redirect = redirect;\r\n\t}",
"public boolean hasRequest() {\n return request_ != null;\n }",
"public boolean hasRequest() {\n return request_ != null;\n }",
"public boolean hasRequest() {\n return request_ != null;\n }",
"public Optional<String> redirectLocation() {\n return header(LOCATION);\n }",
"public String getRedirectUrl() {\n return this.redirectUrl;\n }",
"public boolean isMine(HttpServletRequest request) {\r\n String path = request.getPathInfo();\r\n return path.startsWith(\"/thredds/obis/\");\r\n }",
"public Boolean checkAJAX(HttpServletRequest request) {\n\t\tBoolean flgXhr = false;\n\t\tString strXhr = (String) request.getHeader(\"X-Requested-With\");\n\t\tif (strXhr == null) {\n\t\t\tstrXhr = (String) request.getAttribute(\"xhr\");\n\t\t\tif (strXhr == null || !strXhr.equalsIgnoreCase(\"true\"))\n\t\t\t\tstrXhr = null;\n\t\t}\n\t\tflgXhr = (strXhr != null && !strXhr.equals(\"com.android.browser\"));\n\t\treturn (flgXhr);\n\t}",
"boolean hasHadithUrl();",
"private boolean firstTimeVisiting(HttpServletRequest request)\n throws ServletException, IOException {\n return request.getParameter(\"title\") == null || request.getParameter(\"body\") == null ||\n request.getParameter(\"tags\") == null;\n }",
"@Test\n public void testRequireOnTrueConditionOnInternalCondition() {\n Address redirectContract = deployRedirectContract();\n TransactionResult result = callRedirectContract(redirectContract, true);\n\n // If redirect condition is SUCCESS then its internal call was also SUCCESS.\n assertTrue(result.transactionStatus.isSuccess());\n }",
"boolean isForwarding();",
"@java.lang.Override\n public boolean hasHttpRequest() {\n return httpRequest_ != null;\n }",
"public void checkRedirect(String url){\n if (url.contains(\"?attredirects=0\")){\n String new_url = url.replaceAll(\"\\\\battredirects=0\\\\b\", \"\");\n images.set(current_image, new_url);\n }\n }",
"private boolean sendHTTPRedirectMessage(String location,\n String gapCookie, String locationCookie)\n {\n HTTPRespHdr resp = _httpRespHdr;\n\n /*\n * Create a reply with a 307 (HTTP/1.1) or 302 reply code.\n */\n if (_req.requestHdr.getVersionNumber() == 1.0) {\n _req.responseStatus = 302;\n\n resp.init( \"HTTP/1.0\", 302, \"Moved Temporarily\" );\n resp.addHeader( \"Location\", location );\n resp.addHeader( \"Content-Type\", \"text/html\" );\n }\n else {\n _req.responseStatus = 307;\n\n resp.init( \"HTTP/1.1\", 307, \"Temporary Redirect\" );\n\t \n /*\n * Put Location: right after status line so hopefully the stupid\n * Mozilla 0.6 will read it correctly (apparently it can't deal\n * with a response that is not delivered to it in a single\n * read() on the TCP socket).\n */\n resp.addHeader( \"Location\", location );\n\n resp.addHeader(\"Server\", GlobeRedirector.SERVER_NAME);\n setCurrentDate(_date);\n resp.addHeader(\"Date\", _httpDateFormatter.format(_date));\n resp.addHeader( \"Content-Type\", \"text/html\" );\n\n /*\n * 307 responses are not cachable by default, so we add an Expires:\n * header to have it cached for a while.\n */\n setExpiresDate(_date, 1000 * _config.getHTTPExpires());\n resp.addHeader(\"Expires\", _httpDateFormatter.format(_date));\n\n // Netscape Enterprise puts location here\n // resp.addHeader( \"Location\", location );\n\n resp.addHeader( \"Connection\", \"close\" );\n }\n\n if (gapCookie != null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"writing GAP cookie: \" + gapCookie);\n }\n resp.addHeader(\"Set-Cookie\", gapCookie);\n }\n\n if (locationCookie != null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"writing location cookie: \" + locationCookie);\n }\n resp.addHeader(\"Set-Cookie\", locationCookie);\n }\n\n // both 1.0 and 1.1 want a little message just in case\n String body = null;\n if (!_req.requestHdr.getMethod().toUpperCase().equals( \"HEAD\" )) {\n // message for ancient browsers\n\n // reset string buffer\n _strBuf.setLength(0);\n _strBuf.append(\"<HEAD><TITLE>Temporary Redirect</TITLE></HEAD>\\n\"\n + \"<BODY><H1> Temporary Redirect </H1>\\n\"\n + \"You are being redirected to <A HREF=\\\"\");\n _strBuf.append(location);\n _strBuf.append(\"\\\">\");\n _strBuf.append(location);\n _strBuf.append(\"</A>.</BODY>\");\n body = _strBuf.toString();\n }\n\n try {\n DataOutputStream cliOut = _req.connection.getOutputStream();\n\n resp.write(cliOut);\n if (body != null) {\n cliOut.write( body.getBytes() );\n _req.bytesSent = body.length();\n }\n else {\n _req.bytesSent = 0;\n }\n cliOut.flush();\n return true;\n }\n catch( IOException e ) {\n logError(\"Cannot send HTTP redirect message\" + getExceptionMessage(e));\n return false;\n }\n }",
"boolean hasUrl();",
"boolean hasUrl();",
"boolean hasUrl();",
"boolean hasUrl();",
"boolean hasUrl();",
"boolean isValid()\n {\n return isRequest() && isResponse();\n }",
"protected boolean checkSsl(ActionMapping mapping,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\r\n\t\tString redirectString = SslUtil.getRedirectString(request, getServlet()\r\n\t\t\t\t.getServletContext(), SECURE.equals(mapping.getParameter()));\r\n\r\n\t\tif (redirectString != null) {\r\n\t\t\tlog.debug(\"protocol switch needed, redirecting...\");\r\n\r\n\t\t\ttry {\r\n\t\t\t\t// Redirect the page to the desired URL\r\n\t\t\t\tresponse.sendRedirect(response\r\n\t\t\t\t\t\t.encodeRedirectURL(redirectString));\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t} catch (Exception ioe) {\r\n\t\t\t\tlog.error(\"redirect to new protocol failed...\");\r\n\r\n\t\t\t\t// Handle appropriately\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean shouldHandle(String requestUri) {\n\t\tif (requestUri.startsWith(this.requestStart)) {\n\t\t\tthis.eventListener.log(InternationalisationUtils.getI18nString(I18N_PROCESSING_REQUEST, requestUri.toString()));\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private boolean isPageRestorable(HttpServletRequest request)\n\t{\n\t\tif (RequestHelper.TITLE_PANEL.equals(request\n\t\t\t\t.getParameter(RequestHelper.PANEL))) return false;\n\n\t\tif (WikiPageAction.PUBLICVIEW_ACTION.getName().equals(\n\t\t\t\trequest.getParameter(RequestHelper.ACTION))) return false;\n\n\t\t\n\t\tif (\"GET\".equalsIgnoreCase(request.getMethod())) return true;\n\n\t\treturn false;\n\t}",
"private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}",
"protected boolean isApplicable(SPRequest req) {\n\n Log.debug(\"isApplicable ? \" + req.getPath() + \" vs \" + getRoute());\n\n if (!req.getMethod().equals(getHttpMethod()))\n return false;\n\n String[] uri = req.getSplitUri();\n String[] tok = splitPath;\n if (uri.length != tok.length && splatIndex == -1)\n return false;\n\n if (uri.length <= splatIndex)\n return false;\n\n for (int i = 0; i < tok.length; i++) {\n if (tok[i].charAt(0) != ':' && tok[i].charAt(0) != '*' && !tok[i].equals(uri[i]))\n return false;\n }\n\n return true;\n }",
"public boolean isRequest(){\n return false;\n }",
"public boolean onAuthErrorOccured(Request<E> request);",
"public static boolean isConnect(HttpServletRequest argRequest) {\r\n\t\treturn HttpConstants.CONNECT.equalsIgnoreCase(argRequest.getMethod());\r\n\t}",
"@Test\n\tpublic void testSendRedirect_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\t\tString targetUrl = \"\";\n\t\tboolean http10Compatible = false;\n\n\t\tfixture.sendRedirect(request, response, targetUrl, http10Compatible);\n\n\t\t// add additional test code here\n\t}",
"public URI getRedirectURI() {\n return redirectURI;\n }",
"protected boolean isHeadRequest(ActionInvocation actionInvocation) {\n return actionInvocation.method != null && HTTPMethod.HEAD.is(actionInvocation.method.httpMethod);\n }",
"boolean hasRoute();",
"private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }",
"public FrontDoorRedirectType redirectType() {\n return this.redirectType;\n }",
"public String getRedirectUrl() {\n return redirectUrl;\n }",
"public boolean followRedirects(boolean followRedirects){\n return false; //TODO codavaj!!\n }",
"public boolean canHandle(HttpServletRequest request) {\n if (log.isDebugEnabled()) {\n log.debug(\"Inside Token2Authenticator canHandle method\");\n }\n return StringUtils.isNotEmpty(request.getParameter(Token2Constants.CODE));\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n boolean isPost = (boolean) request.getSession().getAttribute(\"isPost\");\n\n response.sendRedirect(\"signin.jsp\");\n\n }",
"private boolean isPubicRequest(String requestURI) {\n\n String ctxPath = servletContext.getContextPath();\n for (String req : PUBLIC_ACCEPTED_URL) {\n if (requestURI.startsWith(ctxPath + req)) {\n return true;\n }\n }\n\n if (profileActive.equals(LOCAL) || profileActive.equals(DEV)) {\n List<String> swaggerUriAccepted = List.of(\n \"/configuration/ui\",\n \"/swagger-resources\",\n \"/configuration/security\",\n \"/swagger-ui.html\",\n \"/v2/api-docs\",\n \"/webjars\",\n \"/images\"\n );\n for (String req : swaggerUriAccepted) {\n if (requestURI.startsWith(ctxPath + req)) {\n return true;\n }\n }\n }\n return false;\n\n }",
"@Test\n\tpublic void testSendRedirect_2()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\t\tString targetUrl = \"\";\n\t\tboolean http10Compatible = true;\n\n\t\tfixture.sendRedirect(request, response, targetUrl, http10Compatible);\n\n\t\t// add additional test code here\n\t}",
"protected boolean isPublicRequest(@NonNull final HttpServletRequest request)\n\t{\n\t\tboolean isPublicRequest = false;\n\t\tString path = getPath(request);\n\t\tif (isPublicPath(path) || isSigninPath(path))\n\t\t{\n\t\t\tisPublicRequest = true;\n\t\t}\n\t\treturn isPublicRequest;\n\t}",
"public String redirectUrl() {\n return this.redirectUrl;\n }",
"private boolean isRetryNeeded(int statusCode, HttpState state, HttpConnection conn) {\n switch (statusCode) {\n case HttpStatus.SC_UNAUTHORIZED:\n case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:\n LOG.debug(\"Authorization required\");\n if (doAuthentication) { //process authentication response\n //if the authentication is successful, return the statusCode\n //otherwise, drop through the switch and try again.\n if (processAuthenticationResponse(state, conn)) {\n return false;\n }\n } else { //let the client handle the authenticaiton\n return false;\n }\n break;\n\n case HttpStatus.SC_MOVED_TEMPORARILY:\n case HttpStatus.SC_MOVED_PERMANENTLY:\n case HttpStatus.SC_SEE_OTHER:\n case HttpStatus.SC_TEMPORARY_REDIRECT:\n LOG.debug(\"Redirect required\");\n\n if (!processRedirectResponse(conn)) {\n return false;\n }\n break;\n\n default:\n // neither an unauthorized nor a redirect response\n return false;\n } //end of switch\n\n return true;\n }",
"@Test\n public void redirectInfinite303And307() throws Exception {\n final Map<String, Class<? extends Servlet>> servlets = new HashMap<String, Class<? extends Servlet>>();\n servlets.put(RedirectServlet307.URL, RedirectServlet307.class);\n servlets.put(RedirectServlet303.URL, RedirectServlet303.class);\n startWebServer(\"./\", new String[0], servlets);\n\n final WebClient client = getWebClient();\n\n try {\n client.getPage(\"http://localhost:\" + PORT + RedirectServlet307.URL);\n }\n catch (final Exception e) {\n assertTrue(e.getMessage(), e.getMessage().contains(\"Too much redirect\"));\n }\n }",
"private void handle(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException {\n\t\tString targetUrl = \"/\";\r\n\t\t\r\n\t\tif(response.isCommitted()){\r\n\t\t\t//Response has already been committed. Unable to redirect to \" + url\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tredirectStrategy.sendRedirect(request, response, targetUrl);\r\n\t}"
] | [
"0.7724539",
"0.7720949",
"0.75871396",
"0.7539549",
"0.7186285",
"0.7102728",
"0.7101214",
"0.6995431",
"0.6719359",
"0.651093",
"0.64703923",
"0.615984",
"0.6086953",
"0.60814875",
"0.6078687",
"0.6010962",
"0.5922289",
"0.59053785",
"0.58976924",
"0.588356",
"0.588356",
"0.588356",
"0.588356",
"0.588356",
"0.588356",
"0.588356",
"0.588356",
"0.588356",
"0.588356",
"0.5873051",
"0.5870215",
"0.5838947",
"0.583856",
"0.57962996",
"0.57921773",
"0.5771267",
"0.57218593",
"0.57180357",
"0.5700601",
"0.5674132",
"0.56728715",
"0.5638318",
"0.5634311",
"0.5626721",
"0.56110626",
"0.5606564",
"0.56030303",
"0.5587974",
"0.5578754",
"0.55706227",
"0.55616355",
"0.5554096",
"0.55473685",
"0.5543668",
"0.5504631",
"0.54879236",
"0.54879236",
"0.54879236",
"0.5485592",
"0.5484906",
"0.5482289",
"0.54729176",
"0.54608864",
"0.54581493",
"0.54491615",
"0.54402715",
"0.5438799",
"0.5405055",
"0.53985804",
"0.53962463",
"0.53962463",
"0.53962463",
"0.53962463",
"0.53962463",
"0.53950536",
"0.5388927",
"0.53879434",
"0.53832054",
"0.5371546",
"0.5364694",
"0.5331969",
"0.53201616",
"0.5302822",
"0.53001493",
"0.5290307",
"0.52889824",
"0.5281629",
"0.5276128",
"0.5276056",
"0.52753466",
"0.5274786",
"0.5272611",
"0.52557796",
"0.524752",
"0.524369",
"0.5237179",
"0.5235175",
"0.522853",
"0.5224904",
"0.5211521"
] | 0.74049705 | 4 |
get the final URL location if request is a redirect | private String getRedirectURL(String sHTTPRequest) {
return sRedirects.get(sHTTPRequest);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected String getRedirectUri(HttpServletRequest req)\r\n\t\t\tthrows ServletException, IOException {\n\t\treturn Utils.getRedirectUri(req);\r\n\t}",
"public Optional<String> redirectLocation() {\n return header(LOCATION);\n }",
"public String getRedirect() {\r\n\t\treturn this.redirect;\r\n\t}",
"String getRequestedUrl();",
"protected String getFinalURL(HttpServletRequest request, HttpServletResponse response,\r\n\t\t\tRedirectRule rule, String targetURL) {\r\n\r\n\t\tString finalURL = getAbsoluteURL(request, targetURL);\r\n\t\tif ((rule instanceof RedirectAction) && ((RedirectAction)rule).encodeUrl == true)\r\n\t\t\tfinalURL = response.encodeRedirectURL(finalURL);\r\n\r\n\t\treturn finalURL;\r\n\t}",
"public URL getRedirectURL() {\r\n return redirectURL;\r\n }",
"public static final String lastVisitUrl(HttpServletRequest req) {\n String lastVisitUrl = req.getRequestURI();\n if (req.getQueryString() != null) {\n lastVisitUrl += \"?\" + req.getQueryString();\n }\n return lastVisitUrl;\n }",
"public String getRedirectUrl() {\n return this.redirectUrl;\n }",
"public String redirectUrl() {\n return this.redirectUrl;\n }",
"public abstract String redirectTo();",
"public String getRedirectUrl() {\n return redirectUrl;\n }",
"public URI getRedirectURI() {\n return redirectURI;\n }",
"protected String calculateRedirectUrl(HttpServletRequest request, String contextPath, String url) {\r\n\t\tif (UrlUtils.isAbsoluteUrl(url)) {\r\n\t\t\treturn url;\r\n\t\t}\r\n\r\n\t\tif (!url.startsWith(\"/\")) {\r\n\t\t\turl = \"/\" + url;\r\n\t\t}\r\n\r\n\t\tint serverPort = portResolver.getServerPort(request);\r\n\t\tString scheme = request.getScheme();\r\n\r\n\t\tRedirectUrlBuilder urlBuilder = new RedirectUrlBuilder();\r\n\t\turlBuilder.setScheme(scheme);\r\n\t\turlBuilder.setPort(serverPort);\r\n\t\turlBuilder.setServerName(request.getServerName());\r\n\t\turlBuilder.setContextPath(request.getContextPath());\r\n\t\turlBuilder.setPathInfo(url);\r\n\r\n\t\tif (forceHttps && \"http\".equals(scheme)) {\r\n\t\t\tInteger httpsPort = portMapper.lookupHttpsPort(Integer.valueOf(serverPort));\r\n\t\t\tif (httpsPort != null) {\r\n\t\t\t\turlBuilder.setScheme(\"https\");\r\n\t\t\t\turlBuilder.setPort(httpsPort.intValue());\r\n\t\t\t} else {\r\n\t\t\t\tlog.warn(\"Unable to redirect to HTTPS as no port mapping found for HTTP port \" + serverPort);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn urlBuilder.getUrl();\r\n\t}",
"private LastRedirectionTarget lastRedirectionTarget(BaseContext current) {\n if (null == current.getLastRedirection()) {\n return null;\n }\n\n LastRedirectionTarget target = current.getLastRedirection();\n target.setRequestScoped(current.getRequestScoped());\n return target;\n }",
"public static String returnUrlRedirect(String url) {\r\n\t\treturn url + Constants.REDIRECT;\r\n\t}",
"public static String getURLRedirect(){\n\t\treturn \"https://54.247.74.173:8443\";\r\n\t}",
"@Override\n\t\t\t\t\tpublic HttpUriRequest getRedirect(HttpRequest request, HttpResponse response, HttpContext context)\n\t\t\t\t\t\t\tthrows ProtocolException {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}",
"static public String getURI(HttpServletRequest request){\r\n\t\treturn request.getRequestURI();\r\n\t}",
"protected String getSuccessRedirectUrl(String redirectUrl, User user, CookieBuilder cookie) {\n return redirectUrl;\n }",
"String getRequestURL();",
"@Override\n\tpublic final boolean isRedirect()\n\t{\n\t\treturn redirect;\n\t}",
"@Override\r\n\tpublic boolean isRedirect() {\n\t\treturn false;\r\n\t}",
"public URL getServerLocation() {\n return serverLocation;\n }",
"private RedirectUrls getRedirectUrls() {\n\t\tRedirectUrls redirectUrls = new RedirectUrls();\n\t\tredirectUrls.setCancelUrl(\"http://localhost:8080/SE2-Ecommerce_WebProject/\");\n\t\tredirectUrls.setReturnUrl(\"http://localhost:8080/SE2-Ecommerce_WebProject/customer/review_payment\");\n\t\treturn redirectUrls;\n\n\t}",
"public static String redirectUrl(String page) {\n\t\treturn \"redirect:\" + formUrl(page);\n\t}",
"public String determineURL(HttpServletRequest request)\n {\n String url = \"http://\"+request.getHeader(\"host\")+request.getContextPath()+\"/omserver\";\n return url;\n }",
"public final static String getFullRequestUrl(final HttpServletRequest req) {\n return req.getRequestURL().toString() + (StringUtils.hasText(req.getQueryString()) ? \"?\"+req.getQueryString() : \"\");\n }",
"public abstract void redirect(String url) throws IOException;",
"boolean isFollowRedirect();",
"URI getLocation();",
"protected abstract void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder);",
"protected abstract void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder);",
"public String getCorrectURL() {\n\t\treturn defineCorrectURL(); \t\r\n\t}",
"private boolean isRedirect(String sHTTPRequest) {\n return sRedirects.containsKey(sHTTPRequest);\n }",
"@Override\n public String encodeRedirectURL(String arg0) {\n return null;\n }",
"@Override\n public String encodeRedirectUrl(String arg0) {\n return null;\n }",
"@Override\n public StringBuffer getRequestURL() {\n //StringBuffer requestURL = super.getRequestURL();\n //System.out.println(\"URL: \" + requestURL.toString());\n return this.requestURL;\n }",
"public final String getFollowRedirects() {\n return properties.get(FOLLOW_REDIRECTS_PROPERTY);\n }",
"private String getDemande(HttpServletRequest request) {\n String demande = \"\";\n demande = request.getRequestURI();\n demande = demande.substring(demande.lastIndexOf(\"/\") + 1);\n return demande;\n }",
"private boolean processRedirectResponse(HttpConnection conn) {\n\n if (!getFollowRedirects()) {\n LOG.info(\"Redirect requested but followRedirects is \"\n + \"disabled\");\n return false;\n }\n\n //get the location header to find out where to redirect to\n Header locationHeader = getResponseHeader(\"location\");\n if (locationHeader == null) {\n // got a redirect response, but no location header\n LOG.error(\"Received redirect response \" + getStatusCode()\n + \" but no location header\");\n return false;\n }\n String location = locationHeader.getValue();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirect requested to location '\" + location\n + \"'\");\n }\n\n //rfc2616 demands the location value be a complete URI\n //Location = \"Location\" \":\" absoluteURI\n URI redirectUri = null;\n URI currentUri = null;\n\n try {\n currentUri = new URI(\n conn.getProtocol().getScheme(),\n null,\n conn.getHost(), \n conn.getPort(), \n this.getPath()\n );\n redirectUri = new URI(location.toCharArray());\n if (redirectUri.isRelativeURI()) {\n if (isStrictMode()) {\n LOG.warn(\"Redirected location '\" + location \n + \"' is not acceptable in strict mode\");\n return false;\n } else { \n //location is incomplete, use current values for defaults\n LOG.debug(\"Redirect URI is not absolute - parsing as relative\");\n redirectUri = new URI(currentUri, redirectUri);\n }\n }\n } catch (URIException e) {\n LOG.warn(\"Redirected location '\" + location + \"' is malformed\");\n return false;\n }\n\n //check for redirect to a different protocol, host or port\n try {\n checkValidRedirect(currentUri, redirectUri);\n } catch (HttpException ex) {\n //LOG the error and let the client handle the redirect\n LOG.warn(ex.getMessage());\n return false;\n }\n\n //invalidate the list of authentication attempts\n this.realms.clear();\n //remove exisitng authentication headers\n removeRequestHeader(HttpAuthenticator.WWW_AUTH_RESP); \n //update the current location with the redirect location.\n //avoiding use of URL.getPath() and URL.getQuery() to keep\n //jdk1.2 comliance.\n setPath(redirectUri.getEscapedPath());\n setQueryString(redirectUri.getEscapedQuery());\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirecting from '\" + currentUri.getEscapedURI()\n + \"' to '\" + redirectUri.getEscapedURI());\n }\n\n return true;\n }",
"protected String getBaseUrl(HttpServletRequest request) {\n\t\tString retVal = \"\";\n\t\tif (request != null && request.getRequestURL() != null) {\n\t\t\tStringBuffer url = request.getRequestURL();\n\t\t\tString uri = request.getRequestURI();\n\t\t\t\n\t\t\tretVal = url.substring(0, url.length() - uri.length());\n\t\t}\n\t\t\n\t\treturn retVal;\n\t}",
"public void sendRedirect(String location) throws IOException {\n\t\tString finalurl = null;\n\n\t\tif (isUrlAbsolute(location)) {\n\t\t\t//Log.trace(\"This url is absolute. No scheme changes will be attempted\");\n\t\t\t//Log.info(\"This url is absolute. No scheme changes will be attempted\");\n\t\t\tfinalurl = location;\n\t\t} else {\n\t\t\tfinalurl = fixForScheme(prefix + location);\n\t\t\t//Log.trace(\"Going to absolute url:\" + finalurl);\n\t\t\t//Log.info(\"Going to absolute url:\" + finalurl);\n\t\t}\n\t\tsuper.sendRedirect(finalurl);\n\t}",
"public URL getLocation() {\n return location;\n }",
"String getQueryRequestUrl();",
"public URI getLocation()\r\n/* 293: */ {\r\n/* 294:441 */ String value = getFirst(\"Location\");\r\n/* 295:442 */ return value != null ? URI.create(value) : null;\r\n/* 296: */ }",
"void redirect();",
"public boolean isRedirect() {\n switch (code) {\n case HTTP_PERM_REDIRECT:\n case HTTP_TEMP_REDIRECT:\n case HTTP_MULT_CHOICE:\n case HTTP_MOVED_PERM:\n case HTTP_MOVED_TEMP:\n case HTTP_SEE_OTHER:\n return true;\n default:\n return false;\n }\n }",
"private RedirectUrls getRedirectURLs() {\n RedirectUrls redirectUrls = new RedirectUrls();\n redirectUrls.setReturnUrl(URL_RETURN);\n redirectUrls.setCancelUrl(URL_CANCEL);\n\n return redirectUrls;\n }",
"protected HTTPSampleResult followRedirects(HTTPSampleResult res, int frameDepth) {\n HTTPSampleResult totalRes = new HTTPSampleResult(res);\n totalRes.addRawSubResult(res);\n HTTPSampleResult lastRes = res;\n \n int redirect;\n for (redirect = 0; redirect < MAX_REDIRECTS; redirect++) {\n boolean invalidRedirectUrl = false;\n String location = lastRes.getRedirectLocation();\n if (log.isDebugEnabled()) {\n log.debug(\"Initial location: \" + location);\n }\n if (REMOVESLASHDOTDOT) {\n location = ConversionUtils.removeSlashDotDot(location);\n }\n // Browsers seem to tolerate Location headers with spaces,\n // replacing them automatically with %20. We want to emulate\n // this behaviour.\n location = encodeSpaces(location);\n if (log.isDebugEnabled()) {\n log.debug(\"Location after /. and space transforms: \" + location);\n }\n // Change all but HEAD into GET (Bug 55450)\n String method = lastRes.getHTTPMethod();\n method = computeMethodForRedirect(method, res.getResponseCode());\n \n try {\n URL url = ConversionUtils.makeRelativeURL(lastRes.getURL(), location);\n url = ConversionUtils.sanitizeUrl(url).toURL();\n if (log.isDebugEnabled()) {\n log.debug(\"Location as URL: \" + url.toString());\n }\n HTTPSampleResult tempRes = sample(url, method, true, frameDepth);\n if (tempRes != null) {\n lastRes = tempRes;\n } else {\n // Last url was in cache so tempRes is null\n break;\n }\n } catch (MalformedURLException | URISyntaxException e) {\n errorResult(e, lastRes);\n // The redirect URL we got was not a valid URL\n invalidRedirectUrl = true;\n }\n if (lastRes.getSubResults() != null && lastRes.getSubResults().length > 0) {\n SampleResult[] subs = lastRes.getSubResults();\n for (SampleResult sub : subs) {\n totalRes.addSubResult(sub);\n }\n } else {\n // Only add sample if it is a sample of valid url redirect, i.e. that\n // we have actually sampled the URL\n if (!invalidRedirectUrl) {\n totalRes.addSubResult(lastRes);\n }\n }\n \n if (!lastRes.isRedirect()) {\n break;\n }\n }\n if (redirect >= MAX_REDIRECTS) {\n lastRes = errorResult(new IOException(\"Exceeded maximum number of redirects: \" + MAX_REDIRECTS), new HTTPSampleResult(lastRes));\n totalRes.addSubResult(lastRes);\n }\n \n // Now populate the any totalRes fields that need to\n // come from lastRes:\n totalRes.setSampleLabel(totalRes.getSampleLabel() + \"->\" + lastRes.getSampleLabel());\n // The following three can be discussed: should they be from the\n // first request or from the final one? I chose to do it this way\n // because that's what browsers do: they show the final URL of the\n // redirect chain in the location field.\n totalRes.setURL(lastRes.getURL());\n totalRes.setHTTPMethod(lastRes.getHTTPMethod());\n totalRes.setQueryString(lastRes.getQueryString());\n totalRes.setRequestHeaders(lastRes.getRequestHeaders());\n \n totalRes.setResponseData(lastRes.getResponseData());\n totalRes.setResponseCode(lastRes.getResponseCode());\n totalRes.setSuccessful(lastRes.isSuccessful());\n totalRes.setResponseMessage(lastRes.getResponseMessage());\n totalRes.setDataType(lastRes.getDataType());\n totalRes.setResponseHeaders(lastRes.getResponseHeaders());\n totalRes.setContentType(lastRes.getContentType());\n totalRes.setDataEncoding(lastRes.getDataEncodingNoDefault());\n return totalRes;\n }",
"public String encodeRedirectURL(String s) {\n\t\treturn null;\n\t}",
"static String getBase(HttpServletRequest request) {\n String fullPath = request.getRequestURI();\n int baseEnd = getDividingIndex(fullPath);\n return fullPath.substring(0, baseEnd + 1);\n }",
"public String encodeRedirectUrl(String s) {\n\t\treturn null;\n\t}",
"private String fetchUrl() {\n\t\tString url;\n\t\tint depth;\n\t\tdo\n\t\t{\n\t\t\tLandingPage lp = this.pagesToVisit.remove(0);\n\t\t\turl = lp.getUrl();\n\t\t\tdepth = lp.getDepth();\n\t\t\t\n\t\t}while(this.pagesVisited.containsKey(url) || !(isvalidURL(url)));\n\t\tthis.pagesVisited.put(url,depth);\n\t\treturn url;\n\t}",
"private String getHref(HttpServletRequest request)\n {\n String respath = request.getRequestURI();\n if (respath == null)\n \trespath = \"\";\n String codebaseParam = getRequestParam(request, CODEBASE, null);\n int idx = respath.lastIndexOf('/');\n if (codebaseParam != null)\n if (respath.indexOf(codebaseParam) != -1)\n idx = respath.indexOf(codebaseParam) + codebaseParam.length() - 1;\n String href = respath.substring(idx + 1); // Exclude /\n href = href + '?' + request.getQueryString();\n return href;\n }",
"@Override\n\tpublic String encodeRedirectURL(String url) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String encodeRedirectUrl(String url) {\n\t\treturn null;\n\t}",
"private String getFinalReturnAddress() \n\t{\n\t\treturn pageContext.getRequest().getParameter(FINISHED_ADDRESS_PARAMETER);\n\t}",
"private static void checkForRedirection(Connection conn) {\n JSONObject bestServer = ServerManager.getLowestLoadServer();\n if (bestServer != null && bestServer.get(\"id\") != Settings.getServerId()) {\n Message.sendRedirect(conn, (String) bestServer.get(\"hostname\"), (int) bestServer.get(\"port\"));\n }\n }",
"public int getOlddirection() {\n return olddirection;\n }",
"public int getMaxRedirects()\n {\n return _maxRedirects;\n }",
"private String getURL() {\n String url = profileLocation.getText().toString();\n if (url == null || url.length() == 0) {\n return url;\n }\n // if it's not the last (which should be \"Raw\") choice, we'll use the prefix\n if (!url.contains(\"://\")) { // if there is no (http|jr):// prefix, we'll assume it's a http://bit.ly/ URL\n url = \"http://bit.ly/\" + url;\n }\n return url;\n }",
"void sendRedirect(HttpServletResponse response, String location) throws AccessControlException, IOException;",
"@Override\n\tpublic void sendRedirect(String location) throws IOException {\n\t}",
"void redirect(Reagent reagent);",
"public void setRedirect(String redirect) {\r\n\t\tthis.redirect = redirect;\r\n\t}",
"public com.mgipaypal.ac1211.client.RedirectInfo getRedirectInfo() {\r\n return redirectInfo;\r\n }",
"public java.lang.Boolean getRedirectIndicator() {\r\n return redirectIndicator;\r\n }",
"@RequestMapping(value = \"/redirect\")\n\tpublic String redirect() {\n\t\treturn \"redirect:apply\";\n\t}",
"private static synchronized boolean isRedirection(\n HttpServletRequest request,\n HttpServletResponse response)\n {\n logger.debug(\"+\");\n if(redirections == null) {\n redirections = new Properties();\n if(Env.getGlobalProperty(\"redirections\") != null) {\n try {\n redirections.load(\n new ByteArrayInputStream(\n Env.getGlobalProperty(\"redirections\").getBytes()));\n } catch (IOException e) {\n logger.error(\"IOException\", e);\n }\n StringBuffer redirInfo = new StringBuffer(\"DNS names - URLs:\");\n Enumeration e = redirections.keys();\n while(e.hasMoreElements()) {\n String key = (String) e.nextElement();\n redirInfo.append(\"\\r\\n\");\n redirInfo.append(key);\n redirInfo.append(\"=\");\n redirInfo.append(redirections.get(key));\n }\n logger.info(redirInfo);\n }\n }\n if(redirections.get(request.getServerName()) != null) {\n try {\n response.sendRedirect(\n (String) redirections.get(request.getServerName()));\n } catch (IOException e) {\n logger.error(\"redirection failed\", e);\n }\n logger.debug(\"- redirection\");\n return true;\n }\n logger.debug(\"- not a redirection\");\n return false;\n }",
"public String getCurrUrl() {\n return driver.getCurrentUrl();\n }",
"@Override\n\t\t\t\t\tpublic boolean isRedirected(HttpRequest request, HttpResponse response, HttpContext context)\n\t\t\t\t\t\t\tthrows ProtocolException {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}",
"String getServerUrl();",
"protected String getRequestURI(HttpServletRequest request) {\r\n\t\t\r\n\t\tString uri = request.getRequestURI();\r\n\t\tString ctxPath = request.getContextPath();\r\n\r\n\t\tif (contextAware == true && uri.startsWith(ctxPath))\r\n\t\t\turi = uri.substring(ctxPath.length());\r\n\r\n\t\treturn uri;\r\n\t}",
"private SimpleUrlAuthenticationSuccessHandler getSuccessRedirectHandler() {\n\t\tsuccessRedirectHandler.setDefaultTargetUrl(getAppUrl() + DEFAULT_TARGET_URL);\n\t\treturn successRedirectHandler;\n\t}",
"public boolean isRedirect() {\r\n\r\n\t\tPattern pattern = Pattern.compile(\"#(.*)redirect(.*)\",\r\n\t\t\t\tPattern.CASE_INSENSITIVE);\r\n\t\tif (pattern.matcher(text).matches()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn false;\r\n\t}",
"boolean followRedirects() {\n return parseBoolean(get(FOLLOW_REDIRECTS), true);\n }",
"@Override\n @SuppressWarnings({ \"all\", \"deprecation\" })\n public String encodeRedirectUrl(String arg0) {\n\n return null;\n }",
"@Override\n public void sendRedirect(String arg0) throws IOException {\n\n }",
"private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }",
"private boolean redirectClient(String path)\n {\n URL url;\n String reqHost = _req.requestHdr.getHeader(\"Host\");\n String fullspec = \"http://\" + reqHost + path;\n String location = null;\n String gapAddress = null;\n boolean randomGAP = false;\n boolean haveValidGAPCookie = false;\n boolean haveValidLocationCookie = false;\n String s = null;\n\n InetAddress cliAddr = _req.connection.getSocket().getInetAddress();\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Got request from \" + cliAddr.toString() + \" \"\n + _req.requestHdr.getVersion() );\n }\n\n /*\n * Check if the client's host is blocked.\n */\n if (_blockList.isBlockedHost(cliAddr.getHostAddress())) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: your host is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n s = URIDecoder.decode(path);\n }\n catch(IllegalArgumentException e) {\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Format error: request contains an invalid escape sequence: \"\n + e.getMessage());\n return false;\n }\n\n /*\n * Check if the file requested is blocked.\n */\n if (_blockList.isBlockedFile(s)) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: the requested file is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n s = URIDecoder.decode(fullspec);\n }\n catch(IllegalArgumentException e) {\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Format error: request contains an invalid escape sequence: \"\n + e.getMessage());\n return false;\n }\n\n /*\n * Check if the URL requested is blocked.\n */\n if (_blockList.isBlockedURL(s)) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: the requested URL is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n url = new URL(fullspec);\n }\n catch( MalformedURLException e ) {\n logError(\"Unsupported request-URI: \" + fullspec);\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"unsupported request-URI\");\n return false;\n }\n\n String file = url.getFile();\n\n /*\n * Redirect the client to the default URL (if defined) if the\n * object name is absent.\n */\n if (file.equals(\"/\")) {\n s = _config.getDefaultURL();\n\n if (s != null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"no object name specified -- using default URL\");\n }\n\n return sendHTTPRedirectMessage(s, null, null);\n }\n }\n\n _cookieCoords = null;\n\n /*\n * If the client sent a redirector cookie, the cookie contains the\n * hostname and port number of the client's nearest GAP, and the\n * geographical coordinates associated with the client's IP address.\n */\n if (_config.getCookieEnabledFlag()) {\n HTTPCookie clientCookie = null;\n\n if ( (s = _req.requestHdr.getHeader(\"Cookie\")) != null) {\n try {\n _httpCookie.init(s);\n clientCookie = _httpCookie;\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed cookie: \" + e.getMessage());\n\n // CONTINUE - cookie will be replaced\n }\n\n if (clientCookie != null) {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie: \" + clientCookie.toString());\n }\n\n String gap = clientCookie.getAttribute(\n RedirectorCookieFactory.COOKIE_GAP_ATTRIB);\n\n /*\n * Set the nearest GAP to the GAP indicated by the cookie. If\n * the GAP address inside the cookie is invalid or if it does\n * not refer to a GAP, the cookie is discarded (and replaced).\n */\n if (gap != null) {\n HostAddress gapHost = null;\n\n try {\n gapHost = new HostAddress(gap);\n s = gapHost.toString();\n\n // Check if gapHost still refers to an active GAP.\n if (_gapList.get(s) != null) {\n gapAddress = s;\n haveValidGAPCookie = true;\n }\n }\n catch(UnknownHostException e) {\n logError(\"Unknown host in cookie: \" + gap);\n\n // CONTINUE - GAP cookie will be replaced\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed host address in cookie: \" + gap);\n\n // CONTINUE - GAP cookie will be replaced\n }\n }\n else {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie does not contain a \"\n + RedirectorCookieFactory.COOKIE_GAP_ATTRIB\n + \" attribute\");\n }\n }\n\n /*\n * If the cookie does not contain a valid nearest GAP attribute,\n * we may need the cookie's coordinates attribute to determine the\n * nearest GAP.\n */\n if (gapAddress == null) {\n s = clientCookie.getAttribute(\n RedirectorCookieFactory.COOKIE_COORDS_ATTRIB);\n\n if (s != null) {\n try {\n _cookieCoords = new FloatCoordinate(s);\n haveValidLocationCookie = true;\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed coordinates in cookie: \" + s);\n\n // CONTINUE - location cookie will be replaced\n }\n }\n else {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie does not contain a \"\n + RedirectorCookieFactory.COOKIE_COORDS_ATTRIB\n + \" attribute\");\n }\n }\n }\n }\n }\n }\n\n /*\n * If there is no (valid) GAP cookie, find the location of the nearest\n * GAP. Pick a random GAP if the nearest GAP could not be determined.\n */\n if (gapAddress == null) {\n GlobeAccessPointRecord gaprec;\n\n if ( (gaprec = findNearestGAP(cliAddr)) == null) {\n gaprec = getRandomGAP();\n randomGAP = true;\n }\n gapAddress = gaprec.hostport;\n\n // _cookieCoords set\n }\n\n String gapCookie = null, locationCookie = null;\n\n /*\n * Create the GAP cookie value if cookies are enabled and the client\n * does not have a (valid) GAP cookie. If a GAP cookie is created,\n * create a location cookie if the client doesn't have a valid one.\n */\n if (_config.getCookieEnabledFlag()) {\n if (! haveValidGAPCookie) {\n if (randomGAP) {\n setExpiresDate(_date, 1000 * RANDOM_GAP_COOKIE_TTL);\n }\n else {\n setExpiresDate(_date, 1000 * _config.getGAPCookieTTL());\n }\n\n gapCookie = _cookieFactory.getGAPValue(gapAddress, _date);\n\n if ( ! haveValidLocationCookie) {\n if (_cookieCoords != null) {\n setExpiresDate(_date, 1000 * _config.getLocationCookieTTL());\n locationCookie = _cookieFactory.getLocationValue(_cookieCoords,\n _date);\n }\n }\n }\n }\n\n /*\n * Send a reply to redirect the client to the nearest GAP.\n */\n if (_config.getHTTPRedirectFlag()) {\n return sendHTTPRedirectMessage(gapAddress, file,\n gapCookie, locationCookie);\n }\n else {\n return sendHTMLReloadPage(gapAddress, file,\n gapCookie, locationCookie);\n }\n }",
"public static String getRequestUri(HttpServletRequest request) {\n String uri = (String) request.getAttribute(FORWARD_REQUEST_URI_ATTRIBUTE);\n if (uri == null) {\n uri = (String) request.getAttribute(INCLUDE_REQUEST_URI_ATTRIBUTE);\n }\n if (uri == null) {\n uri = request.getRequestURI();\n }\n return normalize(decodeAndCleanUriString(request, uri));\n }",
"public String getUrl() {\n Deque<String> urlDeque = (Deque<String>) httpSession.getAttribute( SessionVariable.SESSION_URL_SCOPE );\n return urlDeque.pollFirst();\n }",
"public abstract boolean isRenderRedirect();",
"boolean followRedirects() {\n return parseBoolean(settings.get(FOLLOW_REDIRECTS), true);\n }",
"public String getLastViewedURL() {\n return mPreference.getString(\"LastViewedURL\", NULL_STRING);\n }",
"void onSuccessRedirection(Response object, int taskID);",
"public URL standardizeURL(URL startingURL);",
"public String getRequestUrl(){\n return this.requestUrl;\n }",
"public FrontDoorRedirectProtocol redirectProtocol() {\n return this.redirectProtocol;\n }",
"public String getCurrentUrlConfig() {\n String primary = AbstractConfigHandler.getPrimaryDataServer();\n if (primary == null) {\n logger.debug(\"No primary dataserver found\");\n urlUnset();\n return null;\n } else {\n String url = addressHandler.getHttpAddress(primary);\n if (url == null) {\n logger.debug(\"No url set for dataserver: \" + primary);\n urlUnset();\n return null;\n } else {\n return verifyHttpProcess(url);\n }\n }\n }",
"private static Result redirect(final Status status, final String location) {\n requireNonNull(location, \"A location is required.\");\n return with(status).header(\"location\", location);\n }",
"public Redirector getRedirector() {\n return this.redirector;\n }",
"public static String getRelativeRewriteUrl(String origUrl) {\n\n if (StringUtils.isBlank(origUrl)) {\n return null;\n }\n\n // rewrite after url\n StringBuffer rewriteUrl = new StringBuffer();\n\n //url action part\n String action = origUrl;\n\n //url params part\n String params = null;\n\n if (StringUtils.indexOf(origUrl, '?') != -1) {\n\n String[] urlFragments = StringUtils.split(origUrl, \"?\");\n\n action = urlFragments[0];\n\n if (urlFragments.length > 1) {\n params = urlFragments[1];\n }\n }\n\n //get the action urlmapping\n URLMapping urlMapping = getURLMappingByValue(action, URLMappingEnum.ACTION);\n\n if (urlMapping == null) {\n return origUrl;\n// rewriteUrl.append(action);\n// if (StringUtils.isNotBlank(params)) {\n//\n// rewriteUrl.append(\"?\");\n// rewriteUrl.append(getPrefixRewriteParams(params));\n// }\n } else if (StringUtils.equals(urlMapping.getSplitKey()[2], PREFIX_DEFINITION)) {\n\n rewriteUrl.append(\"/\");\n rewriteUrl.append(urlMapping.getSplitKey()[3]);\n\n if (StringUtils.isNotBlank(params)) {\n\n rewriteUrl.append(\"?\");\n rewriteUrl.append(getPrefixRewriteParams(params));\n }\n } else {\n\n rewriteUrl.append(\"/\");\n rewriteUrl.append(urlMapping.getSplitKey()[2]);\n if (StringUtils.isNotBlank(params)) {\n\n String result = getRewriteParams(params);\n\n if (!StringUtils.startsWith(result, \"?\")) {\n rewriteUrl.append(PARAM_SEPARATOR);\n }\n rewriteUrl.append(getRewriteParams(params));\n }\n }\n\n return rewriteUrl.toString();\n }",
"static String getHandler(HttpServletRequest request) {\n String requestURI = request.getRequestURI();\n return requestURI.substring(getDividingIndex(requestURI) + 1);\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\n\n System.out.println(\"Request URL :: \" + request.getRequestURL().toString()\n + \"End Time = \" + System.currentTimeMillis());\n }",
"public String getLookupPathForRequest(HttpServletRequest request) {\n\t\tif (this.alwaysUseFullPath) {\n\t\t\treturn getPathWithinApplication(request);\n\t\t}\n\t\t// Else, use path within current servlet mapping if applicable\n\t\tString rest = getPathWithinServletMapping(request);\n\t\tif (!\"\".equals(rest)) {\n\t\t\treturn rest;\n\t\t}\n\t\telse {\n\t\t\treturn getPathWithinApplication(request);\n\t\t}\n\t}",
"private String computeMethodForRedirect(String initialMethod, String responseCode) {\n if (!HTTPConstants.HEAD.equalsIgnoreCase(initialMethod)) {\n return HTTPConstants.GET;\n }\n return initialMethod;\n }",
"public String findRealUrl(String dataUrl) {\n Validate.notNull(dataUrl);\n RestTemplate restTemplate = new RestTemplate(new SimpleClientHttpRequestFactory() {\n @Override\n protected void prepareConnection(HttpURLConnection connection, String httpMethod) {\n connection.setInstanceFollowRedirects(false);\n }\n });\n ResponseEntity<String> result = restTemplate.exchange(dataUrl, HttpMethod.GET, new HttpEntity<String>(\"\"), String.class, new Object());\n String location = result.getHeaders().getLocation() == null ? \"\" : result.getHeaders().getLocation().toString();\n if (location != null) {\n location = StringUtils.replace(location, \"http://\", \"https://\");\n }\n return location;\n }",
"private static String getPath (HttpServletRequest request) {\n String path = request.getServletPath();\n return path != null ? path : request.getPathInfo();\n }",
"public static void main(String[] args) {\n String redirectUrl1 = DownloadUtil.getRedirectUrl(\"http://www.pc6.com/down.asp?id=68253\");\n String redirectUrl2 = DownloadUtil.getRedirectUrl(redirectUrl1);\n String redirectUrl3 = DownloadUtil.getRedirectUrl(redirectUrl2);\n System.out.println(redirectUrl1);\n System.out.println(redirectUrl2);\n System.out.println(redirectUrl3);\n }"
] | [
"0.7090773",
"0.702193",
"0.6789755",
"0.67723864",
"0.6751809",
"0.6709334",
"0.66184723",
"0.6475609",
"0.6459454",
"0.6382093",
"0.6374195",
"0.6279614",
"0.62408966",
"0.6232041",
"0.6165911",
"0.61559814",
"0.61325413",
"0.60450536",
"0.60066116",
"0.5871302",
"0.5857687",
"0.58331156",
"0.58264184",
"0.5783249",
"0.5734308",
"0.5709271",
"0.5707938",
"0.5691813",
"0.5681964",
"0.5645005",
"0.5643104",
"0.5643104",
"0.5605212",
"0.5595895",
"0.55828005",
"0.5581817",
"0.55722517",
"0.55646545",
"0.5552959",
"0.55524707",
"0.5551457",
"0.55478245",
"0.5544381",
"0.5531283",
"0.55267835",
"0.5518147",
"0.55115414",
"0.5484506",
"0.5470486",
"0.5447341",
"0.5393443",
"0.5381921",
"0.5380413",
"0.5379122",
"0.53702855",
"0.5364073",
"0.5355316",
"0.53512704",
"0.5345979",
"0.5343702",
"0.5338691",
"0.5338435",
"0.5332507",
"0.53192216",
"0.5316085",
"0.5300427",
"0.52886796",
"0.5287855",
"0.5275602",
"0.5273037",
"0.5270851",
"0.52605444",
"0.52574825",
"0.5254084",
"0.52268094",
"0.522547",
"0.5216565",
"0.52087075",
"0.5205217",
"0.51985437",
"0.5192205",
"0.5191436",
"0.5183438",
"0.515287",
"0.5151803",
"0.51382613",
"0.51372534",
"0.5128683",
"0.511562",
"0.51143146",
"0.5111117",
"0.51069736",
"0.51042527",
"0.50983894",
"0.50947523",
"0.5091732",
"0.50875765",
"0.5080112",
"0.506829",
"0.5067277"
] | 0.6737978 | 5 |
check if content type is supported | private boolean isValidContentType(String sHTTPRequest) {
String sFileType = getFileExtension(sHTTPRequest);
return Arrays.asList(SUPPORTED_FILE_TYPES).contains(sFileType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isContentTypeSupported(String contentType)\n {\n if(contentType.equals(DEFAULT_MIME_TYPE))\n return true;\n else if(contentType.equals(\"text/html\"))\n return true;\n else\n return false;\n }",
"boolean hasMimeType();",
"public boolean isSupported(MediaType mediaType);",
"boolean isSupportedType(String type) {\n // No bigBed support yet (but it's coming).\n if (type.startsWith(\"bigBed\")) {\n return false;\n }\n \n // No bigWig support yet (but it's coming).\n if (type.startsWith(\"bigWig\")) {\n return false;\n }\n \n // Actual data is contained in an external file, but the file is identified by a number, not a path.\n if (type.startsWith(\"wigMaf\")) {\n return false;\n }\n \n // We can probably the support BAM, but not implemented yet.\n if (type.equals(\"bam\")) {\n return false;\n }\n \n // Not one of our rejected types.\n return true;\n }",
"@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }",
"public boolean isContentTypeSupported(int mimeType) {\n // we only support plain text for chat rooms for now\n return (IMessage.ENCODE_PLAIN == mimeType);\n }",
"protected abstract MediaType getSupportedMediaType();",
"public boolean handles(String contentType, String packaging);",
"private void validateContentType(ODataRequest request) throws BatchDeserializerException {\n BatchParserCommon.parseContentType(request.getHeader(CONTENT_TYPE), ContentType.MULTIPART_MIXED, 0);\n }",
"public static boolean supportedType(String filePath) {\n\t\tif (filePath.startsWith(\"file:///system/\")) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean supported = false;\n\t\tString contentType = MIMETypeAssociations.getMIMEType(filePath);\n\t\t// Normalize and strip off parameters\n\t\tString normalizedContentType = MIMETypeAssociations\n\t\t\t\t.getNormalizedType(contentType);\n\t\tswitch (MIMETypeAssociations\n\t\t\t\t.getMediaTypeFromMIMEType(normalizedContentType)) {\n\t\tcase MIMETypeAssociations.MEDIA_TYPE_IMAGE:\n\t\t\t// case MIMETypeAssociations.MEDIA_TYPE_AUDIO:\n\t\t\t// case MIMETypeAssociations.MEDIA_TYPE_VIDEO:\n\t\t\tsupported = true;\n\t\t\tbreak;\n\t\t}\n\t\treturn supported;\n\t}",
"String getContentType();",
"String getContentType();",
"String getContentType();",
"public boolean isContentType()\n {\n return !hasChanges;\n }",
"public boolean handlesResource(ResourceType type) {\n String s = type.getMime();\n return (\"text/xhtml\".equals(s)) && (\"xml\".equals(type.getSubtype()));\n }",
"public String getContentType();",
"public String getContentType();",
"boolean isImageType();",
"public Integer getOptContentType() { return(content_type); }",
"public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }",
"private Boolean canHaveContent(){\n\t\t\treturn (getRequestType() == RequestType.POST || getRequestType() == RequestType.PUT);\n\t\t}",
"int getContentTypeValue();",
"public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }",
"public static boolean typeSupported(Object body) {\r\n final Class<?>[] knownTypes = new Class<?>[] {\r\n String.class,\r\n MessageAdapter.class,\r\n ca.uhn.hl7v2.model.Message.class,\r\n File.class,\r\n InputStream.class,\r\n java.nio.ByteBuffer.class,\r\n byte[].class,\r\n GenericFile.class\r\n };\r\n \r\n for(Class<?> type : knownTypes) {\r\n try {\r\n type.cast(body);\r\n return true;\r\n } catch (ClassCastException cce) {\r\n // nop\r\n }\r\n }\r\n \r\n return false;\r\n }",
"MimeType mediaType();",
"abstract ContentType getContnentType();",
"boolean supportsMimeMappings();",
"@Override\n protected boolean supports(Class<?> type) {\n return true;\n }",
"boolean supports(GenericType<? extends Source<?>> type, HttpClientResponse response);",
"public boolean isImplicitContentType() {\n return false;\n }",
"public String[] getContentTypes() {\n return new String[] { \"application/x-www-form-urlencoded\" };\n }",
"boolean isMultiPart();",
"public interface HttpMimeType {\n\n\t// Image\n \n public static final String APNG_IMAGE = \"image/apng\";\n \n public static final String BMP_IMAGE = \"image/bmp\";\n\n\tpublic static final String GIF_IMAGE = \"image/gif\";\n\t\n\tpublic static final String ICO_IMAGE = \"image/ico\";\n\n\tpublic static final String JPEG_IMAGE = \"image/jpeg\";\n\n\tpublic static final String JPG_IMAGE = \"image/jpg\";\n\n public static final String PNG_IMAGE = \"image/png\";\n\n\tpublic static final String SVG_IMAGE = \"image/svg+xml\";\n\n\tpublic static final String TIFF_IMAGE = \"image/tiff\";\n\t\n\tpublic static final String WEBP_IMAGE = \"image/webp\";\n\n\t// text formats\n\n\tpublic static final String TEXT_PLAIN = \"text/plain\";\n\n\tpublic static final String CSV = \"text/csv\";\n\n\tpublic static final String CSS = \"text/css\";\n\n\tpublic static final String HTML = \"text/html\";\n\n\tpublic static final String JAVASCRIPT = \"text/javascript\";\n\n\tpublic static final String RTF = \"text/rtf\";\n\n\tpublic static final String XML = \"text/xml\";\n\n\t// document formats\n\n\tpublic static final String JSON = \"application/json\";\n\n\tpublic static final String ATOM = \"application/atom+xml\";\n\n\tpublic static final String PDF = \"application/pdf\";\n\n\tpublic static final String POSTSCRIPT = \"application/postscript\";\n\n\tpublic static final String XLS = \"application/vnd.ms-excel\";\n\n\tpublic static final String XLSX = \"application/vnd.ms-excel\";\n\n\tpublic static final String PPT = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String PPTX = \"application/vnd.ms-powerpoint\";\n\n\tpublic static final String XPS = \"application/vnd.ms-xpsdocument\";\n\n\t// binary\n\n\tpublic static final String BINARY = \"application/octet-stream\";\n\n\t// music ones\n\n\tpublic static final String MP4_AUDIO = \"audio/mp4\";\n\n\tpublic static final String MP3_AUDIO = \"audio/mpeg\";\n\n\tpublic static final String OGG_VORBIS_AUDIO = \"audio/ogg\";\n\n\tpublic static final String OPUS_AUDIO = \"audio/opus\";\n\n\tpublic static final String VORBIS_AUDIO = \"audio/vorbis\";\n\n\tpublic static final String WEBM_AUDIO = \"audio/webm\";\n\n\t// video\n\n\tpublic static final String MPEG_VIDEO = \"video/mpeg\";\n\n\tpublic static final String MP4_VIDEO = \"video/mp4\";\n\n\tpublic static final String OGG_THEORA_VIDEO = \"video/ogg\";\n\n\tpublic static final String QUICKTIME_VIDEO = \"video/quicktime\";\n\n\tpublic static final String WEBM_VIDEO = \"video/webm\";\n\n\t// feeds\n\n\tpublic static final String RDF = \"application/rdf+xml\";\n\n\tpublic static final String RSS = \"application/rss+xml\";\n\n}",
"protected boolean isMultipartContent(String contentType) {\n\t\treturn ((contentType != null) && (contentType.indexOf(\"multipart/form-data\") != -1));\n\t}",
"void shouldParseTheDataIfContentTypeIsApplicationXWwwFormUrlencoded() {\n }",
"@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }",
"@Test\n\tpublic void requestDataForCustomer12212_checkContentType_expectApplicationJson() {\n\n\t\tgiven().\n\t\t\tspec(requestSpec).\n\t\twhen().\n\t\tthen();\n\t}",
"protected boolean isUploadSupported() {\n if (MyWebApp.isDesktop()) {\n return true;\n } else {\n return false;\n }\n//\n//\n// if (MyWebApp.isMobileDevice()) {\n// return false;\n// }\n//\n// return true;\n }",
"@Override\n public int getContentType() {\n return 0;\n }",
"public boolean hasMimeType() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"boolean supportsAccepts();",
"@Override\n public boolean isRenditionSupported(String mimeType) {\n return mimeType.startsWith(\"image/\");\n }",
"public boolean hasMimeType() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Test\r\n public void test_setContentType_Accuracy() {\r\n instance.setContentType(\"a\");\r\n assertEquals(\"incorrect value after setting\", \"a\", instance.getContentType());\r\n }",
"@Test\r\n public void test_getContentType_Accuracy() {\r\n assertEquals(\"incorrect default value\", null, instance.getContentType());\r\n instance.setContentType(\"a\");\r\n assertEquals(\"incorrect value after setting\", \"a\", instance.getContentType());\r\n }",
"@Override\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotAcceptable(\n\t\t\tHttpMediaTypeNotAcceptableException ex, HttpHeaders headers,\n\t\t\tHttpStatus status, WebRequest request) {\n\t\tMediaType mediaType= MediaType.parseMediaType(request.getHeader(\"accept\"));\n\t\tHttpMediaTypeNotSupportedException exa = new HttpMediaTypeNotSupportedException(mediaType, ex.getSupportedMediaTypes());\n\t\theaders.setAccept(ex.getSupportedMediaTypes());\n\t\tResponseError body= createResponseError(exa, HttpStatus.UNSUPPORTED_MEDIA_TYPE,HttpStatus.UNSUPPORTED_MEDIA_TYPE.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn handleExceptionInternal(exa,body, headers, HttpStatus.UNSUPPORTED_MEDIA_TYPE, request);\n\t}",
"@ResponseStatus (HttpStatus.UNSUPPORTED_MEDIA_TYPE)\n\t@ExceptionHandler (HttpMediaTypeNotSupportedException.class)\n\tpublic Result handleHttpMediaTypeNotSupportedException (Exception e)\n\t{\n\t\treturn new Result ().failure (\"content_type_not_supported\");\n\t}",
"@Override\n protected ResponseEntity<Object> handleHttpMediaTypeNotSupported(\n HttpMediaTypeNotSupportedException ex,\n HttpHeaders headers,\n HttpStatus status,\n WebRequest request) {\n\n LOGGER.info(\"handleHttpMediaTypeNotSupported\");\n return new ResponseEntity<>(new ErrorDto(\"handleHttpMediaTypeNotSupported\"), HttpStatus.UNSUPPORTED_MEDIA_TYPE);\n }",
"@ResponseStatus(HttpStatus.UNSUPPORTED_MEDIA_TYPE)\n @ExceptionHandler(HttpMediaTypeNotSupportedException.class)\n public R handleHttpMediaTypeNotSupportedException(HttpMediaTypeNotSupportedException e) {\n log.error(\"不支持当前媒体类型\", e);\n return R.error(400 , \"content_type_not_supported\");\n }",
"@Override\r\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex,\r\n\t\t\tHttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\treturn super.handleHttpMediaTypeNotSupported(ex, headers, status, request);\r\n\t}",
"@Ignore\n @Test\n public void testPostDisambiguatesOnContentType() throws ClientProtocolException, IOException\n {\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", xml, ContentType.APPLICATION_XML_TYPE), \"xml\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", json, ContentType.APPLICATION_JSON_TYPE), \"json\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", text, ContentType.TEXT_PLAIN_TYPE), \"text\");\n }",
"public boolean getStructureRequired() {\n // Get server.properties's contentTypeGroupingInCX key value\n String contentTypesGrouping = PSServer.getProperty(SERVER_PROP_GROUP_CONTENTTYPES);\n\n // If server.properties contentTypeGroupingInCX key value (\"true\" to\n // turn on and other\n // than true to turn off)is set then toggle the content type grouping\n // feature.\n if (contentTypesGrouping != null)\n return contentTypesGrouping.trim().equalsIgnoreCase(\"true\");\n else\n return false;\n }",
"@Override\n abstract protected boolean isValidChunkType(IChunkType chunkType);",
"public String getContenttype() {\n return contenttype;\n }",
"public String getContenttype() {\n return contenttype;\n }",
"public interface MediaTypeOperations\r\n{\r\n\t/**\r\n\t * This method returns true if the concrete implementation can \"deal\" with the given media/mime type. Otherwise false is returned.\r\n\t * If null is passed to this method then false shall be returned.\r\n\t * \r\n\t * @param mediaType The media type to test for support by the concrete implementation of this interface methods.\r\n\t * \r\n\t * @return TRUE or FALSE.\r\n\t */\r\n\tpublic boolean isSupported(MediaType mediaType);\r\n\t\r\n\t/**\r\n\t * This method shall return the default mime/media type the concrete implementation will assume if something is not specified of\r\n\t * wrongly specified. For example if an unsupported media type is used (see isSupported() method in this interface) then the implementation \r\n\t * of the concrete class may assume the media type given by this method. Should not return null as that behaviour may not be defined.\r\n\t * \r\n\t * @return See desc.\r\n\t */\r\n\tpublic MediaType getDefault();\r\n\t\r\n\t/**\r\n\t * This method returns a set of mime/media types a marshaller/unmarshaller may support. This should never return null. If a\r\n\t * marshaller/unmarshaller should not support any mime/media types (unlikely scenario) then an empty set rather than null\r\n\t * shall be returned.\r\n\t * \r\n\t * @return See desc.\r\n\t */\r\n\tpublic Set<MediaType> getSupportedMediaTypes();\r\n}",
"com.yoti.api.client.spi.remote.proto.ContentTypeProto.ContentType getContentType();",
"@Test\n\tpublic void test_unsupported_media_type_if_file_not_csv() throws Exception {\n\n\t\tString fileName = \"sample.html\";\n\t\tMockMultipartFile file = new MockMultipartFile(\"file\", fileName, \"text/html\",\n\t\t\t\t(\"name, emailId, contactNumber, street, city, state, country\\r\\n\"\n\t\t\t\t\t\t+ \"testname, [email protected], 9876543210, testStreet, testCity, testState, testCountry\\r\\n\")\n\t\t\t\t\t\t\t\t.getBytes());\n\n\t\tMockMultipartHttpServletRequestBuilder multipartRequest = MockMvcRequestBuilders\n\t\t\t\t.multipart(\"/api/v1/client/upload-csv\");\n\n\t\tmockMvc.perform(multipartRequest.file(file).header(\"userId\", 12)).andExpect(status().isUnsupportedMediaType());\n\n\t}",
"public String getContentType() {\n return this.contentType;\n }",
"public interface SpecialMediaTypeUtils {\n\n boolean isDefaultMediaType(SpecialMediaType specialMediaType);\n}",
"protected boolean isMultipartFormData(final HttpServletRequest request)\n {\n final String MULTIPART_FORM_DATA = \"multipart/form-data\";\n return (request.getContentType() != null\n && request.getContentType().toLowerCase()\n .indexOf(MULTIPART_FORM_DATA) > -1);\n }",
"default String getContentType() {\n return \"application/octet-stream\";\n }",
"public static boolean isValidFile(MultipartFile file) throws MyToysDefinedException {\r\n\t\tString contentType = file.getContentType();\r\n\t\tfor (String acceptedFileType : CommonConstants.ACCEPTED_FILE_TYPES) {\r\n\t\t\tif (contentType.contains(acceptedFileType)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new MyToysDefinedException(\"This file type is not accepted : \" + contentType);\r\n\t}",
"public static boolean isFileUploadAvailable(final boolean needsCorrectMimeType) {\n if (Build.VERSION.SDK_INT == 19) {\n final String platformVersion = (Build.VERSION.RELEASE == null) ? \"\" : Build.VERSION.RELEASE;\n\n return !needsCorrectMimeType && (platformVersion.startsWith(\"4.4.3\") || platformVersion.startsWith(\"4.4.4\"));\n } else {\n return true;\n }\n }",
"private boolean isSupportedFile(Object fileObject) {\n\t\tif (fileObject instanceof IAdaptable)\n\t\t\treturn castToIFile(fileObject).getFileExtension().equals(TestCasePersister.FILE_EXTENSION);\n\t\t\t\n\t\treturn false;\n\t}",
"@Override\n\tpublic String getContentType()\n\t{\n\t\treturn contentType;\n\t}",
"public static String getContentType(String name){\n\t\tString contentType = \"\";\n\t\tif(name.endsWith(\".html\")){\n\t\t\tcontentType = \"text/html\";\n\t\t}else if(name.endsWith(\".txt\")){\n\t\t\tcontentType = \"text/plain\";\n\t\t}else if(name.endsWith(\".gif\")){\n\t\t\tcontentType = \"image/gif\";\n\t\t}else if(name.endsWith(\".jpg\")){\n\t\t\tcontentType = \"image/jpeg\";\n\t\t}else if(name.endsWith(\".png\")){\n\t\t\tcontentType = \"image/png\";\n\t\t}\n\t\treturn contentType;\n\t}",
"@Override\n public String getContentType() {\n return null;\n }",
"public boolean isStreamingContent() {\n return File.class.equals(this.type) || XmlPullParser.class.equals(this.type) || InputStream.class.equals(this.type) || XmlDom.class.equals(this.type);\n }",
"public static boolean isFileUploadAvailable(final boolean needsCorrectMimeType) {\n if (Build.VERSION.SDK_INT == 19) {\n final String platformVersion = (Build.VERSION.RELEASE == null) ? \"\"\n : Build.VERSION.RELEASE;\n\n return !needsCorrectMimeType && (platformVersion.startsWith(\"4.4.3\") || platformVersion\n .startsWith(\"4.4.4\"));\n } else {\n return true;\n }\n }",
"public boolean isContentAllow(Artefact artefact) {\r\n\t\t\tBoolean contentArtefact = (Boolean) contentMap.get(artefact.getTypeId());\r\n\t\t\treturn (contentArtefact == null) ? false : contentArtefact;\r\n\t\t}",
"@ResponseStatus(HttpStatus.UNSUPPORTED_MEDIA_TYPE)\n @ExceptionHandler(HttpMediaTypeNotSupportedException.class)\n public String handleHttpMediaTypeNotSupportedException(Exception e) {\n log.error(\"不支持当前媒体类型\", e);\n return new Msg().fail().addVal(Msg.msg, \"content_type_not_supported\").toJson();\n }",
"private void verifyContentTypeAttributeValue()\n throws CMSException\n {\n ASN1Primitive validContentType = getSingleValuedSignedAttribute(\n CMSAttributes.contentType, \"content-type\");\n if (validContentType == null)\n {\n if (!isCounterSignature && signedAttributeSet != null)\n {\n throw new CMSException(\"The content-type attribute type MUST be present whenever signed attributes are present in signed-data\");\n }\n }\n else\n {\n if (isCounterSignature)\n {\n throw new CMSException(\"[For counter signatures,] the signedAttributes field MUST NOT contain a content-type attribute\");\n }\n\n if (!(validContentType instanceof ASN1ObjectIdentifier))\n {\n throw new CMSException(\"content-type attribute value not of ASN.1 type 'OBJECT IDENTIFIER'\");\n }\n\n ASN1ObjectIdentifier signedContentType = (ASN1ObjectIdentifier)validContentType;\n\n if (!signedContentType.equals(contentType))\n {\n throw new CMSException(\"content-type attribute value does not match eContentType\");\n }\n }\n }",
"public boolean isSupportedRequestMessageType(String messageType) {\n return contains(allowedRequestMessageTypes, messageType);\n }",
"MediaType getMediaType();",
"@ResponseStatus(HttpStatus.UNSUPPORTED_MEDIA_TYPE)\n @ExceptionHandler(HttpMediaTypeNotSupportedException.class)\n public Result handleHttpMediaTypeNotSupportedException(Exception e) {\n logger.error(\"不支持当前媒体类型\", e);\n return new Result(415,\"不支持当前媒体类型\");\n }",
"private boolean validateType(int type)\n {\n return PSSecurityProvider.isSupportedType(type);\n }",
"String getMimeType();",
"public void setContentType(String s) {\n\n\t}",
"@Override\n\tpublic String getContentType() {\n\t\treturn CONTENT_TYPE;\n\t}",
"@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}",
"public String getContenttype() {\n\t\treturn contenttype;\n\t}",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public String getContentType() {\n return this.contentType;\n }",
"public CharSequence getContentType() {\n return contentType;\n }",
"boolean hasDocumentType();",
"public java.lang.Object getContentType() {\r\n return contentType;\r\n }",
"@Override\n public boolean supports(Class<?> clazz) {\n return clazz == CreateStoreRequest.class;\n }",
"abstract boolean ignoreContentLength();",
"public void setContentType(String contentType);",
"private static String contentType(String fileName) {\n\t\tif (fileName.endsWith(\".txt\") || fileName.endsWith(\".html\")) {\n\t\t\treturn \"text/html\";\n\t\t}\n\t\tif (fileName.endsWith(\".jpg\") || fileName.endsWith(\".jpeg\")) {\n\t\t\treturn \"image/jpeg\";\n\t\t}\n\t\tif (fileName.endsWith(\".gif\")) {\n\t\t\treturn \"image/gif\";\n\t\t}\n\t\treturn \"application/octet-stream\";\n\t}",
"public static String getContentType(String format) {\n\t\tif (StringUtils.hasText(format)) {\n\t\t\tif (format.equalsIgnoreCase(XML.name())) {\n\t\t\t\treturn ContentTypes.XML.toString();\n\t\t\t} else if (format.equalsIgnoreCase(JSON.name())) {\n\t\t\t\treturn ContentTypes.JSON.toString();\n\t\t\t} else if (format.equalsIgnoreCase(PDF.name())) {\n return ContentTypes.PDF.toString();\n }\n\t\t}\n\t\treturn null;\n\t}",
"public String getContentType() {\n return contentType;\n }",
"public boolean isFileTransferHttpSupported() {\n\t\tLogger.i(TAG, \"isFileTransferHttpSupported value\" + fileTransferHttpSupported);\n\t\treturn fileTransferHttpSupported;\n\t}",
"private String detectMimeType(XDIMEContextInternal context,String path){\n int lastDot = path.lastIndexOf('.');\n String resultMimeType = null;\n\n if (lastDot != -1) {\n MarinerPageContext pageContext = getPageContext(context);\n EnvironmentContext envContext = pageContext.getEnvironmentContext();\n resultMimeType = envContext.getMimeType(path);\n }\n return resultMimeType;\n }",
"@Override\n\tpublic boolean validateContent()\n\t{\n\t\treturn true;\n\t}",
"public static ContentType extensionContentType(String fileExt) {\r\n\r\n\t\tfileExt = fileExt.toLowerCase();\r\n\r\n\t\tif (\"tiff\".equals(fileExt) || \"tif\".equals(fileExt)) {\r\n\t\t\t// return MIMEConstants.\r\n\t\t} else if (\"zip\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_ZIP;\r\n\t\t} else if (\"pdf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_PDF;\r\n\t\t} else if (\"wmv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_WMV;\r\n\t\t} else if (\"rar\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_RAR;\r\n\t\t} else if (\"swf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_SWF;\r\n\t\t} else if (\"exe\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WINDOWSEXEC;\r\n\t\t} else if (\"avi\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_VIDEO_AVI;\r\n\t\t} else if (\"doc\".equals(fileExt) || \"dot\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_WORD;\r\n\t\t} else if (\"ico\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_ICO;\r\n\t\t} else if (\"mp2\".equals(fileExt) || \"mp3\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_MPEG;\r\n\t\t} else if (\"rtf\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_RTF;\r\n\t\t} else if (\"xls\".equals(fileExt) || \"xla\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_EXCEL;\r\n\t\t} else if (\"jpg\".equals(fileExt) || \"jpeg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_JPEG;\r\n\t\t} else if (\"gif\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_GIF;\r\n\t\t} else if (\"svg\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_SVG;\r\n\t\t} else if (\"png\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_IMAGE_PNG;\r\n\t\t} else if (\"csv\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSV;\r\n\t\t} else if (\"ps\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_POSTSCRIPT;\r\n\t\t} else if (\"html\".equals(fileExt) || \"htm\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_HTML;\r\n\t\t} else if (\"css\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_CSS;\r\n\t\t} else if (\"xml\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_XML;\r\n\t\t} else if (\"js\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_APPLICATION_JAVASCRIPT;\r\n\t\t} else if (\"wma\".equals(fileExt)) {\r\n\t\t\treturn MIMEConstants.CONTENT_TYPE_AUDIO_WMA;\r\n\t\t}\r\n\r\n\t\treturn MIMEConstants.CONTENT_TYPE_TEXT_PLAIN;\r\n\t}",
"private boolean handleRequestAttachments(StreamRequest request,\n RequestContext requestContext,\n Callback<StreamResponse> callback)\n {\n //At this point we need to check the content-type to understand how we should handle the request.\n String header = request.getHeader(RestConstants.HEADER_CONTENT_TYPE);\n if (header != null)\n {\n ContentType contentType;\n try\n {\n contentType = new ContentType(header);\n }\n catch (ParseException e)\n {\n callback.onError(Messages.toStreamException(RestException.forError(400,\n \"Unable to parse Content-Type: \" + header)));\n return true;\n }\n\n if (contentType.getBaseType().equalsIgnoreCase(RestConstants.HEADER_VALUE_MULTIPART_RELATED))\n {\n //We need to reconstruct a RestRequest that has the first part of the multipart/related payload as the\n //traditional rest.li payload of a RestRequest.\n final MultiPartMIMEReader multiPartMIMEReader = MultiPartMIMEReader.createAndAcquireStream(request);\n RoutingResult routingResult;\n try\n {\n routingResult = getRoutingResult(request, requestContext);\n }\n catch (Exception e)\n {\n callback.onError(buildPreRoutingStreamException(e, request));\n return true;\n }\n final TopLevelReaderCallback firstPartReader = new TopLevelReaderCallback(routingResult, callback, multiPartMIMEReader, request);\n multiPartMIMEReader.registerReaderCallback(firstPartReader);\n return true;\n }\n }\n\n return false;\n }",
"@Override\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn _ImageCarrier.class.isAssignableFrom(clazz);\n\t}"
] | [
"0.7812621",
"0.7144021",
"0.71287453",
"0.6989769",
"0.6979273",
"0.6895225",
"0.688765",
"0.6738082",
"0.66546667",
"0.6559367",
"0.6518798",
"0.6518798",
"0.6518798",
"0.6489901",
"0.6484654",
"0.6430237",
"0.6430237",
"0.6342374",
"0.6310551",
"0.6307443",
"0.62991303",
"0.6277774",
"0.62736",
"0.6264109",
"0.6221313",
"0.6196667",
"0.61786056",
"0.6153023",
"0.6150265",
"0.6138587",
"0.61127555",
"0.60988665",
"0.6088768",
"0.6066138",
"0.60584944",
"0.60398686",
"0.5980321",
"0.59771866",
"0.59670377",
"0.59582597",
"0.59562945",
"0.59548753",
"0.5950962",
"0.5947884",
"0.59413797",
"0.59000677",
"0.5886465",
"0.5871159",
"0.58442146",
"0.5825313",
"0.58220774",
"0.5815189",
"0.58112484",
"0.5808589",
"0.5808589",
"0.5793838",
"0.5793329",
"0.5792493",
"0.57923853",
"0.5760153",
"0.5754904",
"0.5751872",
"0.5742185",
"0.5732384",
"0.57244",
"0.57139885",
"0.57104445",
"0.57104385",
"0.57090276",
"0.570447",
"0.56886905",
"0.56820345",
"0.5681968",
"0.567666",
"0.5660941",
"0.56598765",
"0.565516",
"0.56510174",
"0.56505483",
"0.5643597",
"0.562859",
"0.56283605",
"0.56258386",
"0.56258386",
"0.56258386",
"0.562358",
"0.5621519",
"0.56190705",
"0.56120664",
"0.56048733",
"0.5593987",
"0.55933297",
"0.5587516",
"0.55617726",
"0.5561261",
"0.55570114",
"0.55450505",
"0.55366427",
"0.5531576",
"0.5531366"
] | 0.75405777 | 1 |
check if HTTP request is a valid file i.e. among available files in root server | private boolean isValidFile(String sHTTPRequest) {
String sRootFolder = "/" + ROOT_FOLDER.getName();
return sAvailableFiles.contains(sRootFolder + sHTTPRequest.toLowerCase());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean checkURL(String file) {\n\t\tFile myFile = new File(file);\n\t\treturn myFile.exists() && !myFile.isDirectory();\n\t}",
"private boolean isValidContentType(String sHTTPRequest) {\n String sFileType = getFileExtension(sHTTPRequest);\n return Arrays.asList(SUPPORTED_FILE_TYPES).contains(sFileType);\n }",
"public static boolean filefound(String file, String temphost) {\r\n\t\t\r\n\t\tline = \"\";\r\n\t\t//http header request\r\n\t\tout.println(\"HEAD \" + file + \" HTTP/1.1\\r\\nHost: \" + temphost + \"\\r\\n\");\r\n\r\n\t\t//read the request\r\n\t\twhile (!line.startsWith(\"HTTP\")) {\r\n\t\t\ttry {\r\n\t\t\t\tline = in.readLine();\r\n\t\t\t}\r\n\t\t\tcatch (NullPointerException e) {\r\n\t\t\t\tSystem.out.println(\"Null Pointer Exception\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"Read Error!\");\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// search for the 404 error\r\n\t\tif(line.startsWith(\"HTTP/1.1 404\")) {\r\n\t\t\treturn false; \t\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"boolean safeIsFile(FsPath path);",
"@RequestMapping(value = \"/checkFileAvailability\", method = RequestMethod.GET)\r\n\tpublic ModelAndView checkFileAvailability(HttpServletRequest req, HttpServletResponse res) throws IOException {\r\n\t\tlogger.log(IAppLogger.INFO, \"Enter: checkFileAvailability()\");\r\n\t\tString filePath = (String) req.getParameter(\"filePath\");\r\n\t\tFile file = new File(filePath);\r\n\t\tString status = \"Fail\";\r\n\t\ttry {\r\n\t\t\tbyte[] data = FileCopyUtils.copyToByteArray(file);\r\n\t\t\tstatus = \"Success\";\r\n\t\t\tres.setContentType(\"text/plain\");\r\n\t\t\tres.getWriter().write(\"{\\\"status\\\":\\\"\" + status + \"\\\"}\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.log(IAppLogger.ERROR, \"Error downloading Group File\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t\tres.setContentType(\"text/plain\");\r\n\t\t\tres.getWriter().write(\"{\\\"status\\\":\\\"\" + status + \"\\\"}\");\r\n\t\t}\r\n\t\tlogger.log(IAppLogger.INFO, \"Exit: checkFileAvailability()\");\r\n\t\treturn null;\r\n\t}",
"private boolean isFileAccessible() {\n\t\ttry {\n\t\t\tif (!new File(fileUpload.getFilePath()).exists())\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t} catch (SecurityException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasRetrieveFileResponse();",
"private boolean isLocalFile(Uri uri) {\n String auth = uri.getHost();\n\n if (auth.equals(\"localhost\") || uri.getScheme().equals(\"file\")) {\n return true;\n }\n return false;\n }",
"public boolean isFileURL( URL url ) {\n\t\tString protocol = url.getProtocol();\n\t\treturn URL_PROTOCOL_FILE.equals(protocol)\n\t\t\t|| URL_PROTOCOL_VFSFILE.equals(protocol)\n\t\t\t|| URL_PROTOCOL_VFS.equals(protocol);\n\t}",
"private boolean isAcceptableFile(File f) {\n \tif( f.getName().length() < 7 ) {\n \t\treturn false;\n \t}\n \t\n \tString extension = f.getName().substring( f.getName().length()-7, f.getName().length() );\n \tif ( !extension.equals(\".tessit\") ) {\n \t\treturn false;\n \t}\n \t\n \treturn true;\n }",
"boolean hasUploadRequest();",
"private void validateRequest( DownloadRequest dreq )\n throws ErrorResponseException\n {\n String path = dreq.getPath();\n if ( path.endsWith( ResourceCatalog.VERSION_XML_FILENAME ) || path.indexOf( \"__\" ) != -1 )\n {\n throw new ErrorResponseException( DownloadResponse.getNoContentResponse() );\n }\n }",
"private boolean checkLocalFile() throws IOException {\n\t\tPath localfile = Paths.get(userdir, filename);\n\t\tif (Files.exists(localfile, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\tthis.downloadStatus = DownloadEnum.ERROR;\n\t\t\tthis.message = \"same name file on download directory, download has stopped\";\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlocalfiletmp = Paths.get(localfile.toAbsolutePath().toString() + \".tmp\");\n\t\t\tif (Files.exists(localfiletmp, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tlocalFileSize = localfiletmp.toFile().length();\n\t\t\t} else {\n\t\t\t\tFiles.createFile(localfiletmp);\n\t\t\t}\n\t\t\tcfgpath = Paths.get(localfile.toAbsolutePath().toString() + \".pcd.dl.cfg\");// local cache of download file\n\t\t\tif (!Files.exists(cfgpath, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tFiles.createFile(cfgpath);\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(cfgpath.toFile());\n\t\t\tfw.write(url);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\treturn true;\n\t\t}\n\t}",
"boolean isFile(FsPath path);",
"protected boolean sameFile(URL paramURL1, URL paramURL2) {\n/* 400 */ if (paramURL1.getProtocol() != paramURL2.getProtocol() && (paramURL1\n/* 401 */ .getProtocol() == null || \n/* 402 */ !paramURL1.getProtocol().equalsIgnoreCase(paramURL2.getProtocol()))) {\n/* 403 */ return false;\n/* */ }\n/* */ \n/* 406 */ if (paramURL1.getFile() != paramURL2.getFile() && (paramURL1\n/* 407 */ .getFile() == null || !paramURL1.getFile().equals(paramURL2.getFile()))) {\n/* 408 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 412 */ int i = (paramURL1.getPort() != -1) ? paramURL1.getPort() : paramURL1.handler.getDefaultPort();\n/* 413 */ int j = (paramURL2.getPort() != -1) ? paramURL2.getPort() : paramURL2.handler.getDefaultPort();\n/* 414 */ if (i != j) {\n/* 415 */ return false;\n/* */ }\n/* */ \n/* 418 */ if (!hostsEqual(paramURL1, paramURL2)) {\n/* 419 */ return false;\n/* */ }\n/* 421 */ return true;\n/* */ }",
"@Test\r\n public void testValidURLtxtFile() {\r\n String[] str = {\"curl\", \"http://www.cs.cmu.edu/~spok/grimmtmp/073.txt\"};\r\n\r\n curl.run(str);\r\n assertFalse(ErrorHandler.checkIfErrorOccurred());\r\n assertTrue(mockFileSystem.getCurrentNode().getFile(\"073txt\") != null);\r\n }",
"public boolean getResourceFile(HttpServletRequest request, HttpServletResponse response) throws IOException\n {\n String path = request.getPathInfo();\n if (path == null)\n return false;\n if (!path.startsWith(\"/\"))\n path = \"/\" + path; // Must start from root\n \n URL url = this.getClass().getResource(path);\n if (url == null)\n return false; // Not found\n InputStream inStream = null;\n try {\n inStream = url.openStream();\n } catch (Exception e) {\n return false; // Not found\n }\n \n // Todo may want to add cache info (using bundle lastModified).\n OutputStream writer = response.getOutputStream();\n copyStream(inStream, writer);\n writer.close();\n return true;\n }",
"public boolean isFile() { return true; }",
"private boolean validateFile(String path) {\n return !path.equals(AppStrings.NO_FILE_PATH);\n }",
"public boolean isRemoteFile() {\n\t\tif (this.serverFileInfo == null)\n\t\t\tthis.fetchInfo();\n\t\treturn this.serverFileInfo != null && this.serverFileInfo.exists();\n\t}",
"boolean hasFileLoc();",
"boolean getFileErr();",
"public String loadFile(HttpServletRequest request, HttpServletResponse response, String fileType) {\n try {\n List<FileItem> fileItemsList = _uploader.parseRequest(request);\n Iterator<FileItem> fileItemsIterator = fileItemsList.iterator();\n\n if (fileItemsIterator.hasNext()) {\n saveFileOnServer(fileItemsIterator, fileType);\n }\n } catch (Exception e) {\n System.out.println(\"Exception in uploading file. \" + e.getMessage());\n return \"false\";\n }\n return \"true\";\n }",
"public boolean isFile() { return false; }",
"boolean hasFileLocation();",
"boolean hasMimeType();",
"boolean hasFilePath();",
"private void readHTTPRequest(InputStream is) {\n BufferedReader requestReader = null;\n \n while (true) {\n try {\n requestReader = new BufferedReader(new InputStreamReader(is));\n \n while (!requestReader.ready()) Thread.sleep(1);\n String line = requestReader.readLine();\n System.err.println(\"Request line: (\"+line+\")\");\n \n \n/* Get the complete path from the root directory to the file\n* If no file requested: display default content\n*/\n String rootPath = toCompletePath(line);\n if(noFileRequested) {\n HTMLcontent = \"<html><h1>Welcome to \" + serverName + \"</h1><body>\\n\" +\n \"<p>You may request a file in the URL path.</p>\\n\" +\n \"</body></html>\\n\";\n break;\n }//end\n \n /* Check if file exists\n * If not: change the status and exit\n * If so: read the contents of the file\n */\n File fileRequested = new File(rootPath);\n if(!fileRequested.exists()) {\nstreamStatus = \"HTTP/1.1 404 NOT FOUND\\n\";\nHTMLcontent = \"<html><h1>404 Error.</h1><body>\\n\" +\n \"<p>Page not found.</p>\\n\" +\n \"</body></html>\\n\";\n break;\n }\n else {\n HTMLcontent = readFile(rootPath);\n break;\n }//end\n \n \n } catch (Exception e) {\n System.err.println(\"Request error: \" + e);\n break;\n //close BufferedReader if initialized\n }//end catch\n \n }//end while loop\n}",
"boolean isFile() throws IOException;",
"boolean hasUploadResponse();",
"@Test\n public void filesValidateTest() throws ApiException {\n String owner = null;\n String repo = null;\n FilesValidate data = null;\n api.filesValidate(owner, repo, data);\n\n // TODO: test validations\n }",
"boolean checkShouldDownloadFile(String target, String name) {\n return Boolean.TRUE.equals(DOWNLOAD_FILES.retrieve(target, name));\n }",
"public boolean isLocalFile(String path) {\n System.out.println(path);\n if (path.contains(\"http://\") || path.contains(\"https://\")) {\n System.out.println(\"no es local\");\n return false;\n }\n System.out.println(\"es local\");\n return true;\n }",
"public static boolean isValidFile(MultipartFile file) throws MyToysDefinedException {\r\n\t\tString contentType = file.getContentType();\r\n\t\tfor (String acceptedFileType : CommonConstants.ACCEPTED_FILE_TYPES) {\r\n\t\t\tif (contentType.contains(acceptedFileType)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new MyToysDefinedException(\"This file type is not accepted : \" + contentType);\r\n\t}",
"boolean accept(String filename);",
"private void validateSource(SourcePointer.FileSource src) {\n File f = src.path.toFile();\n if (!f.exists() || !f.canRead()) {\n throw new SolrException(\n ErrorCode.BAD_REQUEST,\n String.format(\n Locale.US, \"File at %s either does not exist or cannot be read.\", src.path));\n }\n }",
"boolean hasDownloadRequest();",
"private void checkFile() {\n \ttry {\n \t\tdata = new BufferedReader(\n \t\t\t\t new FileReader(textFile));\n \t\t\n \t}\n \tcatch(FileNotFoundException e)\n \t{\n \t\tSystem.out.println(\"The mentioned File is not found.\");\n System.out.println(\"\");\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"The following error occured while reading the file.\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(2);\n\t\t}\n }",
"private void postValidationNoArrayOfFiles() throws APIRestGeneratorException\r\n\t{\r\n\t\tfinal Iterator<Response> iterator = this.localResponses.getResponsesMap().values().iterator() ;\r\n\t\tboolean found \t\t\t\t = false ;\r\n\t\t\r\n\t\twhile (iterator.hasNext() && !found)\r\n\t\t{\r\n\t\t\tfinal Response response = iterator.next() ;\r\n\t\t\tfinal Item responseItem = response.getItem() ;\r\n\t\t\tif (responseItem instanceof ItemArray)\r\n\t\t\t{\r\n\t\t\t\tfinal Item itemBaseArray = ((ItemArray) responseItem).calculateBaseType() ;\r\n\t\t\t\tfound = itemBaseArray instanceof ItemFile ;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (found)\r\n\t\t{\r\n\t\t\tfinal String errorString = \"The path '\" + this.pathValue + \"' ('\" + this.pathOp + \"' operation) cannot contain a response with an array of files\" ;\r\n\t\t\t\r\n\t\t\tResponsesPostValidator.LOGGER.error(errorString) ;\r\n\t \tthrow new APIRestGeneratorException(errorString) ;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic boolean isFile(String path) {\n\t\treturn false;\r\n\t}",
"private void check() {\n Path pathroot = getPath();\n // check the path is file or directory\n checkFileOrDirectory(pathroot);\n }",
"boolean hasRetrieveFile();",
"protected boolean checkFileSystem() {\n if (this.fsOk && fs != null) {\n try {\n FSUtils.checkFileSystemAvailable(fs);\n } catch (IOException e) {\n LOG.fatal(\"Shutting down HRegionServer: file system not available\", e);\n abort();\n fsOk = false;\n }\n }\n return this.fsOk;\n }",
"public boolean checkDocument(String fileName) throws IOException;",
"public boolean isFileTransferHttpSupported() {\n\t\tLogger.i(TAG, \"isFileTransferHttpSupported value\" + fileTransferHttpSupported);\n\t\treturn fileTransferHttpSupported;\n\t}",
"void whenServeFile(String fileName, HttpServletRequest request);",
"public boolean requestListFiles() throws IOException, PacketException, UtilDatagramException {\n\t\tboolean success = false;\n\n\t\ttry {\n\t\t\tFile[] fileArray = null; \n\n\t\t\tPacket responsePacket = this.requestServer(FileTransferProtocol.LIST_FILES);\n\n\t\t\tbyte[] responseBytes = responsePacket.getPayloadBytes();\n\t\t\t\n\t\t\tthis.showNamedMessage(\"Server response received, now processing...\"); \n\t\t\tfileArray = util.Bytes.deserialiseByteArrayToFileArray(responseBytes);\n\t\t\tthis.serverFiles = fileArray;\n\t\t\tthis.printArrayOfFile(fileArray);\n\t\t\t\n\t\t\tsuccess = true;\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthis.showNamedError(\"Problems with received data: \" + e.getLocalizedMessage());\n\t\t} catch (EmptyResponseException e) {\n\t\t\tthis.showNamedError(\"Response from server was empty: \" + e.getLocalizedMessage());\n\t\t} catch (ServerFailureException e) {\n\t\t\tthis.showNamedError(\"FAILURE> \" + e.getLocalizedMessage());\n\t\t}\n\n\t\treturn success;\n\t}",
"private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }",
"protected void checkOpen() throws IOException {\n if (this.stopRequested.get() || this.abortRequested) {\n throw new IOException(\"Server not running\");\n }\n if (!fsOk) {\n throw new IOException(\"File system not available\");\n }\n }",
"public boolean isFile(String path);",
"boolean existsPath(String requestedUrl);",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please set the path to the Rhapsody Project !\");\n else\n if(value.length()<4)\n warning(\"isn't the path too short?\");\n else {\n \tFile file = new File(value);\n \tif (file.isDirectory()) {\n \t\terror(\"you entered a directory please select the *.rpy file !\");\n \t} else \n \t\t//TODO add more checks\n \t\tok();\n }\n\n }",
"private void checkFileNames(DSpaceRunnable dSpaceRunnable, List<MultipartFile> files) {\n List<String> fileNames = new LinkedList<>();\n for (MultipartFile file : files) {\n String fileName = file.getOriginalFilename();\n if (fileNames.contains(fileName)) {\n throw new UnprocessableEntityException(\"There are two files with the same name: \" + fileName);\n } else {\n fileNames.add(fileName);\n }\n }\n\n List<String> fileNamesFromOptions = dSpaceRunnable.getFileNamesFromInputStreamOptions();\n if (!fileNames.containsAll(fileNamesFromOptions)) {\n throw new UnprocessableEntityException(\"Files given in properties aren't all present in the request\");\n }\n }",
"default boolean isServerReqRespValidForBlob(final HttpServletRequest req,\n final HttpServletResponse resp,\n @Nullable final Throwable servletException) {\n return true;\n }",
"@Ignore\r\n\t@Test\r\n\tpublic void test_GetOK_JSFile() throws IOException {\r\n\t\tRawHttpResponse<?> response = executeRequest(\"GET\", \"/js/main.js\");\r\n\t\t// check the response code\r\n\t\tassertEquals(200, response.getStatusCode());\r\n\t\t// check content length\r\n\t\tOptional<String> contentLength = response.getHeaders().getFirst(\"Content-Length\");\r\n\t\tassertTrue(contentLength.isPresent());\r\n\t\tassertEquals(\"1328\", contentLength.get());\r\n\t\t// check content type\r\n\t\tOptional<String> contentType = response.getHeaders().getFirst(\"Content-Type\");\r\n\t\tassertTrue(contentType.isPresent());\r\n\t\tassertEquals(\"text/javascript\", contentType.get());\r\n\t}",
"public boolean accept(File file) {\n \tString FileName = file.getName().toLowerCase();\n String FileSuffix = FileName.substring(FileName.lastIndexOf(\".\")+1);\n \treturn Arrays.asList(ValidTails).contains(FileSuffix) || file.isDirectory();\n }",
"boolean hasFileInfo();",
"boolean hasFileInfo();",
"boolean isMultiPart();",
"@RequestMapping(value = \"/validate-file-rest-core\", method = { RequestMethod.POST })\n\tpublic ResponseEntity<ValidateFileResponse> post(\n\t\t@RequestBody ValidateFileRequest request\n\t) {\n\t\tValidateFileResponse response = new ValidateFileResponse();\n\t\t// List invalid file names.\n\t\tList<String> badNames = Arrays.asList(\"P111111.pdf\", \"P222222.pdf\", \"P333333.pdf\",\n\t\t\"P444444.pdf\", \"P555555.pdf\", \"P666666.pdf\",\"P777777.pdf\", \"P888888.pdf\", \"P999999.pdf\");\n\n\t\t// Validate file.\n\t\tif (request.getLength() < 5) {\n\n\t\t\tresponse.setAccept(false);\n\t\t\tresponse.setRejectReason(\"The file is too small.\");\n\n\t\t} else if (!request.getContentType().equals(\"application/pdf\")) {\n\n\t\t\tresponse.setAccept(false);\n\t\t\tresponse.setRejectReason(\"The file is not a PDF.\");\n\n\t\t} else if (badNames.contains(request.getName())) {\n\n\t\t\tresponse.setAccept(false);\n\t\t\tresponse.setRejectReason(\"The file name is invalid.\");\n\n\t\t} else {\n\t\t\tresponse.setAccept(true);\n\t\t}\n\n\t\treturn new ResponseEntity<ValidateFileResponse>(response, HttpStatus.ACCEPTED);\n\t}",
"private boolean isGetingOneServerFile(){\n\tRandom ran = new Random();\n\tif((ran.nextInt() % 2) == 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify the path to the RhapsodyCL.exe file\");\n else if(!value.contains(\"RhapsodyCL.exe\")) {\n \terror(\"didn't find RhapsodyCL.exe in the path !\");\n }else{\n \tok(); \t\n }\n }",
"public static boolean isFileUploadAvailable() {\n return isFileUploadAvailable(false);\n }",
"public static boolean isFileUploadAvailable() {\n return isFileUploadAvailable(false);\n }",
"@Test\n public void testValidator276() {\n UrlValidator validator = new UrlValidator();\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertFalse(\"file:///c:/ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ shouldn't be allowed by default\",\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertFalse(\"file:///etc/ shouldn't be allowed by default\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertFalse(\"file://localhost/etc/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertFalse(\"file://localhost/c:/ shouldn't be allowed by default\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // Turn it on, and check\n // Note - we need to enable local urls when working with file:\n validator = new UrlValidator(new String[] {\"http\", \"file\"}, UrlValidator.ALLOW_LOCAL_URLS);\n\n assertTrue(\"http://apache.org/ should be allowed by default\",\n validator.isValid(\"http://www.apache.org/test/index.html\"));\n\n assertTrue(\"file:///c:/ should now be allowed\",\n validator.isValid(\"file:///C:/some.file\"));\n\n assertFalse(\"file:///c:\\\\ should not be allowed\", // Only allow forward slashes\n validator.isValid(\"file:///C:\\\\some.file\"));\n\n assertTrue(\"file:///etc/ should now be allowed\",\n validator.isValid(\"file:///etc/hosts\"));\n\n assertTrue(\"file://localhost/etc/ should now be allowed\",\n validator.isValid(\"file://localhost/etc/hosts\"));\n\n assertTrue(\"file://localhost/c:/ should now be allowed\",\n validator.isValid(\"file://localhost/c:/some.file\"));\n\n // These are never valid\n assertFalse(\"file://c:/ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:/some.file\"));\n\n assertFalse(\"file://c:\\\\ shouldn't ever be allowed, needs file:///c:/\",\n validator.isValid(\"file://C:\\\\some.file\"));\n }",
"private boolean checkFile(String name) {\n return name.endsWith(extension);\n }",
"boolean canServe(URI uri) throws EnvironmentException;",
"private boolean isFileExist() {\n File check_file = getFilesDir();\n File[] file_check_array = check_file.listFiles();\n for (File current : file_check_array) {\n boolean user_file = isValidName(current.getName());\n if (user_file) {\n return true;\n }\n }\n return false;\n }",
"private boolean isEmptyFile(String filename) {\n try (InputStream in = IO.openFile(filename)) {\n int b = in.read();\n return (b == -1);\n } catch (IOException ex) {\n throw IOX.exception(ex);\n }\n }",
"public boolean valid()\r\n\t{\r\n\t\treturn valid(getInputStream());\r\n\t}",
"boolean hasFileName();",
"boolean hasFileName();",
"private boolean processRequest(Connection conn)\n {\n String line = null;\n URL url;\n String path;\n\n /*\n * Read the request line.\n */\n try {\n line = DataInputStreamUtil.readLineIntr(conn.getInputStream());\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request line: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request line: I/O error\"\n + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n /*\n * Parse the request line, and read the request headers.\n */\n try {\n _req.read(line);\n }\n catch(MalformedURLException e) {\n logError(\"Malformed URI in HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid URI in HTTP request\"\n + getExceptionMessage(e));\n return false;\n }\n catch(MalformedHTTPReqException e) {\n logError(\"Malformed HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid HTTP request\" + getExceptionMessage(e));\n return false;\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request: I/O error\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Request: '\" + _req.getReqLine() + \"'\");\n }\n\n /*\n * Process the request based on the request-URI type. The asterisk\n * option (RFC2068, sec. 5.1.2) is not supported.\n */\n if ( (path = _req.getPath()) != null) {\n return redirectClient(path);\n }\n else {\n if ( (url = _req.getURL()) != null) {\n // The redirector is being accessed as a proxy.\n\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Cannot retrieve URL \" + url\n + \"\\n<P>\\n\"\n + \"Invalid URL: unexpected access protocol \"\n + \"(e.g., `http://')\\n\");\n }\n else {\n logError(\"unsupported request-URI: \" + _req.getReqLine());\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"unsupported request-URI\");\n }\n return false;\n }\n }",
"public boolean isMine(HttpServletRequest request) {\r\n String path = request.getPathInfo();\r\n return path.startsWith(\"/thredds/obis/\");\r\n }",
"public boolean hasFile(final String file);",
"public boolean fileIsFile(File file) {\n if (executionEnvironment.isLocal()) {\n return file.isFile();\n } else {\n return ProcessUtils.execute(executionEnvironment, \"test\", \"-f\", \"\\\"\" + file.getPath() + \"\\\"\").isOK(); //NOI18N\n }\n }",
"public static void checkFile(Path path) {\n\n if (!path.isAbsolute()) {\n System.out.format(\"%s must be an absolute path to a file.\", path);\n System.exit(0);\n } else if (!Files.exists(path)) {\n System.out.format(\"%s does not exist.\", path);\n System.exit(0);\n }\n\n // Verify that the path references a file\n try {\n BasicFileAttributes attr = Files.readAttributes(path, BasicFileAttributes.class);\n if (!attr.isRegularFile()) {\n System.out.format(\"%s is not a file.\", path);\n System.exit(0);\n }\n } catch (IOException e) {\n System.err.println(\"I/O error: \" + e);\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public boolean fileExists(Context context, String filename)\r\n{\r\n File file = context.getFileStreamPath(filename);\r\n if(file == null || !file.exists())\r\n {\r\n return false;\r\n }\r\nreturn true;\r\n}",
"static private boolean existingURL( final URL baseURL, final String urlSpec ) throws Exception {\n\t\tfinal URL url = new URL( baseURL, urlSpec );\n\t\treturn new File( url.toURI() ).exists();\n\t}",
"abstract boolean ignoreContentLength();",
"public boolean isFileStartHit() {\n return pageRequest.getStart() == 0;\n }",
"public void checkFile() {\n\t\tFile file = new File(\"src/Project11Problem1Alternative/names.txt\");\n\t\tSystem.out.println(file.exists() ? \"Exists!\" : \"Doesn't exist!\");\n\t\tSystem.out.println(file.canRead() ? \"Can read!\" : \"Can't read!\");\n\t\tSystem.out.println(file.canWrite() ? \"Can write!\" : \"Can't write!\");\n\t\tSystem.out.println(\"Name: \" + file.getName());\n\t\tSystem.out.println(\"Path: \" + file.getPath());\n\t\tSystem.out.println(\"Size: \" + file.length() + \" bytes\");\n\t}",
"public FileIsEmpty(String e,HttpServletResponse response) {\n\t\tresolveException(e,response);\n\t}",
"boolean hasInodeFile();",
"public boolean isLocalFile() {\n\t\ttry {\n\t\t\tFile localFile = getLocalFile();\n\t\t\treturn localFile != null && localFile.exists();\n\t\t} catch (CoreException e) {\n\t\t\tlogger.debug(\"Unable to determine if file is local\", e);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean fileNotNullCheck(final MultipartFile file) {\n\t\treturn !(file.equals(null) || file.isEmpty());\n\t}",
"private void checkFileStatus() throws CustomException, IOException\n\t{\n\t\t//For all .mgf files\n\t\tfor (int i=0; i<mgfFiles.size(); i++)\n\t\t{\n\n\t\t\tString resultFileName = \n\t\t\t\t\tmgfFiles.get(i).substring(0,mgfFiles.get(i).lastIndexOf(\".\"))+\"_Results.csv\";\n\t\t\t//TODO: Cannot write files if checking for file. \n\t\t\t/*\n\t\t\tif (isFileUnlocked(resultFileName))\n\t\t\t\tthrow new CustomException(\"Please close \"+resultFileName, null);\n\t\t\t */\n\t\t}\n\n\t}",
"boolean accept(FileStatus fileStatus);",
"public synchronized boolean checkFileCompletion()\n/* */ {\n/* 49 */ int totalsize = 0;\n/* */ \n/* 51 */ for (FileSubContent subContent : this.downloadManager.getSUB_CONTENTS())\n/* */ {\n/* 53 */ if ((subContent != null) && (subContent.isIsDownloaded()) && (subContent.getContent().length == this.downloadManager.getSUB_SIZE()))\n/* */ {\n/* 55 */ totalsize++;\n/* */ }\n/* */ }\n/* */ \n/* 59 */ if (totalsize == this.downloadManager.getSUB_CONTENTS().size())\n/* */ {\n/* 61 */ System.out.println(\"FileDownloadChecker: got all of the subParts.\");\n/* 62 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 66 */ return false;\n/* */ }",
"private void validateBagFile(File bagFile) throws IOException {\n\t\tZipFile zf = new ZipFile(bagFile);\n\t\t// Check files calculates the hashes and file sizes and reports on\n\t\t// whether hashes are correct\n\t\t// The file sizes are added to totalDataSize which is compared with the\n\t\t// stats sent in the request\n\t\tcheckFiles(sha1Map, zf);\n\n\t\tlog.info(\"Data Count: \" + dataCount);\n\t\tlog.info(\"Data Size: \" + totalDataSize);\n\t\t// Check stats\n\t\tif (pubRequest.getJSONObject(\"Aggregation Statistics\").getLong(\n\t\t\t\t\"Number of Datasets\") != dataCount) {\n\t\t\tlog.warn(\"Request contains incorrect data count: should be: \"\n\t\t\t\t\t+ dataCount);\n\t\t}\n\t\t// Total size is calced during checkFiles\n\t\tif (pubRequest.getJSONObject(\"Aggregation Statistics\").getLong(\n\t\t\t\t\"Total Size\") != totalDataSize) {\n\t\t\tlog.warn(\"Request contains incorrect Total Size: should be: \"\n\t\t\t\t\t+ totalDataSize);\n\t\t}\n\n\t\tzf.close();\n\t}",
"abstract boolean canHandle(\n final PathReal name);",
"private static boolean testNotFound() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\tlogger.finest(\"sending request\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tURL notFoundURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + \"random\");\r\n\t\t\tHttpClient client = new HttpClient(notFoundURL);\r\n\t\t\texecutor.execute(client);\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tlogger.severe(\"problem formatting URL\");\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for request to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"not found request completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public boolean isSupportedFile(String fileName)\r\n {\r\n return fileName.toLowerCase().endsWith(\".gtf\");\r\n }",
"boolean hasChunkRequest();",
"protected boolean isApplicable(SPRequest req) {\n\n Log.debug(\"isApplicable ? \" + req.getPath() + \" vs \" + getRoute());\n\n if (!req.getMethod().equals(getHttpMethod()))\n return false;\n\n String[] uri = req.getSplitUri();\n String[] tok = splitPath;\n if (uri.length != tok.length && splatIndex == -1)\n return false;\n\n if (uri.length <= splatIndex)\n return false;\n\n for (int i = 0; i < tok.length; i++) {\n if (tok[i].charAt(0) != ':' && tok[i].charAt(0) != '*' && !tok[i].equals(uri[i]))\n return false;\n }\n\n return true;\n }",
"private File validateFile(String filename)\n {\n if (filename == null)\n {\n throw new IllegalArgumentException(\"Filename is null\");\n }\n File f = new File(filename);\n //if (!f.exists()) sometimes this throws false even if the program does exist.\n //{\n // throw new IllegalArgumentException(\"Path \"+filename+\" does not refer to a file\");\n //}\n return f;\n }",
"boolean hasCompleteFile();",
"private static boolean _pma_checkUploadedFile(String sessionID, String uploadID, String relativePath) {\n\t\ttry {\n\t\t\tString url = (pmaUrl(sessionID).endsWith(\"/\") ? pmaUrl(sessionID) : pmaUrl(sessionID) + \"/\") + \"transfer/Upload/\" + uploadID + \"?sessionID=\" + sessionID;\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"application/json\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tJSONArray jsonArray = jsonResponse.optJSONArray(\"Files\");\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\t\t\tif (jsonArray.getJSONObject(i).optString(\"Path\").equals(relativePath)) {\n\t\t\t\t\t\treturn jsonArray.getJSONObject(i).optBoolean(\"Complete\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isURL() {\n\t\treturn filename.charAt(0) == '?';\n\t}",
"public boolean isRegularFile() {\n\t\treturn isRegularFile;\n\t}"
] | [
"0.6779091",
"0.6393829",
"0.6367751",
"0.6328221",
"0.6257644",
"0.62151855",
"0.6149639",
"0.61011523",
"0.60670155",
"0.6058419",
"0.60380656",
"0.60320777",
"0.5986675",
"0.59836894",
"0.5964035",
"0.59437716",
"0.5942946",
"0.59429145",
"0.5923584",
"0.5888236",
"0.5876903",
"0.5874493",
"0.5867701",
"0.5853197",
"0.5836411",
"0.583001",
"0.58143634",
"0.5811283",
"0.58060026",
"0.5800779",
"0.5796463",
"0.57947314",
"0.57729214",
"0.5762892",
"0.5759989",
"0.57366985",
"0.57224625",
"0.5720265",
"0.57200783",
"0.5711695",
"0.57026535",
"0.5679648",
"0.5664187",
"0.5663671",
"0.56490695",
"0.56444526",
"0.5616911",
"0.55966294",
"0.5595778",
"0.5589054",
"0.55810535",
"0.55640775",
"0.5562326",
"0.5562295",
"0.5559776",
"0.55477697",
"0.5543735",
"0.5543735",
"0.5540925",
"0.55350214",
"0.5531115",
"0.55302006",
"0.5511932",
"0.5511932",
"0.55109864",
"0.55084395",
"0.5468754",
"0.5463903",
"0.5462245",
"0.54502416",
"0.5448449",
"0.5448449",
"0.5448036",
"0.54427975",
"0.5433396",
"0.54278225",
"0.54267323",
"0.5421041",
"0.54156035",
"0.5403849",
"0.5390741",
"0.53890705",
"0.5386974",
"0.5383801",
"0.5380255",
"0.53779334",
"0.53750235",
"0.5372675",
"0.5371296",
"0.53590715",
"0.5349625",
"0.5344442",
"0.5338375",
"0.5336472",
"0.53348887",
"0.53344023",
"0.53295684",
"0.5328358",
"0.53255224",
"0.5320183"
] | 0.783616 | 0 |
get the file path for the HTTP request | private String getFilePath(String sHTTPRequest) {
return sHTTPRequest.replaceFirst("/", "");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}",
"public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }",
"java.lang.String getFilePath();",
"protected File getFile(HttpServletRequest request) {\n String path = request.getPathInfo();\n\n // we want to extract everything after /spa/spaResources/ from the path info. This should cater for sub-directories\n String extractedFile = path.substring(path.indexOf('/', BASE_URL.length() - 1) + 1);\n File folder = SpaModuleUtils.getSpaStaticFilesDir();\n\n //Resolve default index.html\n if (extractedFile.endsWith(\"index.htm\") || !extractedFile.contains(\".\")) {\n extractedFile = \"index.html\";\n }\n\n File file = folder.toPath().resolve(extractedFile).toFile();\n if (!file.exists()) {\n log.warn(\"File with path '{}' doesn't exist\", file.toString());\n return null;\n }\n return file;\n }",
"String getFilePath();",
"private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }",
"String getFilepath();",
"public String getFileName(String request) {\n\t\tString fileName = request.substring(request.indexOf('/') + 1, request.indexOf(\" HTTP\", (request.indexOf('/'))));\n\t\tSystem.out.println(\"Filename is: \" + fileName);\n\n\t\treturn fileName;\n\t}",
"public abstract String getRequestServletPath();",
"Path getFilePath();",
"Path getRequestListFilePath();",
"private static String getPath (HttpServletRequest request) {\n String path = request.getServletPath();\n return path != null ? path : request.getPathInfo();\n }",
"public abstract String getRequestPathInfo();",
"public String getDownloadRequestUrl()\r\n {\r\n String requestUrl;\r\n if ( downloadURI != null )\r\n {\r\n try\r\n {\r\n // dont use whole uri.. only file and query part..!?\r\n requestUrl = URLUtil.getPathQueryFromUri( downloadURI );\r\n return requestUrl;\r\n }\r\n catch (URIException e)\r\n {// failed to use uri.. try other request urls..\r\n NLogger.warn( NLoggerNames.Download_Candidate, e, e );\r\n }\r\n }\r\n \r\n if ( resourceURN != null )\r\n {\r\n requestUrl = URLUtil.buildName2ResourceURL( resourceURN );\r\n }\r\n else\r\n {\r\n // build standard old style gnutella request.\r\n String fileIndexStr = String.valueOf( fileIndex );\r\n StringBuffer urlBuffer = new StringBuffer( 6 + fileIndexStr.length()\r\n + fileName.length() );\r\n urlBuffer.append( \"/get/\" );\r\n urlBuffer.append( fileIndexStr );\r\n urlBuffer.append( '/' ); \r\n urlBuffer.append( URLCodecUtils.encodeURL( fileName ) );\r\n requestUrl = urlBuffer.toString();\r\n }\r\n return requestUrl;\r\n }",
"private File getFile(String fileName, HttpServletRequest request){\n\t\tString fileSite = request.getSession().getServletContext().getRealPath(\"resources/upload\"); // 배포폴더\n\t\treturn new File(fileSite, fileName);\n\t}",
"protected File getJnlpFile(HttpServletRequest request)\n {\n String query = getCodebase(request) + getHref(request) + '?' + request.getQueryString();\n String hash = Integer.toString(query.hashCode()).replace('-', 'a') + \".jnlp\";\n return context.getDataFile(hash);\n }",
"public String getPath() {\n\t\treturn file.getPath();\n\t}",
"private void getFileName() {\n\t\tHeader contentHeader = response.getFirstHeader(\"Content-Disposition\");\n\t\tthis.filename = null;\n\t\tif (contentHeader != null) {\n\t\t\tHeaderElement[] values = contentHeader.getElements();\n\t\t\tif (values.length == 1) {\n\t\t\t\tNameValuePair param = values[0].getParameterByName(\"filename\");\n\t\t\t\tif (param != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfilename = param.getValue();\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}\n\t\tif (this.filename == null) {\n\t\t\tthis.filename = url.substring(url.lastIndexOf(\"/\") + 1);\n\t\t}\n\t}",
"protected String getRequestedResourceName(HttpServletRequest req) throws ServletException {\n\t\tString name = req.getPathInfo();\n\n\t\tif (StringUtils.isEmpty(name))\n\t\t\tthrow new ServletException(\"No filename specified.\");\n\n\t\twhile (name.startsWith(\"/\"))\n\t\t\tname = name.substring(1);\n\n\t\tif (name!=null && name.startsWith(\"../\"))\n\t\t\tthrow new ServletException(\"Not allowed!\");\n\n\t\treturn name;\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}",
"public abstract String getFullPath();",
"String getFile();",
"String getFile();",
"String getFile();",
"public static String getFilePath(Resource resource) {\n\t\treturn getFilePath(resource.getResourceSet(), resource.getURI());\n\t}",
"public String getFilePath() \n\t\tthrows ConnectException, UnexpectedReplyException, InvocationError,\n\t\t\tCompilerInstantiationException\n\t{\n\t\treturn null;\n\t}",
"public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }",
"private static String getHtmlFilePath(RenderRequest request, String htmlFile) {\r\n\t\tString markup = request.getProperty(\"wps.markup\");\r\n\t\tif( markup == null )\r\n\t\t\tmarkup = getMarkup(request.getResponseContentType());\r\n\t\treturn HTML_FOLDER + markup + \"/\" + htmlFile + \".\" + getHtmlExtension(markup);\r\n\t}",
"public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}",
"private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }",
"public String getFileNoPath() {\n if (fileType == HTTP) {\n return fileName.substring(fileName.lastIndexOf(\"/\") + 1);\n } else {\n return fileName.substring(fileName.lastIndexOf(File.separator) + 1);\n }\n }",
"public abstract String getFileLocation();",
"public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}",
"public String formatFilePath(){\n StringBuilder returnResult = new StringBuilder();\n String temp;\n temp = StringUtil.removeHttpPrefix(uri);\n returnResult.append(DEFAULT_DIRECTORY).append(\"\\\\\").append(temp);\n return returnResult.toString();\n }",
"@java.lang.Override\n public java.lang.String getFilePath() {\n return instance.getFilePath();\n }",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"public static String getPath(HttpServletRequest request) {\n return request.getRequestURI().substring(request.getContextPath().length());\n }",
"java.lang.String getFilename();",
"java.lang.String getFilename();",
"private String getPath() {\r\n\t\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\r\n\t\t}",
"private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}",
"public String getFilePath() {\n return theRemoteFilePath;\n }",
"public String getFilePath(Extension extension) {\n\t\treturn extension.eResource().getURI().toString();\n\t}",
"@Override \n public String getPathInfo() {\n if (pathInfo != null) {\n return pathInfo;\n }\n \n StringBuilder buffer = new StringBuilder();\n if (getRequestURIWithoutQuery().length() > 0) {\n if (getScriptName().length() > 0 && getRequestURIWithoutQuery().indexOf(getScriptName()) == 0) {\n buffer.append(getRequestURIWithoutQuery().substring(getScriptName().length()));\n } else {\n buffer.append(getRequestURIWithoutQuery());\n }\n } else {\n buffer.append(getServletPath());\n if (super.getPathInfo() != null) {\n buffer.append(super.getPathInfo());\n }\n }\n return pathInfo = buffer.toString();\n }",
"String getFile() {\n\t\treturn file;\n\t}",
"static String getBase(HttpServletRequest request) {\n String fullPath = request.getRequestURI();\n int baseEnd = getDividingIndex(fullPath);\n return fullPath.substring(0, baseEnd + 1);\n }",
"public String getTemporaryFilePath()\n {\n return callString(\"GetTemporaryFilePath\");\n }",
"Path fileToUpload();",
"private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}",
"public String getFile()\n\t{\n\t\treturn file;\n\t}",
"public String getFile()\n\t{\n\t\treturn file;\n\t}",
"@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}",
"public String getAbsPath();",
"@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }",
"private String getReferentialFilename(final String requestTypeLabel) \n throws CvqException {\n \n if (requestTypeLabel.equals(\"All\")) {\n return commonReferentialFilename;\n } else {\n Iterator servicesIt = parsedRequestServices.iterator();\n IRequestService associatedService = null;\n while (servicesIt.hasNext()) {\n IRequestService service = (IRequestService) servicesIt.next();\n if (service.getLabel().equals(requestTypeLabel))\n associatedService = service;\n }\n \n if (associatedService == null)\n throw new CvqException(\"No service found for \" + requestTypeLabel);\n \n return associatedService.getLocalReferentialFilename();\n }\n }",
"String getFilename();",
"public String getFile(String path){\n return target.path( path ).queryParam( \"view\", \"read\" ).request().get( String.class );\n }",
"public String getFilePath() {\n return getSourceLocation().getFilePath();\n }",
"public java.lang.String getFilepath()\n {\n return filepath;\n }",
"@Override\n protected String getFileName() {\n return path;\n }",
"File getFilePath()\r\n\t{\r\n\t\treturn fFilePath;\r\n\t}",
"@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }",
"String getRealPath(String path);",
"SourceFilePath getFilePath();",
"java.lang.String getFileLoc();",
"public String getFile() {\n \n // return it\n return theFile;\n }",
"public String getURLFilePathname() {\n return mPathname;\n }",
"File getWorkfile();",
"static String getFilePath(URI uri) throws Exception {\n\n\t\tString uriPath = uri.getPath();\n\t\tif (uriPath == null || uriPath.length() == 0) {\n\t\t\tthrow new Exception(\"getFilePath error: provided uri (\" + uri.toString() + \") contains no path component\");\n\t\t}\n\n\t\tString path = uri.toString();\n\t\tif (path.length() > 4 && path.substring(0, 5).equals(\"file:\"))\n\t\t\tpath = path.substring(5);\n\t\t/*\n\t\t * Pattern filePat = Pattern.compile(\"file:/[/]*(.*)\"); Matcher m =\n\t\t * filePat.matcher(uri.toString()); if (m.find()) { // prtln (\"pattern found: \"\n\t\t * + m.group(1)); path = \"/\" + m.group(1); } else { prtln(\"pattern not found\");\n\t\t * }\n\t\t */\n\t\treturn path;\n\t}",
"String getFullWorkfileName();",
"void whenServeFile(String fileName, HttpServletRequest request);",
"public String getEventFilePath() {\r\n\t\treturn this.filePath;\r\n\t}",
"String getRequestURL();",
"String getExternalPath(String path);",
"public String getFilepath() {\n\t\treturn this.filepath;\n\t}",
"@java.lang.Override\n public java.lang.String getFilePath() {\n return filePath_;\n }",
"public String getFilepath()\n\t{\n\t\treturn filepath;\n\t}",
"public String getFileUploadPath() {\n\t\treturn fileUploadPath;\n\t}",
"public final String getPath() {\n\t\treturn this.path.toString();\n\t}",
"public final String getPath()\n {\n return path;\n }",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"public String getFullPath()\n {\n return( fullPath );\n }",
"public String file() {\n return this.file;\n }",
"public String getFilePath()\n {\n return filePath;\n }",
"public abstract String getFotoPath();",
"public String getPath() {\n\t\treturn mFileToPlay;\n\t}",
"public abstract String getPath();",
"public abstract String getPath();",
"public String path() {\n return this.path;\n }"
] | [
"0.7138709",
"0.7071984",
"0.699531",
"0.68856305",
"0.68685293",
"0.68161947",
"0.67807025",
"0.6743172",
"0.6665684",
"0.6651136",
"0.66166615",
"0.65921557",
"0.6550765",
"0.64477086",
"0.6421631",
"0.63855785",
"0.63853836",
"0.6379949",
"0.6344093",
"0.6338368",
"0.6331607",
"0.62988645",
"0.62988645",
"0.62988645",
"0.6291453",
"0.62869364",
"0.62854457",
"0.6278999",
"0.6237829",
"0.6202796",
"0.61743224",
"0.6141297",
"0.6136888",
"0.61135864",
"0.61075205",
"0.61035323",
"0.61035323",
"0.61035323",
"0.61035323",
"0.61035323",
"0.6083538",
"0.6083538",
"0.6083538",
"0.6083538",
"0.6066081",
"0.6066081",
"0.6066081",
"0.6064608",
"0.6060186",
"0.6060186",
"0.605125",
"0.603558",
"0.60240966",
"0.60179114",
"0.5995823",
"0.5994196",
"0.5986668",
"0.5981207",
"0.5978474",
"0.5973046",
"0.594596",
"0.594596",
"0.5944753",
"0.59445626",
"0.5937472",
"0.59323025",
"0.59304535",
"0.59151137",
"0.5913843",
"0.5906945",
"0.59030676",
"0.58989096",
"0.5888484",
"0.5885945",
"0.5881524",
"0.58777726",
"0.5871673",
"0.5868513",
"0.5868461",
"0.5852815",
"0.5849711",
"0.5844877",
"0.5844289",
"0.58440906",
"0.58440113",
"0.5842603",
"0.5842468",
"0.5828949",
"0.5815845",
"0.58143026",
"0.5812965",
"0.58090085",
"0.5800102",
"0.5797767",
"0.57918435",
"0.57858276",
"0.5771375",
"0.5769662",
"0.5769662",
"0.57660055"
] | 0.7689751 | 0 |
INITIALIZATION HELPERS get list of valid file requests | private List<String> getValidFiles(File currentFolder) {
File[] subFiles = currentFolder.listFiles();
List<String> sValidFiles = new ArrayList<>();
// recurse through root directory, http://stackoverflow.com/questions/1844688/read-all-files-in-a-folder
// valid file must not be a directory, not be the redirect file, and be a supported content type
if (subFiles != null) {
for (File fileEntry : subFiles) {
String sFileName = fileEntry.getPath();
if (fileEntry.isDirectory()) {
sValidFiles.addAll(getValidFiles(fileEntry));
} else if (isValidContentType(sFileName) && !sFileName.equals(REDIRECT_FILE_NAME)) {
sValidFiles.add(sFileName.replaceFirst(".","").toLowerCase());
}
}
}
return sValidFiles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Path getRequestListFilePath();",
"List getFileUploads(HttpServletRequest request) throws ValidationException;",
"List getFileUploads(HttpServletRequest request, File finalDir) throws ValidationException;",
"@Override\n public Map<String, List<String>> getSubmissionFiles(SubmissionFilesRequest request) {\n Map<String, List<String>> result = null;\n List<File> files = new ArrayList<>();\n String token = request.getFilesToken();\n String[] arr = token.split(\"~\");\n String firstFile = \"\";\n String secondFile = \"\";\n\n String extension = \"\";\n if (arr != null && arr.length >= 2) {\n int indexFirstFile = arr[0].lastIndexOf(\"_\");\n int indexSecondFile = arr[1].lastIndexOf(\"_\");\n if (indexFirstFile > 0 && indexSecondFile > 0) {\n firstFile = arr[0].substring(0, indexFirstFile);\n secondFile = arr[1].substring(0, indexSecondFile);\n if (firstFile.contains(EXTENSION_JAVA) && secondFile.contains(EXTENSION_JAVA)) {\n extension = EXTENSION_JAVA;\n } else if (firstFile.contains(EXTENSION_CSHARP) && secondFile.contains(EXTENSION_CSHARP)) {\n extension = EXTENSION_CSHARP;\n } else if (firstFile.contains(EXTENSION_C) && secondFile.contains(EXTENSION_C)) {\n extension = EXTENSION_C;\n }\n FileManager.getAllFiles(PATH_SERVER_REPOSITORY, files, extension);\n if (files.size() > 0) {\n result = new HashMap<>();\n if (!firstFile.equals(\"\") && !secondFile.equals(\"\")) {\n for (File file : files) {\n String fileName = file.getName();\n if ((fileName.contains(firstFile) || fileName.contains(secondFile)) && fileName.contains(request.getExamCode())) {\n try {\n if (!result.containsKey(fileName)) {\n List<String> fileString = Files.readAllLines(Paths.get(file.getAbsolutePath()));\n result.put(fileName, fileString);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }\n }\n return result;\n }",
"public void loadFileList() {\n\n if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else {\n new MakeRequestTask(mCredential,MakeRequestTask.TASK_TYPE_FILELIST).execute();\n\n }\n }",
"public HTTPFileArg[] getHTTPFiles() {\n final HTTPFileArgs fileArgs = getHTTPFileArgs();\n return fileArgs == null ? new HTTPFileArg[] {} : fileArgs.asArray();\n }",
"public List findOutputFiles(List _requestIdList) throws RequestManagerException, PersistenceResourceAccessException;",
"public List checkApprovedFiles() throws LMSException;",
"public abstract List<String> getFiles( );",
"private boolean isValidFile(String sHTTPRequest) {\n String sRootFolder = \"/\" + ROOT_FOLDER.getName();\n return sAvailableFiles.contains(sRootFolder + sHTTPRequest.toLowerCase());\n }",
"public List<File> returnFiles(HttpServletRequest request, ServletContext context) {\n boolean isMultipart = ServletFileUpload.isMultipartContent(request);\n return isMultipart ? getFiles(request, context, null) : new ArrayList<File>();\n }",
"public List<File> getFiles();",
"@Override\n public Iterable<File> list(File storageDirectory, FilenameFilter filter) {\n\treturn null;\n }",
"public List<String> checkFiles() {\n List<String> instances = new ArrayList<String>();\n if (StringUtils.isBlank(getPathOffset())) return instances;\n File[] directories = listFiles(new File(getPathOffset()), \"gcm_\");\n for (File dir : directories) {\n File[] files = listFiles(new File(dir.toString() + \"\\\\logs\"), \"GcmWebServices\");\n for (File file : files)\n instances.add(file.toString());\n }\n return instances;\n }",
"public abstract List<File> listFiles() throws AccessException;",
"public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }",
"private void postValidationNoArrayOfFiles() throws APIRestGeneratorException\r\n\t{\r\n\t\tfinal Iterator<Response> iterator = this.localResponses.getResponsesMap().values().iterator() ;\r\n\t\tboolean found \t\t\t\t = false ;\r\n\t\t\r\n\t\twhile (iterator.hasNext() && !found)\r\n\t\t{\r\n\t\t\tfinal Response response = iterator.next() ;\r\n\t\t\tfinal Item responseItem = response.getItem() ;\r\n\t\t\tif (responseItem instanceof ItemArray)\r\n\t\t\t{\r\n\t\t\t\tfinal Item itemBaseArray = ((ItemArray) responseItem).calculateBaseType() ;\r\n\t\t\t\tfound = itemBaseArray instanceof ItemFile ;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (found)\r\n\t\t{\r\n\t\t\tfinal String errorString = \"The path '\" + this.pathValue + \"' ('\" + this.pathOp + \"' operation) cannot contain a response with an array of files\" ;\r\n\t\t\t\r\n\t\t\tResponsesPostValidator.LOGGER.error(errorString) ;\r\n\t \tthrow new APIRestGeneratorException(errorString) ;\r\n\t\t}\r\n\t}",
"public List findOutputFiles(long _requestId) throws RequestManagerException, PersistenceResourceAccessException;",
"public List getFiles(HasMetricsFilter filter) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n List<BaseFileInfo> result = newArrayList();\n for (BaseFileInfo fileInfo : fileLookup.values()) {\n if (filter.accept(fileInfo)) {\n result.add(fileInfo);\n }\n }\n return result;\n }",
"public List<String> getFiles();",
"public List<FileWithFaultLocations> getFaultyFiles();",
"private ListFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public boolean requestListFiles() throws IOException, PacketException, UtilDatagramException {\n\t\tboolean success = false;\n\n\t\ttry {\n\t\t\tFile[] fileArray = null; \n\n\t\t\tPacket responsePacket = this.requestServer(FileTransferProtocol.LIST_FILES);\n\n\t\t\tbyte[] responseBytes = responsePacket.getPayloadBytes();\n\t\t\t\n\t\t\tthis.showNamedMessage(\"Server response received, now processing...\"); \n\t\t\tfileArray = util.Bytes.deserialiseByteArrayToFileArray(responseBytes);\n\t\t\tthis.serverFiles = fileArray;\n\t\t\tthis.printArrayOfFile(fileArray);\n\t\t\t\n\t\t\tsuccess = true;\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthis.showNamedError(\"Problems with received data: \" + e.getLocalizedMessage());\n\t\t} catch (EmptyResponseException e) {\n\t\t\tthis.showNamedError(\"Response from server was empty: \" + e.getLocalizedMessage());\n\t\t} catch (ServerFailureException e) {\n\t\t\tthis.showNamedError(\"FAILURE> \" + e.getLocalizedMessage());\n\t\t}\n\n\t\treturn success;\n\t}",
"List<SdkHttpRequest> getRequests();",
"@Override\n\tpublic String[] query() {\n\t\t// Return an array of (decoded) filenames\n\t\tif (!serviceDir.exists()) {\n\t\t\treturn new String[0];\n\t\t}\n\t\tFile[] files = serviceDir.listFiles();\n\t\tString[] addrs = new String[files.length];\n\t\tfor (int i = 0; i < addrs.length; ++i) {\n\t\t\taddrs[i] = decode(files[i].getName());\n\t\t}\n\t\treturn addrs;\n\t}",
"public void enquire_files()\n {\n out.println(\"ENQUIRY\");\n String rd_in = null;\n Matcher m_eom = eom.matcher(\"start\"); // initializing the matcher. \"start\" does not mean anything\n // get filenames till EOM message is received and update the files list\n try\n {\n while(!m_eom.find())\n {\n rd_in = in.readLine();\n m_eom = eom.matcher(rd_in);\n if(!m_eom.find())\n {\n String filename = rd_in;\n cnode.files.add(filename);\n } \n else { break; } // break out of loop when EOM is received\n }\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }",
"private String handleFindFileRequest(String request) {\r\n\t\tString[] commandFragments = Utils.splitCommandIntoFragments(request);\r\n\t\t// TODO validation here\r\n\t\tString[] filesFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[0]);\r\n\t\tString[] failedPeerList = Utils.getKeyAndValuefromFragment(commandFragments[1], SharedConstants.NO_LIMIT_SPLIT);\r\n\r\n\t\tString peers = findPeersForFile(filesFromCommandFrag[1], failedPeerList[1]);\r\n\t\treturn peers;\r\n\t}",
"@Test\n public void filesValidateTest() throws ApiException {\n String owner = null;\n String repo = null;\n FilesValidate data = null;\n api.filesValidate(owner, repo, data);\n\n // TODO: test validations\n }",
"private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}",
"private List<org.jajuk.base.File> getFiles() {\n List<org.jajuk.base.File> files;\n if (Mode.DJ.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getDJFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Ambience.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getAmbienceFiles((String) data.get(Variable.ITEM));\n } else if (Mode.Playlist.equals(data.get(Variable.MODE))\n || Mode.ProvidedPlaylist.equals(data.get(Variable.MODE))) {\n try {\n Playlist tempPlaylist = (Playlist) data.get(Variable.TEMP_PLAYLIST);\n files = UtilPrepareParty.getPlaylistFiles((String) data.get(Variable.ITEM), tempPlaylist);\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Shuffle.equals(data.get(Variable.MODE))) {\n files = UtilPrepareParty.getShuffleFiles();\n } else if (Mode.BestOf.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBestOfFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Queue.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getQueueFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Bookmarks.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getBookmarkFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else if (Mode.Novelties.equals(data.get(Variable.MODE))) {\n try {\n files = UtilPrepareParty.getNoveltiesFiles();\n } catch (JajukException e1) {\n Log.error(e1);\n return null;\n }\n } else {\n throw new IllegalArgumentException(\"Unknown mode in PreparePartyWizard: \"\n + data.get(Variable.MODE));\n }\n // filter by media first\n if (isTrue(Variable.ONE_MEDIA_ENABLED) && !isTrue(Variable.CONVERT_MEDIA)) {\n files = UtilPrepareParty.filterMedia(files, (String) data.get(Variable.ONE_MEDIA));\n }\n // then filter out by rating\n if (data.containsKey(Variable.RATING_LEVEL)) {\n files = UtilPrepareParty.filterRating(files, (Integer) data.get(Variable.RATING_LEVEL));\n }\n // filter max length\n if (isTrue(Variable.MAXLENGTH_ENABLED)) {\n files = UtilPrepareParty.filterMaxLength(files, (Integer) data.get(Variable.MAXLENGTH));\n }\n // filter max size\n if (isTrue(Variable.MAXSIZE_ENABLED)) {\n files = UtilPrepareParty.filterMaxSize(files, (Integer) data.get(Variable.MAXSIZE));\n }\n // filter max tracks\n if (isTrue(Variable.MAXTRACKS_ENABLED)) {\n files = UtilPrepareParty.filterMaxTracks(files, (Integer) data.get(Variable.MAXTRACKS));\n }\n return files;\n }",
"@GetMapping(\"/files\")\n public ResponseEntity<List<FileInfo>> getListFiles() {\n List<FileInfo> fileInfos = storageService.loadAll().map(path -> {\n String filename = path.getFileName().toString();\n String url = MvcUriComponentsBuilder\n .fromMethodName(FilesController.class, \"getFile\", path.getFileName().toString()).build().toString();\n\n return new FileInfo(filename, url);\n }).collect(Collectors.toList());\n\n return ResponseEntity.status(HttpStatus.OK).body(fileInfos);\n }",
"List<UploadInfo> simpleUploadAll(List<SimpleFile> files);",
"public List<FileUpload> getFileUploads(int numberOfFileUploads, Long startIndex) throws AppException;",
"public static ArrayList<Request> loadRequests() {\n ArrayList<Request> requests = new ArrayList<Request>();\n try {\n Connection connection = DBHelper.getConnection();\n PreparedStatement statement = connection.prepareStatement(\"SELECT * \" + \n \"FROM requestsToApprove\");\n ResultSet results = statement.executeQuery();\n while (results.next()) {\n\n Resource tempResource = Resource.getResource(results.getInt(\"rID\"));\n if (tempResource != null) {\n // resource exits\n requests.add(new Request(results.getString(\"username\"),\n tempResource));\n } // otherwise do nothing. Should warn user\n\n }\n return requests;\n\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public List<File> getListing(){\n\t return getFileList(new File(defaultPath));\n }",
"void getRequests();",
"public abstract List<LocalFile> getAllFiles();",
"java.util.List<entities.Torrent.FileInfo>\n getFilesList();",
"public List<File> returnFiles(HttpServletRequest request, ServletContext context, FileRenamePolicy fileRenamePolicy) {\n this.fileRenamePolicy = fileRenamePolicy;\n boolean isMultipart = ServletFileUpload.isMultipartContent(request);\n return isMultipart ? getFiles(request, context, null) : new ArrayList<File>();\n }",
"@SuppressWarnings(\"unchecked\")\n public static List<DiskFileItem> getUploadFileList(HttpServletRequest hReq) throws FileUploadException {\n \n int maxSizeMega = ProjectConfigUtil.getIntValue(\"contents.upload.maxfilesize\", 100);\n \n DiskFileItemFactory factory = null;\n ServletFileUpload servletFileUpload = null;\n \n int maxSize = maxSizeMega * 1024 * 1024;\n logger.debug(\"MaxFile Size is {}.\", maxSize);\n \n int sizeThreshold = 1024 * 1024 * 2;\n factory = new DiskFileItemFactory();\n factory.setSizeThreshold(sizeThreshold);\n \n servletFileUpload = new ServletFileUpload(factory);\n servletFileUpload.setSizeMax(maxSize);\n \n ProgressListener progressListener = new SessionUpdatingProgressListener(hReq);\n servletFileUpload.setProgressListener(progressListener);\n \n return servletFileUpload.parseRequest(hReq);\n }",
"@Test\n public void filesGetTest() throws ApiException {\n Integer limit = null;\n Integer offset = null;\n List<FileInfo> response = api.filesGet(limit, offset);\n\n // TODO: test validations\n }",
"private Collection<File> getInputFiles(String docRoot) {\r\n File dir = new File(docRoot);\r\n if (testXMLDir == null || !dir.isDirectory() || !dir.canRead()) {\r\n throw new RuntimeException(\"unable to read from this directory: \" + testXMLDir);\r\n }\r\n Collection<File> xmlFiles = new ArrayList<File>();\r\n xmlFiles = listFileNames(dir,xmlFiles);\r\n return xmlFiles;\r\n }",
"default List<String> getinputfilehdrs(String filename){\n List<String> headerlist = new ArrayList<>();\r\n return headerlist;\r\n }",
"public List<RuleFailure> check(FoundFiles filesToCheck) {\n List<RuleFailure> failures = new LinkedList<>();\n\n AtomicInteger count = new AtomicInteger();\n\n filesToCheck.fileRequests()\n .stream()\n .filter(this::include)\n .forEach(fr -> {\n count.incrementAndGet();\n processFile(fr, failures);\n });\n\n if (failures.size() == 0) {\n Log.info(\"Inclusive naming processed \" + count.get() + \" files.\");\n } else {\n Log.info(\"Inclusive naming processed \" + count.get() + \" files, found \" + failures.size() + \" errors\");\n }\n return failures;\n }",
"public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Filename>\");\n\t\tSystem.out.println(\"To refresh type command: refresh\");\n\t\tSystem.out.println(\"To disconnect type command: disconnect\");\n\t}",
"java.util.List<TransmissionProtocol.Request> \n getRequestList();",
"private void listFiles(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\r\n\t\tArrayList files=up.listAllFiles(appPath);\r\n\t\r\n\t\t\r\n\t RequestDispatcher dispatcher = request.getRequestDispatcher(\"display.jsp\");\r\n\t\t\trequest.setAttribute(\"listfiles\", files); \r\n\t dispatcher.forward(request, response);\r\n\t \t \r\n\t \t \r\n\t \t \r\n\t}",
"private void listFiles(JSONArray parameter) {\n String response = \"Files and Directorys to list: \";\n if (parameter.size() == 1) {\n File file = new File((String) parameter.get(0));\n for (String s : file.list()) {\n response = response + \"\\n\" + s;\n }\n clientResponse(response);\n } else {\n failedClientResponse(\"Wrong Parameters! -400\");\n }\n }",
"List<Path> getFiles();",
"public List<File> returnFiles(HttpServletRequest request, ServletContext context, String dirToSaveUploadedFileIn) {\n boolean isMultipart = ServletFileUpload.isMultipartContent(request);\n return isMultipart ? getFiles(request, context, createDirectoryIfDoesntExist(dirToSaveUploadedFileIn)) : new ArrayList<File>();\n }",
"public static File[] getHttpExportDirectoryFiles() {\n\t\tif (xml == null) return new File[0];\n\t\treturn httpExportDirectoryFiles;\n\t}",
"protected ValidatorResources loadResources(ServletContext ctx)\n throws IOException, ServletException {\n if ((pathnames == null) || (pathnames.length() <= 0)) {\n return null;\n }\n\n StringTokenizer st = new StringTokenizer(pathnames, RESOURCE_DELIM);\n\n List urlList = new ArrayList();\n ValidatorResources resources = null;\n try {\n while (st.hasMoreTokens()) {\n String validatorRules = st.nextToken().trim();\n\n if (LOG.isInfoEnabled()) {\n LOG.info(\"Loading validation rules file from '\"\n + validatorRules + \"'\");\n }\n\n URL input =\n ctx.getResource(validatorRules);\n\n // If the config isn't in the servlet context, try the class\n // loader which allows the config files to be stored in a jar\n if (input == null) {\n input = getClass().getResource(validatorRules);\n }\n\n if (input != null) {\n urlList.add(input);\n } else {\n throw new ServletException(\n \"Skipping validation rules file from '\"\n + validatorRules + \"'. No url could be located.\");\n }\n }\n\n int urlSize = urlList.size();\n String[] urlArray = new String[urlSize];\n\n for (int urlIndex = 0; urlIndex < urlSize; urlIndex++) {\n URL url = (URL) urlList.get(urlIndex);\n\n urlArray[urlIndex] = url.toExternalForm();\n }\n\n resources = new ValidatorResources(urlArray);\n } catch (SAXException sex) {\n LOG.error(\"Skipping all validation\", sex);\n throw new StrutsException(\"Skipping all validation because the validation files cannot be loaded\", sex);\n }\n return resources;\n }",
"public List<String> getFileFilters() {\n/* 420 */ List<String> retval = null;\n/* 421 */ COSBase filters = this.stream.getDictionaryObject(COSName.F_FILTER);\n/* 422 */ if (filters instanceof COSName) {\n/* */ \n/* 424 */ COSName name = (COSName)filters;\n/* 425 */ retval = new COSArrayList<String>(name.getName(), (COSBase)name, (COSDictionary)this.stream, COSName.F_FILTER);\n/* */ \n/* */ }\n/* 428 */ else if (filters instanceof COSArray) {\n/* */ \n/* */ \n/* 431 */ retval = COSArrayList.convertCOSNameCOSArrayToList((COSArray)filters);\n/* */ } \n/* 433 */ return retval;\n/* */ }",
"@Override\n public Iterable<File> list(File storageDirectory) {\n\treturn null;\n }",
"private void initializeFileArrays(){\n File downloadedFilesFolder = new File(MainActivity.DB_PATH);\n File[] files = downloadedFilesFolder.listFiles();\n System.out.println(\"*** \" + files.length + \" ***\");\n if(files != null){\n System.out.println(\"*** \" + files.length + \" ***\");\n for(File f : files){\n if(f != null){\n System.out.println(\"***\\n FILE FOUND - \" + f.getAbsolutePath()+\"\\nSIZE - \" +\n f.length() + \" BYTES \\n***\");\n fileNames.add(f.getName());\n fileSizes.add(f.length()+\"\");\n this.files.add(f);\n }\n }\n }\n }",
"public Enumeration<String> getFileParameterNames() {\n return this.multipart.getFileNames();\n }",
"public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}",
"protected final List<FileObjectView> computeInvokableFiles() {\n if (currentFiles == null || currentFiles.length == 0) {\n return Collections.EMPTY_LIST;\n }\n final List<FileObjectView> r = new ArrayList();\n for (int i = 0; i < currentFiles.length; i++) {\n if (invokable(currentFiles[i])) {\n r.add(currentFiles[i]);\n }\n }\n return r;\n }",
"private static void testFileSearch(TrackingServer ts) {\r\n\t\tString requestFormat = \"FIND=%s|FAILED_SERVERS=%s\";\r\n\t\tString finalRequest = null;\r\n\t\tStringBuilder failedPeer = null;\r\n\t\tts.readL.lock();\r\n\t\ttry {\r\n\t\t\tfor (Entry<String, HashSet<Machine>> entry : ts.filesServersMap.entrySet()) {\r\n\t\t\t\tfailedPeer = new StringBuilder();\r\n\t\t\t\tfor (Machine m : entry.getValue()) {\r\n\t\t\t\t\tfailedPeer.append(m.toString());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tfinalRequest = String.format(requestFormat, entry.getKey(), failedPeer.toString());\r\n\t\t\t\tbyte[] result = ts.handleSpecificRequest(finalRequest);\r\n\t\t\t\tSystem.out.println(\"result of find=\" + Utils.byteToString(result) + \" entrySet=\" + entry.getValue());\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tts.readL.unlock();\r\n\t\t}\r\n\r\n\t}",
"protected File[] getFiles() {\r\n DirectoryScanner scanner = new DirectoryScanner(rootDir,true,\"*.xml\");\r\n List<File> files = scanner.list();\r\n return files.toArray(new File[files.size()]);\r\n }",
"java.util.List<ds.hdfs.generated.FileMetadata> \n getFilesList();",
"public List<String> getFiles() throws IOException {\n toServer.println(\"getFiles\");\n toServer.flush();\n\n List<String> files = new ArrayList<>();\n\n while (true) {\n String filename = fromServer.readLine();\n if (filename.isEmpty()) { break; }\n\n files.add(filename);\n }\n\n return files;\n }",
"java.util.List<pb4client.TransportRequest> \n getReqList();",
"private static List<BufferedInputStream> getOpenFiles(String[] args) {\n return Stream.of(args)\n .map(Paths::get)\n .map(EntryPoint::openFile)\n .filter(Optional::isPresent)\n .map(Optional::get)\n .map(BufferedInputStream::new)\n .collect(Collectors.toList());\n }",
"public StupidContainer generateFileList() throws Exception {\n\t\tint tries = 0;\n\t\tStupidContainer parsingResults;\n\n\t\tdo {\n\t\t\ttries++;\n\t\t\tparsingResults = populateFileList();\n\n\t\t\tif (parsingResults.sourceFiles == null)\n\t\t\t\tcontinue;\n\n\t\t\tif (checkValidCodebase(parsingResults.sourceFiles.size()))\n\t\t\t\tbreak;\n\n\t\t} while (tries < ATTEMPTS);\n\n\t\tif (tries > ATTEMPTS)\n\t\t\treturn null;\n\n\t\treturn parsingResults;\n\t}",
"private ListFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public List<String> validate()\n {\n List<String> errs = new ArrayList<String>();\n\n if (StringUtils.isEmpty(startingUrl))\n errs.add(\"Missing starting URL.\");\n else\n {\n String[] schemes = {\"http\", \"https\"};\n UrlValidator urlValidator = new UrlValidator(schemes);\n if (!urlValidator.isValid(startingUrl))\n errs.add(\"Invalid starting URL.\");\n }\n\n if (StringUtils.isEmpty(outputPath))\n errs.add(\"Missing output path.\");\n else\n {\n try\n {\n Path path = Paths.get(outputPath);\n File dir = path.toFile();\n if (!dir.exists())\n dir.mkdirs();\n else if (!dir.isDirectory())\n errs.add(\"Output path exists but is not a directory.\");\n }\n catch (Exception ex)\n {\n errs.add(\"Invalid output path or unable to create the directory.\");\n }\n }\n\n if (StringUtils.isEmpty(resultFile))\n errs.add(\"Missing result file.\");\n else if (errs.isEmpty())\n {\n // Only do this check if the output path is valid.\n try\n {\n Paths.get(outputPath, resultFile);\n }\n catch (Exception ex)\n {\n errs.add(\"Invalid result file.\");\n }\n }\n\n if (numThreads < CrawlerImpl.MIN_THREADS)\n numThreads = CrawlerImpl.MIN_THREADS;\n\n if (crawlTimeoutSeconds < MIN_CRAWL_TIMEOUT_SECONDS)\n crawlTimeoutSeconds = MIN_CRAWL_TIMEOUT_SECONDS;\n\n return errs;\n }",
"@Override\n public Iterator<Path> iterator() {\n SecurityManager securityManager;\n try {\n securityManager = System.getSecurityManager();\n if (securityManager == null) return this.val$allowedList.iterator();\n }\n catch (SecurityException securityException) {\n return Collections.emptyList().iterator();\n }\n securityManager.checkRead(UnixFileSystem.this.rootDirectory.toString());\n return this.val$allowedList.iterator();\n }",
"MovilizerRequest getRequestFromFile(Path filePath);",
"protected abstract String getAllowedRequests();",
"public List<RAFFileEntry> getFileEntries() {\n\t\treturn fileEntries;\n\t}",
"private ArrayList<ResultPair> InitializeManualUrls()\n {\n\t ArrayList<ResultPair> fileUrls = new ArrayList<ResultPair>();\n\t fileUrls.add(new ResultPair(\"https://www.google.com\", true));\n\t fileUrls.add(new ResultPair(\"https://///www.google.com\", false));\n\t fileUrls.add(new ResultPair(\"\", false));\n\t fileUrls.add(new ResultPair(\"http://74.125.224.72/\", true));\n\t fileUrls.add(new ResultPair(\"file:///C:/\", true));\n\t fileUrls.add(new ResultPair(\"http://WWW.GOOGLE.COM\", true));\n\t fileUrls.add(new ResultPair(\"http://www.google.com:80/test1\", true));\n\t fileUrls.add(new ResultPair(\"h3t://go.cc:65a/$23?action=edit&mode=up\", false));\n\t fileUrls.add(new ResultPair(\"12345\", false));\n\t fileUrls.add(new ResultPair(\"http://www.space in here.com\", false));\n\t fileUrls.add(new ResultPair(\"http://site.com/#citation\", true));\n\t fileUrls.add(new ResultPair(\"ftp://site.com\", true));\n\t fileUrls.add(new ResultPair(\"http://site.com/hyphen-here\", true));\n\t fileUrls.add(new ResultPair(\"http://www.example.com:8080\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com/there?name=ferret\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:8042/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"http://[email protected]\", true));\n\t fileUrls.add(new ResultPair(\"http://142.10.5.2:8080/\", true));\n\t return fileUrls;\n }",
"public List getAll() throws FileNotFoundException, IOException;",
"boolean hasRetrieveFileResponse();",
"String[] getFileTypes();",
"private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}",
"public List listFiles(String path);",
"List<String> getFiles(String path) throws IOException;",
"@Override\n\tpublic String[] GetFileServers() {\n\t\tString fservers[]=new String[list.size()];\n\t\tint i=0;\n\t\tfor(String s:list){\n\t\t\tfservers[i++]=s;\n\t\t}\n\t\treturn fservers;\n\t}",
"public String[] getListOfFiles() {\n\t\treturn listOfFiles;\n\t}",
"@GetMapping(\"/all\")\r\n\tpublic List<FileModel> getListFiles() {\r\n\t\treturn fileRepository.findAll();\r\n\t}",
"java.util.List<Rsp.RequestFromSelf>\n getRequestsList();",
"public List <WebFile> getChildFiles()\n{\n if(_type==FileType.SOURCE_DIR) return getSourceDirChildFiles();\n return _file.getFiles();\n}",
"java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo> \n getEntryList();",
"public ArrayList<File> findRelevantFiles (int reimburseID);",
"public List<Resource> getFileLocations() throws IOException;",
"public boolean getUseFiles();",
"private boolean _checkFiles() throws SessionException {\n String[] files = (String[]) this._argTable\n .get(UtilCmdParser.KEYWORD_FILES);\n if (files == null) {\n files = new String[] { \"*\" };\n\n }\n boolean longList = false;\n boolean verylongList = false;\n\n if (this._argTable.get(CMD.LONG) != null) {\n this._client.setVerbose(true);\n longList = true;\n }\n if (this._argTable.get(CMD.VERYLONG) != null) {\n this._client.setVeryVerbose(true);\n verylongList = true;\n }\n\n String before = (String) this._argTable.get(CMD.BEFORE);\n String after = (String) this._argTable.get(CMD.AFTER);\n String between = (String) this._argTable.get(CMD.BETWEEN);\n String and = (String) this._argTable.get(CMD.AND);\n String format = (String) this._argTable.get(CMD.FORMAT);\n \n this._dateFormatter = new DateTimeFormatter(format);\n\n int transId;\n\n try {\n if (before != null) {\n transId = this._client.showBefore(\n this._dateFormatter.parseDate(before), \n files[0]);\n } else if (after != null) {\n transId = this._client.showAfter(\n this._dateFormatter.parseDate(after),\n files[0]);\n } else if (between != null && and != null) {\n transId = this._client.showBetween(\n this._dateFormatter.parseDate(between), \n this._dateFormatter.parseDate(and),\n files[0]);\n } else if (before == null && after == null && between == null\n && and == null) {\n transId = this._client.show(files[0]);\n }\n } catch (ParseException e) {\n throw new SessionException(e.getMessage(), -1);\n }\n\n int count = 0;\n while (this._client.getTransactionCount() > 0) {\n Result r = this._client.getResult();\n if (r == null) {\n continue;\n }\n\n if (r.getErrno() == Constants.NO_FILES_MATCH) {\n this._logger.info(r.getMessage());\n continue;\n } else if (r.getErrno() == Constants.OK) {\n count++;\n if (!longList && !verylongList) {\n this._logger.info(new PrintfFormat(\"%5d. \").sprintf(count)\n + new PrintfFormat(\"%.125s\").sprintf(r.getName()));\n } else {\n this._logger.info(new PrintfFormat(\"%5d. \").sprintf(count)\n + new PrintfFormat(\"%22s, %12d, %.125s\")\n .sprintf(new Object[] {\n this._dateFormatter.formatDate(\n r.getFileModificationTime()),\n new Long(r.getSize()), r.getName() }));\n if (verylongList) {\n this._logger.info(\" \"\n + new PrintfFormat(\"[Contributor] %s\").sprintf(r\n .getFileContributor()));\n\n this._logger.info(\" \"\n + new PrintfFormat(\"[Created] %s\").sprintf(\n this._dateFormatter.formatDate(\n r.getFileCreationTime())));\n\n if (r.getChecksum() != null) {\n this._logger.info(\" \"\n + new PrintfFormat(\"[Checksum] %s\").sprintf(r\n .getChecksumStr()));\n }\n if (r.getComment() != null) {\n this._logger.info(\" \"\n + new PrintfFormat(\"[Comment] \\\"%s\\\"\").sprintf(r\n .getComment()));\n }\n if (r.getArchiveNote() != null) {\n this._logger.info(\" \"\n + new PrintfFormat(\"[Archive note] \\\"%s\\\"\")\n .sprintf(r.getArchiveNote()));\n }\n }\n }\n File file = new File(r.getName());\n if (!file.exists() || file.isDirectory()) {\n this._logger.info(\" - No such file.\");\n }\n } else {\n ++this._errorCount;\n }\n }\n return true;\n }",
"@Override\n public FileStatus[] listStatus(JobConf job) throws IOException {\n Path[] dirs = getInputPaths(job);\n if (dirs.length == 0) {\n throw new IOException(\"No input paths specified in job\");\n }\n\n List<FileStatus> result = new ArrayList<FileStatus>();\n List<IOException> errors = new ArrayList<IOException>();\n \n // creates a MultiPathFilter with the hiddenFileFilter and the\n // user provided one (if any).\n List<PathFilter> filters = new ArrayList<PathFilter>();\n filters.add(hiddenFileFilter);\n PathFilter jobFilter = getInputPathFilter(job);\n if (jobFilter != null) {\n filters.add(jobFilter);\n }\n PathFilter inputFilter = new MultiPathFilter(filters);\n\n ArrayList<Integer> fileNumberList = new ArrayList<Integer>();\n int index = 0;\n for (Path p: dirs) {\n FileSystem fs = p.getFileSystem(job); \n FileStatus[] matches = fs.globStatus(p, inputFilter);\n if (matches == null) {\n errors.add(new IOException(\"Input path does not exist: \" + p));\n } else if (matches.length == 0) {\n errors.add(new IOException(\"Input Pattern \" + p + \" matches 0 files\"));\n } else {\n for (FileStatus globStat: matches) {\n if (globStat.isDir()) {\n FileStatus[] fileStatuses = fs.listStatus(globStat.getPath(), inputFilter);\n // reorder according to CG index\n BasicTable.Reader reader = readers.get(index);\n reader.rearrangeFileIndices(fileStatuses);\n for(FileStatus stat: fileStatuses) {\n if (stat != null)\n result.add(stat);\n }\n fileNumberList.add(fileStatuses.length);\n } else {\n result.add(globStat);\n fileNumberList.add(1);\n }\n }\n }\n index++;\n }\n fileNumbers = new Integer[fileNumberList.size()];\n fileNumberList.toArray(fileNumbers);\n\n if (!errors.isEmpty()) {\n throw new InvalidInputException(errors);\n }\n LOG.info(\"Total input paths to process : \" + result.size()); \n return result.toArray(new FileStatus[result.size()]);\n }",
"private void parseFiles() throws ParserException{\n NodeList fileNodesList = root.getElementsByTagName(\"file\");\n for(int i=0; i<fileNodesList.getLength(); i++){\n filesToProcess.add(getFile((Element) fileNodesList.item(i)));\n }\n }",
"public List<File> returnFiles(HttpServletRequest request, ServletContext context, String dirToSaveUploadedFileIn, FileRenamePolicy fileRenamePolicy) {\n this.fileRenamePolicy = fileRenamePolicy;\n boolean isMultipart = ServletFileUpload.isMultipartContent(request);\n return isMultipart ? getFiles(request, context, createDirectoryIfDoesntExist(dirToSaveUploadedFileIn)) : new ArrayList<File>();\n }",
"private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }",
"@RequestMapping(method=RequestMethod.GET, value =\"/file\")\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic BatchStatus processFile() {\n\t\tSystem.out.println(\"Request received to process input transactions file\");\n\t\treturn FileProcessorService.processInputTransactionsFile();\n\t}",
"public String[] getFilesOnServer() {\n Log.i(\"getFilesFor\", \"Getting all files on server available to \"\n + new KeyGenerator(context).getPublicKeyAsString());\n Cursor resultSet = database.rawQuery(\n \"SELECT DISTINCT File FROM FileKeys WHERE UserPublicKey = \" +\n \"'\" + new KeyGenerator(context).getPublicKeyAsString() + \"'\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }",
"private void checkFileNames(DSpaceRunnable dSpaceRunnable, List<MultipartFile> files) {\n List<String> fileNames = new LinkedList<>();\n for (MultipartFile file : files) {\n String fileName = file.getOriginalFilename();\n if (fileNames.contains(fileName)) {\n throw new UnprocessableEntityException(\"There are two files with the same name: \" + fileName);\n } else {\n fileNames.add(fileName);\n }\n }\n\n List<String> fileNamesFromOptions = dSpaceRunnable.getFileNamesFromInputStreamOptions();\n if (!fileNames.containsAll(fileNamesFromOptions)) {\n throw new UnprocessableEntityException(\"Files given in properties aren't all present in the request\");\n }\n }",
"private List<String> getDataFromApi() throws IOException {\n // Get a list of up to 10 files.\n List<String> fileInfo = new ArrayList<String>();\n FileList result = mService.files().list()\n .setMaxResults(10)\n .execute();\n List<File> files = result.getItems();\n if (files != null) {\n for (File file : files) {\n fileInfo.add(String.format(\"%s (%s)\\n\",\n file.getTitle(), file.getId()));\n }\n }\n return fileInfo;\n }",
"public Files files();",
"public List findRequests(RequestCriteria _criteria) throws RequestManagerException, PersistenceResourceAccessException;",
"public void init() throws Exception\n\t{\n\t\ttry{\n\t\t\tif(requests_file!= null){\n\t\t parse();\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\t// Set requests from command line.\n\t\tfor(int i=0;i<urls.length;i++){\n\t\t\tRequestContext ctx=new RequestContext(this);\n\t\t\tctx.setUrl(new URL(urls[i]));\n\t\t\t\n\t\t\tif(method != null && method.equals(\"POST\")){\n\t\t\t\tctx.setMethod(method);\n\t\t\t\tif(bodyFile != null){\n\t\t\t\t\tctx.setBodyFile(bodyFile);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tctx.setMethod(\"GET\");\n\t\t\t}\n\t\t\t\n\t\t\tfor(String name:headers.keySet()){\n\t\t\t\tctx.setHeader(name, headers.get(name));\n\t\t\t}\n\t\t\t\n\t\t\tfor(String key:queries.keySet()){\n\t\t\t\tctx.setQueryParam(key, queries.get(key));\n\t\t\t}\n\t\t\t\n\t\t\tctx.setRounds(rounds);\n\t\t\t\n\t\t\tif(ctxs.contains(ctx)){\n\t\t\t\tctxs.remove(ctx);\n\t\t\t}\n\t\t\t\n\t\t\tctxs.add(ctx);\n\t\t}\n\t\t\n\t\t// Add default headers for generic header types. Doesn't override already set headers. Useful for situations when no headers are explicitly set.\n\t\tfor(RequestContext ctx:ctxs){\n\t\t\tfor(String header:defaultHeaders.keySet()){\n\t\t\t\tctx.setHeaderIfNotPresent(header, defaultHeaders.get(header));\n\t\t\t}\n\t\t}\n\t\t\n\t\tsynchronized(this){\n\t\t\tprocessorCount=ctxs.size();\n\t\t}\n\t}",
"@Test\n public void testListFiles() throws FileNotFoundException {\n // Mockito.when(excelService.getExcelBodyById(anyString())).thenReturn(new FileInputStream(\"temp.xlsx\"));\n List<ExcelFile> list = new ArrayList<>();\n Mockito.when(excelService.getFiles()).thenReturn(list);\n\n given().accept(\"application/json\").get(\"/excel\").peek().\n then().assertThat()\n .statusCode(200);\n }"
] | [
"0.7194266",
"0.6895134",
"0.6591982",
"0.640345",
"0.6320835",
"0.63202703",
"0.6185271",
"0.61405635",
"0.6093241",
"0.60197514",
"0.60115284",
"0.5976406",
"0.59754896",
"0.5971174",
"0.5923033",
"0.5914955",
"0.5895589",
"0.58947194",
"0.58769846",
"0.5864883",
"0.5862098",
"0.5859138",
"0.5839206",
"0.581215",
"0.5803014",
"0.5788466",
"0.57784176",
"0.57746553",
"0.5766856",
"0.57629174",
"0.5662454",
"0.565746",
"0.5650202",
"0.56200916",
"0.5619831",
"0.5617576",
"0.55927145",
"0.557377",
"0.55651695",
"0.55591947",
"0.5531886",
"0.5526096",
"0.55221605",
"0.55124575",
"0.5511397",
"0.5492253",
"0.54906493",
"0.54669726",
"0.54661536",
"0.5452669",
"0.54351616",
"0.54321015",
"0.54267377",
"0.5414458",
"0.5382422",
"0.53750277",
"0.53729427",
"0.53602535",
"0.53595537",
"0.53582263",
"0.53511673",
"0.5346674",
"0.53435934",
"0.5338983",
"0.5312789",
"0.53123635",
"0.5309819",
"0.5299267",
"0.52929336",
"0.5280078",
"0.52761453",
"0.5267923",
"0.5267449",
"0.52639604",
"0.5250721",
"0.52490455",
"0.52454495",
"0.5240895",
"0.5239933",
"0.5235985",
"0.5233374",
"0.5231692",
"0.5225404",
"0.5221254",
"0.521595",
"0.5212747",
"0.5212156",
"0.52111924",
"0.52058",
"0.5204403",
"0.51997083",
"0.5199648",
"0.5196904",
"0.5192753",
"0.518695",
"0.5186112",
"0.517557",
"0.5171565",
"0.51660764",
"0.516502"
] | 0.58843017 | 18 |
get a map of redirect original URLS and matching location URLs to redirect client | private Map<String, String> getRedirects(String sRedirectFileName) {
try {
// create Buffered reader to read file and String to store each line
BufferedReader reader = new BufferedReader(new FileReader(sRedirectFileName));
String line;
// read each line with space delimiter in form: sOriginal sNewURL
while ((line = reader.readLine()) != null) {
StringTokenizer tokenizer = new StringTokenizer(line);
String sOriginalRequest = tokenizer.nextToken();
String sNewURL = tokenizer.nextToken();
sRedirects.put(sOriginalRequest, sNewURL);
}
reader.close();
} catch (IOException e) {
System.out.println("There was an error created the map of redirects:");
System.out.println(" " + e);
}
return sRedirects;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private RedirectUrls getRedirectURLs() {\n RedirectUrls redirectUrls = new RedirectUrls();\n redirectUrls.setReturnUrl(URL_RETURN);\n redirectUrls.setCancelUrl(URL_CANCEL);\n\n return redirectUrls;\n }",
"private RedirectUrls getRedirectUrls() {\n\t\tRedirectUrls redirectUrls = new RedirectUrls();\n\t\tredirectUrls.setCancelUrl(\"http://localhost:8080/SE2-Ecommerce_WebProject/\");\n\t\tredirectUrls.setReturnUrl(\"http://localhost:8080/SE2-Ecommerce_WebProject/customer/review_payment\");\n\t\treturn redirectUrls;\n\n\t}",
"private String getRedirectURL(String sHTTPRequest) {\n return sRedirects.get(sHTTPRequest);\n }",
"@Test\n public void testMultiRedirectRewrite() throws Exception {\n final CountDownLatch signal = new CountDownLatch(1);\n try {\n final String requestString = \"http://links.iterable.com/a/d89cb7bb7cfb4a56963e0e9abae0f761?_e=dt%40iterable.com&_m=f285fd5320414b3d868b4a97233774fe\";\n final String redirectString = \"http://iterable.com/product/\";\n final String redirectFinalString = \"https://iterable.com/product/\";\n IterableHelper.IterableActionHandler clickCallback = new IterableHelper.IterableActionHandler() {\n @Override\n public void execute(String result) {\n assertEquals(redirectString, result);\n assertFalse(redirectFinalString.equalsIgnoreCase(result));\n signal.countDown();\n }\n };\n IterableApi.getAndTrackDeeplink(requestString, clickCallback);\n assertTrue(\"callback is called\", signal.await(5, TimeUnit.SECONDS));\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n String redirectUrl1 = DownloadUtil.getRedirectUrl(\"http://www.pc6.com/down.asp?id=68253\");\n String redirectUrl2 = DownloadUtil.getRedirectUrl(redirectUrl1);\n String redirectUrl3 = DownloadUtil.getRedirectUrl(redirectUrl2);\n System.out.println(redirectUrl1);\n System.out.println(redirectUrl2);\n System.out.println(redirectUrl3);\n }",
"protected HTTPSampleResult followRedirects(HTTPSampleResult res, int frameDepth) {\n HTTPSampleResult totalRes = new HTTPSampleResult(res);\n totalRes.addRawSubResult(res);\n HTTPSampleResult lastRes = res;\n \n int redirect;\n for (redirect = 0; redirect < MAX_REDIRECTS; redirect++) {\n boolean invalidRedirectUrl = false;\n String location = lastRes.getRedirectLocation();\n if (log.isDebugEnabled()) {\n log.debug(\"Initial location: \" + location);\n }\n if (REMOVESLASHDOTDOT) {\n location = ConversionUtils.removeSlashDotDot(location);\n }\n // Browsers seem to tolerate Location headers with spaces,\n // replacing them automatically with %20. We want to emulate\n // this behaviour.\n location = encodeSpaces(location);\n if (log.isDebugEnabled()) {\n log.debug(\"Location after /. and space transforms: \" + location);\n }\n // Change all but HEAD into GET (Bug 55450)\n String method = lastRes.getHTTPMethod();\n method = computeMethodForRedirect(method, res.getResponseCode());\n \n try {\n URL url = ConversionUtils.makeRelativeURL(lastRes.getURL(), location);\n url = ConversionUtils.sanitizeUrl(url).toURL();\n if (log.isDebugEnabled()) {\n log.debug(\"Location as URL: \" + url.toString());\n }\n HTTPSampleResult tempRes = sample(url, method, true, frameDepth);\n if (tempRes != null) {\n lastRes = tempRes;\n } else {\n // Last url was in cache so tempRes is null\n break;\n }\n } catch (MalformedURLException | URISyntaxException e) {\n errorResult(e, lastRes);\n // The redirect URL we got was not a valid URL\n invalidRedirectUrl = true;\n }\n if (lastRes.getSubResults() != null && lastRes.getSubResults().length > 0) {\n SampleResult[] subs = lastRes.getSubResults();\n for (SampleResult sub : subs) {\n totalRes.addSubResult(sub);\n }\n } else {\n // Only add sample if it is a sample of valid url redirect, i.e. that\n // we have actually sampled the URL\n if (!invalidRedirectUrl) {\n totalRes.addSubResult(lastRes);\n }\n }\n \n if (!lastRes.isRedirect()) {\n break;\n }\n }\n if (redirect >= MAX_REDIRECTS) {\n lastRes = errorResult(new IOException(\"Exceeded maximum number of redirects: \" + MAX_REDIRECTS), new HTTPSampleResult(lastRes));\n totalRes.addSubResult(lastRes);\n }\n \n // Now populate the any totalRes fields that need to\n // come from lastRes:\n totalRes.setSampleLabel(totalRes.getSampleLabel() + \"->\" + lastRes.getSampleLabel());\n // The following three can be discussed: should they be from the\n // first request or from the final one? I chose to do it this way\n // because that's what browsers do: they show the final URL of the\n // redirect chain in the location field.\n totalRes.setURL(lastRes.getURL());\n totalRes.setHTTPMethod(lastRes.getHTTPMethod());\n totalRes.setQueryString(lastRes.getQueryString());\n totalRes.setRequestHeaders(lastRes.getRequestHeaders());\n \n totalRes.setResponseData(lastRes.getResponseData());\n totalRes.setResponseCode(lastRes.getResponseCode());\n totalRes.setSuccessful(lastRes.isSuccessful());\n totalRes.setResponseMessage(lastRes.getResponseMessage());\n totalRes.setDataType(lastRes.getDataType());\n totalRes.setResponseHeaders(lastRes.getResponseHeaders());\n totalRes.setContentType(lastRes.getContentType());\n totalRes.setDataEncoding(lastRes.getDataEncodingNoDefault());\n return totalRes;\n }",
"private final Map<String, String> getUrls(String themeDir, UrlBuilder urlBuilder) {\n // The urls that are accessible to the templates. \n // NB We are not using our menu object mechanism to build menus here, because we want the \n // view to control which links go where, and the link text and title.\n Map<String, String> urls = new HashMap<String, String>();\n \n urls.put(\"home\", urlBuilder.getHomeUrl());\n \n urls.put(\"about\", urlBuilder.getPortalUrl(Route.ABOUT));\n if (ContactMailServlet.getSmtpHostFromProperties() != null) {\n urls.put(\"contact\", urlBuilder.getPortalUrl(Route.CONTACT));\n }\n urls.put(\"search\", urlBuilder.getPortalUrl(Route.SEARCH)); \n urls.put(\"termsOfUse\", urlBuilder.getPortalUrl(Route.TERMS_OF_USE)); \n urls.put(\"login\", urlBuilder.getPortalUrl(Route.LOGIN)); \n urls.put(\"logout\", urlBuilder.getLogoutUrl()); \n urls.put(\"siteAdmin\", urlBuilder.getPortalUrl(Route.LOGIN)); \n \n urls.put(\"siteIcons\", urlBuilder.getPortalUrl(themeDir + \"/site_icons\"));\n return urls;\n }",
"public String getRegisteredRedirectUris() {\n return registeredRedirectUris;\n }",
"public Map<String, ?> getUrlMap()\r\n/* 27: */ {\r\n/* 28: 93 */ return this.urlMap;\r\n/* 29: */ }",
"private boolean redirectClient(String path)\n {\n URL url;\n String reqHost = _req.requestHdr.getHeader(\"Host\");\n String fullspec = \"http://\" + reqHost + path;\n String location = null;\n String gapAddress = null;\n boolean randomGAP = false;\n boolean haveValidGAPCookie = false;\n boolean haveValidLocationCookie = false;\n String s = null;\n\n InetAddress cliAddr = _req.connection.getSocket().getInetAddress();\n\n if (DEBUG && _debugLevel > 0) {\n debugPrintLn(\"Got request from \" + cliAddr.toString() + \" \"\n + _req.requestHdr.getVersion() );\n }\n\n /*\n * Check if the client's host is blocked.\n */\n if (_blockList.isBlockedHost(cliAddr.getHostAddress())) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: your host is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n s = URIDecoder.decode(path);\n }\n catch(IllegalArgumentException e) {\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Format error: request contains an invalid escape sequence: \"\n + e.getMessage());\n return false;\n }\n\n /*\n * Check if the file requested is blocked.\n */\n if (_blockList.isBlockedFile(s)) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: the requested file is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n s = URIDecoder.decode(fullspec);\n }\n catch(IllegalArgumentException e) {\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Format error: request contains an invalid escape sequence: \"\n + e.getMessage());\n return false;\n }\n\n /*\n * Check if the URL requested is blocked.\n */\n if (_blockList.isBlockedURL(s)) {\n _req.sendHtmlErrorPage(HTTPStatusCode.FORBIDDEN,\n \"Not allowed: the requested URL is blocked by the Globe redirector.\");\n return false;\n }\n\n try {\n url = new URL(fullspec);\n }\n catch( MalformedURLException e ) {\n logError(\"Unsupported request-URI: \" + fullspec);\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"unsupported request-URI\");\n return false;\n }\n\n String file = url.getFile();\n\n /*\n * Redirect the client to the default URL (if defined) if the\n * object name is absent.\n */\n if (file.equals(\"/\")) {\n s = _config.getDefaultURL();\n\n if (s != null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"no object name specified -- using default URL\");\n }\n\n return sendHTTPRedirectMessage(s, null, null);\n }\n }\n\n _cookieCoords = null;\n\n /*\n * If the client sent a redirector cookie, the cookie contains the\n * hostname and port number of the client's nearest GAP, and the\n * geographical coordinates associated with the client's IP address.\n */\n if (_config.getCookieEnabledFlag()) {\n HTTPCookie clientCookie = null;\n\n if ( (s = _req.requestHdr.getHeader(\"Cookie\")) != null) {\n try {\n _httpCookie.init(s);\n clientCookie = _httpCookie;\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed cookie: \" + e.getMessage());\n\n // CONTINUE - cookie will be replaced\n }\n\n if (clientCookie != null) {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie: \" + clientCookie.toString());\n }\n\n String gap = clientCookie.getAttribute(\n RedirectorCookieFactory.COOKIE_GAP_ATTRIB);\n\n /*\n * Set the nearest GAP to the GAP indicated by the cookie. If\n * the GAP address inside the cookie is invalid or if it does\n * not refer to a GAP, the cookie is discarded (and replaced).\n */\n if (gap != null) {\n HostAddress gapHost = null;\n\n try {\n gapHost = new HostAddress(gap);\n s = gapHost.toString();\n\n // Check if gapHost still refers to an active GAP.\n if (_gapList.get(s) != null) {\n gapAddress = s;\n haveValidGAPCookie = true;\n }\n }\n catch(UnknownHostException e) {\n logError(\"Unknown host in cookie: \" + gap);\n\n // CONTINUE - GAP cookie will be replaced\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed host address in cookie: \" + gap);\n\n // CONTINUE - GAP cookie will be replaced\n }\n }\n else {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie does not contain a \"\n + RedirectorCookieFactory.COOKIE_GAP_ATTRIB\n + \" attribute\");\n }\n }\n\n /*\n * If the cookie does not contain a valid nearest GAP attribute,\n * we may need the cookie's coordinates attribute to determine the\n * nearest GAP.\n */\n if (gapAddress == null) {\n s = clientCookie.getAttribute(\n RedirectorCookieFactory.COOKIE_COORDS_ATTRIB);\n\n if (s != null) {\n try {\n _cookieCoords = new FloatCoordinate(s);\n haveValidLocationCookie = true;\n }\n catch(IllegalArgumentException e) {\n logError(\"Malformed coordinates in cookie: \" + s);\n\n // CONTINUE - location cookie will be replaced\n }\n }\n else {\n if (DEBUG & _debugLevel > 1) {\n debugPrintLn(\"Cookie does not contain a \"\n + RedirectorCookieFactory.COOKIE_COORDS_ATTRIB\n + \" attribute\");\n }\n }\n }\n }\n }\n }\n\n /*\n * If there is no (valid) GAP cookie, find the location of the nearest\n * GAP. Pick a random GAP if the nearest GAP could not be determined.\n */\n if (gapAddress == null) {\n GlobeAccessPointRecord gaprec;\n\n if ( (gaprec = findNearestGAP(cliAddr)) == null) {\n gaprec = getRandomGAP();\n randomGAP = true;\n }\n gapAddress = gaprec.hostport;\n\n // _cookieCoords set\n }\n\n String gapCookie = null, locationCookie = null;\n\n /*\n * Create the GAP cookie value if cookies are enabled and the client\n * does not have a (valid) GAP cookie. If a GAP cookie is created,\n * create a location cookie if the client doesn't have a valid one.\n */\n if (_config.getCookieEnabledFlag()) {\n if (! haveValidGAPCookie) {\n if (randomGAP) {\n setExpiresDate(_date, 1000 * RANDOM_GAP_COOKIE_TTL);\n }\n else {\n setExpiresDate(_date, 1000 * _config.getGAPCookieTTL());\n }\n\n gapCookie = _cookieFactory.getGAPValue(gapAddress, _date);\n\n if ( ! haveValidLocationCookie) {\n if (_cookieCoords != null) {\n setExpiresDate(_date, 1000 * _config.getLocationCookieTTL());\n locationCookie = _cookieFactory.getLocationValue(_cookieCoords,\n _date);\n }\n }\n }\n }\n\n /*\n * Send a reply to redirect the client to the nearest GAP.\n */\n if (_config.getHTTPRedirectFlag()) {\n return sendHTTPRedirectMessage(gapAddress, file,\n gapCookie, locationCookie);\n }\n else {\n return sendHTMLReloadPage(gapAddress, file,\n gapCookie, locationCookie);\n }\n }",
"public void redirectCPRefs(short redirect[]) {\n }",
"public List<String> getUrlsToCheck(CachedUrl cu) {\n List<String> res = new ArrayList<String>(3);\n Properties props;\n switch (detectNoSubstanceRedirectUrl) {\n case First:\n return ListUtil.list(cu.getUrl());\n case Last:\n props = cu.getProperties();\n String url = props.getProperty(CachedUrl.PROPERTY_CONTENT_URL);\n if (url == null) {\n\turl = cu.getUrl();\n }\n return ListUtil.list(url);\n case All:\n return AuUtil.getRedirectChain(cu);\n }\n return res;\n }",
"@Override\r\n\tprotected String getRedirectUri(HttpServletRequest req)\r\n\t\t\tthrows ServletException, IOException {\n\t\treturn Utils.getRedirectUri(req);\r\n\t}",
"public final InputStream mo10865c(URL url, int i, URL url2, Map<String, String> map) {\n if (i < 5) {\n if (url2 != null) {\n try {\n if (url.toURI().equals(url2.toURI())) {\n throw new C0966e(\"In re-direct loop\");\n }\n } catch (URISyntaxException unused) {\n }\n }\n this.f1047i = (HttpURLConnection) url.openConnection();\n for (Map.Entry next : map.entrySet()) {\n this.f1047i.addRequestProperty((String) next.getKey(), (String) next.getValue());\n }\n this.f1047i.setConnectTimeout(this.f1046h);\n this.f1047i.setReadTimeout(this.f1046h);\n boolean z = false;\n this.f1047i.setUseCaches(false);\n this.f1047i.setDoInput(true);\n this.f1047i.setInstanceFollowRedirects(false);\n this.f1047i.connect();\n this.f1048j = this.f1047i.getInputStream();\n if (this.f1049k) {\n return null;\n }\n int responseCode = this.f1047i.getResponseCode();\n int i2 = responseCode / 100;\n if (i2 == 2) {\n HttpURLConnection httpURLConnection = this.f1047i;\n if (TextUtils.isEmpty(httpURLConnection.getContentEncoding())) {\n this.f1048j = new C1371c(httpURLConnection.getInputStream(), (long) httpURLConnection.getContentLength());\n } else {\n if (Log.isLoggable(\"HttpUrlFetcher\", 3)) {\n StringBuilder u = C0843a.m460u(\"Got non empty content encoding: \");\n u.append(httpURLConnection.getContentEncoding());\n Log.d(\"HttpUrlFetcher\", u.toString());\n }\n this.f1048j = httpURLConnection.getInputStream();\n }\n return this.f1048j;\n }\n if (i2 == 3) {\n z = true;\n }\n if (z) {\n String headerField = this.f1047i.getHeaderField(\"Location\");\n if (!TextUtils.isEmpty(headerField)) {\n URL url3 = new URL(url, headerField);\n mo10842b();\n return mo10865c(url3, i + 1, url, map);\n }\n throw new C0966e(\"Received empty or null redirect url\");\n } else if (responseCode == -1) {\n throw new C0966e(responseCode);\n } else {\n throw new C0966e(this.f1047i.getResponseMessage(), responseCode);\n }\n } else {\n throw new C0966e(\"Too many (> 5) redirects!\");\n }\n }",
"public Map<String, Object> uriToValueMap();",
"List<GWTJahiaUrlMapping> getUrlMappings(GWTJahiaNode node, String locale) throws GWTJahiaServiceException;",
"Map<String, String> getEndpointMap();",
"public Collection<Map<String, String>> getLinks();",
"private static synchronized boolean isRedirection(\n HttpServletRequest request,\n HttpServletResponse response)\n {\n logger.debug(\"+\");\n if(redirections == null) {\n redirections = new Properties();\n if(Env.getGlobalProperty(\"redirections\") != null) {\n try {\n redirections.load(\n new ByteArrayInputStream(\n Env.getGlobalProperty(\"redirections\").getBytes()));\n } catch (IOException e) {\n logger.error(\"IOException\", e);\n }\n StringBuffer redirInfo = new StringBuffer(\"DNS names - URLs:\");\n Enumeration e = redirections.keys();\n while(e.hasMoreElements()) {\n String key = (String) e.nextElement();\n redirInfo.append(\"\\r\\n\");\n redirInfo.append(key);\n redirInfo.append(\"=\");\n redirInfo.append(redirections.get(key));\n }\n logger.info(redirInfo);\n }\n }\n if(redirections.get(request.getServerName()) != null) {\n try {\n response.sendRedirect(\n (String) redirections.get(request.getServerName()));\n } catch (IOException e) {\n logger.error(\"redirection failed\", e);\n }\n logger.debug(\"- redirection\");\n return true;\n }\n logger.debug(\"- not a redirection\");\n return false;\n }",
"private boolean isRedirect(String sHTTPRequest) {\n return sRedirects.containsKey(sHTTPRequest);\n }",
"public static String getURLRedirect(){\n\t\treturn \"https://54.247.74.173:8443\";\r\n\t}",
"private Set<String> findNewUrls(Document doc) {\n Set<String> newUrlSet = new HashSet<>();\n\n for (Element ah : doc.select(\"a[href]\")) {\n String href = ah.attr(\"abs:href\");\n\n if (!urlSet.contains(href) // Check if this is a new URL\n && href.contains(domain) // Check if the URL is from the same domain\n && isValidExtension(href) // Check that the file extension is not in the list of excluded extensions\n && !href.contains(\"mailto:\") // Check that the href is not an email address\n ) {\n newUrlSet.add(href);\n }\n\n }\n\n processNewUrls(newUrlSet);\n return newUrlSet;\n }",
"@Override\r\n public List<String> getMatchedURIs() {\n return null;\r\n }",
"String getRequestedUrl();",
"@Bean\n public ConcurrentMap<Site, SiteRedirects> redirectsCache(@Autowired SitesService sitesService) {\n // Resizing ConcurrentHashMaps is rather expensive, so we start at least with the correct size.\n return new ConcurrentHashMap<>(sitesService.getSites().size());\n }",
"public Map<String, URLValue> loadAllURLs()\n\t{\n\t\tEntityCursor<URLEntity> results = this.env.getEntityStore().getPrimaryIndex(String.class, URLEntity.class).entities();\n\t\tMap<String, URLValue> urls = new HashMap<String, URLValue>();\n\t\tURLValue url;\n\t\tfor (URLEntity entity : results)\n\t\t{\n\t\t\turl = new URLValue(entity.getKey(), entity.getURL(), entity.getUpdatingPeriod());\n\t\t\turls.put(url.getKey(), url);\n\t\t}\n\t\tresults.close();\n\t\treturn urls;\n\t}",
"public Object[] chechEarlyLink(String url) {\n\t\tString mostRecentHTML = \"\";\n\t\tboolean success;\n\t\tprocessor.printSys(\"Original URL of Early Link: \" + url);\n\t\ttry {\n\t\t\tHttpURLConnection con = settings.isUsingProxy() ? (HttpURLConnection)(new URL(url).openConnection(proxyBuilder.getProxy())) : (HttpURLConnection)(new URL(url).openConnection());\n\t\t\tcon.setUseCaches(false);\n\t\t\tcon.setConnectTimeout(8000);\n\t\t\tcon.setInstanceFollowRedirects(false);\n\t\t\tcon.connect();\n\t\t\tString location = con.getHeaderField(\"Location\");\n\t\t\tprocessor.printSys(\"Response Code: \" + con.getResponseCode() + \", Early Link Redirected to: \" + location);\n\t\t\tmostRecentHTML = connectionToString(con);\n\t\t\tsuccess = location == null; //if the redirect location was null, this worked\n\t\t} catch (MalformedURLException e) {\n\t\t\tsuccess = false;\n\t\t} catch (IOException e) {\n\t\t\tsuccess = false;\n\t\t}\n\n\t\treturn new Object[]{success, mostRecentHTML};\n\t}",
"public URL getRedirectURL() {\r\n return redirectURL;\r\n }",
"@Override\n public DocumentSignedLocation[] getDocumentContentUrls(String[] documentLinks) throws DocumentServiceException {\n\tAuthenticationToken token = this.store.getUserToken();\n\tif (token == null) {\n\t throw new DocumentServiceException(\"Service requires authentication.\");\n\t}\n\ttry {\n\t DocumentSignedLocation[] dsls = new DocumentSignedLocation[documentLinks.length];\n\t for (int i=0; i<documentLinks.length; i++) {\n\t\tString documentUrl = documentLinks[i];\n\t String documentUrlSig;\n\t\tdocumentUrlSig = AuthSubUtil.formAuthorizationHeader(\n\t\t token.getToken(), AuthenticationKey.getAuthSubKey(), new URL(documentUrl), \"GET\");\n DocumentSignedLocation dsl =\n \t new DocumentSignedLocation(documentUrl, documentUrlSig);\n\t dsls[i] = dsl;\n\t }\n\t return dsls;\n\t} catch (Exception e) {\n\t e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n\t}\n }",
"static URITranslator map(String source, String target) {\n return map(URI.create(source), URI.create(target));\n }",
"private boolean processRedirectResponse(HttpConnection conn) {\n\n if (!getFollowRedirects()) {\n LOG.info(\"Redirect requested but followRedirects is \"\n + \"disabled\");\n return false;\n }\n\n //get the location header to find out where to redirect to\n Header locationHeader = getResponseHeader(\"location\");\n if (locationHeader == null) {\n // got a redirect response, but no location header\n LOG.error(\"Received redirect response \" + getStatusCode()\n + \" but no location header\");\n return false;\n }\n String location = locationHeader.getValue();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirect requested to location '\" + location\n + \"'\");\n }\n\n //rfc2616 demands the location value be a complete URI\n //Location = \"Location\" \":\" absoluteURI\n URI redirectUri = null;\n URI currentUri = null;\n\n try {\n currentUri = new URI(\n conn.getProtocol().getScheme(),\n null,\n conn.getHost(), \n conn.getPort(), \n this.getPath()\n );\n redirectUri = new URI(location.toCharArray());\n if (redirectUri.isRelativeURI()) {\n if (isStrictMode()) {\n LOG.warn(\"Redirected location '\" + location \n + \"' is not acceptable in strict mode\");\n return false;\n } else { \n //location is incomplete, use current values for defaults\n LOG.debug(\"Redirect URI is not absolute - parsing as relative\");\n redirectUri = new URI(currentUri, redirectUri);\n }\n }\n } catch (URIException e) {\n LOG.warn(\"Redirected location '\" + location + \"' is malformed\");\n return false;\n }\n\n //check for redirect to a different protocol, host or port\n try {\n checkValidRedirect(currentUri, redirectUri);\n } catch (HttpException ex) {\n //LOG the error and let the client handle the redirect\n LOG.warn(ex.getMessage());\n return false;\n }\n\n //invalidate the list of authentication attempts\n this.realms.clear();\n //remove exisitng authentication headers\n removeRequestHeader(HttpAuthenticator.WWW_AUTH_RESP); \n //update the current location with the redirect location.\n //avoiding use of URL.getPath() and URL.getQuery() to keep\n //jdk1.2 comliance.\n setPath(redirectUri.getEscapedPath());\n setQueryString(redirectUri.getEscapedQuery());\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Redirecting from '\" + currentUri.getEscapedURI()\n + \"' to '\" + redirectUri.getEscapedURI());\n }\n\n return true;\n }",
"HashMap<Location, String> pullLocations(String url){\n\t\tif (url.length() == 0) {\n\t\t\t// Pull from default url\n\t\t} else {\n\t\t\t// Pull from provided url\n\t\t}\n\t\t// Parse JSON array into location objects and store in hashmap\n\t\t// Return hashmap\n\t\treturn null;\n\t}",
"public final String getFollowRedirects() {\n return properties.get(FOLLOW_REDIRECTS_PROPERTY);\n }",
"public Map<String, String> getReferrerMapFromUri(Uri uri) {\n\n\t\tMapBuilder paramMap = new MapBuilder();\n\n\t\t// If no URI, return an empty Map.\n\t\tif (uri == null) {\n\t\t\treturn paramMap.build();\n\t\t}\n\n\t\ttry {\n\t\t\t// Source is the only required campaign field. No need to continue if not\n\t\t\t// present.\n\t\t\tif (uri.isHierarchical()\n\t\t\t\t\t&& uri.getQueryParameter(CAMPAIGN_SOURCE_PARAM) != null) {\n\n\t\t\t\t// MapBuilder.setCampaignParamsFromUrl parses Google Analytics campaign\n\t\t\t\t// (\"UTM\") parameters from a string URL into a Map that can be set on\n\t\t\t\t// the Tracker.\n\t\t\t\tparamMap.setCampaignParamsFromUrl(uri.toString());\n\n\t\t\t\t// If no source parameter, set authority to source and medium to\n\t\t\t\t// \"referral\".\n\t\t\t} else if (uri.getAuthority() != null && uri.getAuthority().length() > 0) {\n\n\t\t\t\tparamMap.set(Fields.CAMPAIGN_MEDIUM, \"referral\");\n\t\t\t\tparamMap.set(Fields.CAMPAIGN_SOURCE, uri.getAuthority());\n\n\t\t\t} else if (uri.getScheme() != null) {\n\t\t\t\tparamMap.set(Fields.CAMPAIGN_MEDIUM, uri.getScheme());\n\t\t\t}\n\t\t} catch (Throwable t) {\n\t\t\t// I found: java.lang.UnsupportedOperationException: This isn't a hierarchical URI.\n\t\t\t// Fixed above with isHeirarchical, but who knows what other throws there are\n\t\t\tif (AndroidUtils.DEBUG) {\n\t\t\t\tt.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn paramMap.build();\n\t}",
"public abstract void redirect(String url) throws IOException;",
"public void checkRedirect(String url){\n if (url.contains(\"?attredirects=0\")){\n String new_url = url.replaceAll(\"\\\\battredirects=0\\\\b\", \"\");\n images.set(current_image, new_url);\n }\n }",
"private void populateServerUrls(Map<String, String> urls, OGCServerSource source)\n {\n if (StringUtils.isNotEmpty(source.getWMSServerURL()))\n {\n urls.put(OGCServerSource.WMS_SERVICE, source.getWMSServerURL());\n }\n\n if (StringUtils.isNotEmpty(source.getWMSGetMapServerUrlOverride()))\n {\n urls.put(OGCServerSource.WMS_GETMAP_SERVICE, source.getWMSGetMapServerUrlOverride());\n }\n\n if (StringUtils.isNotEmpty(source.getWFSServerURL()))\n {\n urls.put(OGCServerSource.WFS_SERVICE, source.getWFSServerURL());\n }\n\n if (StringUtils.isNotEmpty(source.getWPSServerURL()))\n {\n urls.put(OGCServerSource.WPS_SERVICE, source.getWPSServerURL());\n }\n }",
"@Updatable\n public Set<RedirectConfiguration> getRedirectConfiguration() {\n if (redirectConfiguration == null) {\n redirectConfiguration = new HashSet<>();\n }\n\n return redirectConfiguration;\n }",
"public Set<URL> getTargetPageURLs(){\n\t\tSet<URL> urls = new HashSet<URL>();\n\t\tString url = \"http://www.infoq.com/news/2012/12/twemproxy;jsessionid=1652D82C3359CBAB67DA00B26BE7784B\";\n\t\turls.add(URL.valueOf(url));\n\t\treturn urls;\n\t}",
"private static void setupNavigateKeyCriteria(Concourse client) {\n client.add(\"name\", \"foo\", 1);\n client.add(\"age\", 30, 1);\n client.add(\"friends\", Link.to(2), 1);\n client.add(\"name\", \"bar\", 2);\n client.add(\"age\", 20, 2);\n client.add(\"friends\", Link.to(3), 2);\n client.add(\"name\", \"hello\", 3);\n }",
"public String getRedirectUrl() {\n return this.redirectUrl;\n }",
"@Override\r\n\tpublic Map<String, String> initOtherPermission() {\n\t\tMap<String, String> shrioUrlMap = new HashMap<String, String>();\r\n\t\tList<ShrioUrl> shrioUrlList = shrioUrlDao.selectAllShrioUrl();\r\n\t\tif (shrioUrlList != null && shrioUrlList.size() > 0) {\r\n\t\t\tfor (ShrioUrl shrioUrl : shrioUrlList) {\r\n\t\t\t\tif (shrioUrl.getUrl() == null || shrioUrl.getUrl().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的url字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (shrioUrl.getFiltername() == null || shrioUrl.getFiltername().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的filtername字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (shrioUrl.getDef() == null || shrioUrl.getDef().isEmpty()) {\r\n\t\t\t\t\tlog.debug(\"sys_shrio_url表中id为\" + shrioUrl.getId() + \"的def字段为空,不进行过滤\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tshrioUrlMap.put(shrioUrl.getUrl(), shrioUrl.getFiltername() + \"[\" + shrioUrl.getDef() + \"]\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn shrioUrlMap;\r\n\t}",
"private static void setupNavigateKeysCriteria(Concourse client) {\n client.add(\"name\", \"foo\", 1);\n client.add(\"age\", 35, 1);\n client.add(\"friends\", Link.to(2), 1);\n client.add(\"name\", \"bar\", 2);\n client.add(\"age\", 20, 2);\n client.add(\"friends\", Link.to(3), 2);\n client.add(\"name\", \"hello\", 3);\n }",
"@Override\n\tpublic java.util.Map<java.util.Locale, java.lang.String> getManualUrlMap() {\n\t\treturn _scienceApp.getManualUrlMap();\n\t}",
"private ArrayList<ResultPair> InitializeManualUrls()\n {\n\t ArrayList<ResultPair> fileUrls = new ArrayList<ResultPair>();\n\t fileUrls.add(new ResultPair(\"https://www.google.com\", true));\n\t fileUrls.add(new ResultPair(\"https://///www.google.com\", false));\n\t fileUrls.add(new ResultPair(\"\", false));\n\t fileUrls.add(new ResultPair(\"http://74.125.224.72/\", true));\n\t fileUrls.add(new ResultPair(\"file:///C:/\", true));\n\t fileUrls.add(new ResultPair(\"http://WWW.GOOGLE.COM\", true));\n\t fileUrls.add(new ResultPair(\"http://www.google.com:80/test1\", true));\n\t fileUrls.add(new ResultPair(\"h3t://go.cc:65a/$23?action=edit&mode=up\", false));\n\t fileUrls.add(new ResultPair(\"12345\", false));\n\t fileUrls.add(new ResultPair(\"http://www.space in here.com\", false));\n\t fileUrls.add(new ResultPair(\"http://site.com/#citation\", true));\n\t fileUrls.add(new ResultPair(\"ftp://site.com\", true));\n\t fileUrls.add(new ResultPair(\"http://site.com/hyphen-here\", true));\n\t fileUrls.add(new ResultPair(\"http://www.example.com:8080\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:80/over/there#nose\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com/there?name=ferret\", true));\n\t fileUrls.add(new ResultPair(\"foo://example.com:8042/over/there?name=ferret#nose\", true));\n\t fileUrls.add(new ResultPair(\"http://[email protected]\", true));\n\t fileUrls.add(new ResultPair(\"http://142.10.5.2:8080/\", true));\n\t return fileUrls;\n }",
"@Override\r\n public List<String> getMatchedURIs(boolean arg0) {\n return null;\r\n }",
"public com.mgipaypal.ac1211.client.RedirectInfo getRedirectInfo() {\r\n return redirectInfo;\r\n }",
"static URITranslator map(URI source, URI target) {\n return original -> Objects.equals(source, original) ? target : original;\n }",
"private void setUrlPrefixMappingToMap(String[] prefixArr)\n\t{\n\t\tif( prefixArr != null )\n\t\t{\n\t\t\tfor(String urlPrefix : prefixArr)\n \t{ \n\t\t\t\tif(urlPrefix.contains(DELIMITER))\n\t\t\t\t{\n\t \t\tString[] keyVal = urlPrefix.split(\"::\");\n\t \t\tString key \t\t= keyVal[0];\n\t \t\tString value \t= keyVal[1].trim();\n\t \t\tlog.info(\"REST SERVICE Key------->>> \"+key);\n\t \t\tlog.info(\"REST SERVICE Value------->>> \"+value);\n\t \t\tappurlMap.put(key , value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlog.warn(\"NO DELEMETERS PROVIDED FOR REDIRECT SERVICE URL -------->>> \");\n\t\t\t\t}\n \t}\n\t\t}\n\t}",
"UrlMap findByKey(String key);",
"public String getRedirect() {\r\n\t\treturn this.redirect;\r\n\t}",
"static URITranslator map(Map<String, String> uriMappings) {\n return new MappingURITranslator(uriMappings);\n }",
"public String getRedirectUrl() {\n return redirectUrl;\n }",
"protected abstract void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder);",
"protected abstract void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder);",
"public String redirectUrl() {\n return this.redirectUrl;\n }",
"public static DataSet<WikiSimResult> resolveRedirects(ExecutionEnvironment env, DataSet<WikiSimResult> wikiSimResults, String filename) {\n // fields\n int hash = 0;\n int pageA = 1;\n int pageB = 2;\n int redirectSource = 0;\n int redirectTarget = 1;\n\n DataSet<Tuple2<String, String>> redirects = WikiSimRedirects.getRedirectsDataSet(env, filename);\n\n return wikiSimResults\n // replace page names with redirect target\n // page A\n .coGroup(redirects)\n .where(pageA)\n .equalTo(redirectSource)\n .with(new ReplaceRedirects(pageA))\n // page B\n .coGroup(redirects)\n .where(pageB)\n .equalTo(redirectSource)\n .with(new ReplaceRedirects(pageB))\n // sum duplicated tuples\n .groupBy(hash) // Page A, Page B (hash)\n .reduceGroup(new ReduceResults());\n }",
"private void ExtractURLs(String line)\n {\n String matchedURL = \"\";\n Matcher urlMatcher = urlPattern.matcher(line);\n\n while (urlMatcher.find())\n {\n matchedURL = urlMatcher.group();\n\n if (!distinctURLs.containsKey(matchedURL))\n {\n distinctURLs.put(matchedURL,matchedURL);\n }\n }\n }",
"public Map<String, Map<String, Boolean>> containExternalLinks(Map<String, List<String>> data) throws IOException\n {\n List<List<String>> pagelinks = wiki.getExternalLinksOnPage(new ArrayList<>(data.keySet()));\n int counter = 0;\n Map<String, Map<String, Boolean>> ret = new HashMap<>();\n for (Map.Entry<String, List<String>> entry : data.entrySet())\n { \n List<String> addedlinks = entry.getValue();\n List<String> currentlinks = pagelinks.get(counter);\n Map<String, Boolean> stillthere = new HashMap<>();\n for (int i = 0; i < addedlinks.size(); i++)\n {\n String url = addedlinks.get(i);\n stillthere.put(url, currentlinks.contains(url));\n }\n ret.put(entry.getKey(), stillthere);\n counter++;\n }\n return ret;\n }",
"public void map()\n\t{\n\t // key is the documentId\n\t\t// value is the url\n\t\t//fetch the document using the documentId\n\t\t\n\t}",
"public Map<String, Map<String, Set<String>>> getLocationMap();",
"private static void checkForRedirection(Connection conn) {\n JSONObject bestServer = ServerManager.getLowestLoadServer();\n if (bestServer != null && bestServer.get(\"id\") != Settings.getServerId()) {\n Message.sendRedirect(conn, (String) bestServer.get(\"hostname\"), (int) bestServer.get(\"port\"));\n }\n }",
"public AuthRedirect buildAuthRedirectUrl(String redirectUrl) {\n try {\n List<String> happyClientIds = listClientIdsWithRefreshTokens();\n\n for (String clientId : oauthApplicationByClientId.get().keySet()) {\n if (happyClientIds.contains(clientId)) {\n continue;\n }\n\n AuthRedirect result = new AuthRedirect();\n\n result.url = AUTH_URL + String.format(\"?response_type=code&client_id=%s&redirect_uri=%s&scope=%s\",\n clientId,\n URLEncoder.encode(redirectUrl, \"UTF-8\"),\n URLEncoder.encode(SCOPE, \"UTF-8\"));\n result.clientId = clientId;\n\n return result;\n }\n\n return null;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"@Key(\"mapserver.url\")\n\tString mapServerUrl();",
"public abstract String redirectTo();",
"@Test\n public void redirectInfinite303And307() throws Exception {\n final Map<String, Class<? extends Servlet>> servlets = new HashMap<String, Class<? extends Servlet>>();\n servlets.put(RedirectServlet307.URL, RedirectServlet307.class);\n servlets.put(RedirectServlet303.URL, RedirectServlet303.class);\n startWebServer(\"./\", new String[0], servlets);\n\n final WebClient client = getWebClient();\n\n try {\n client.getPage(\"http://localhost:\" + PORT + RedirectServlet307.URL);\n }\n catch (final Exception e) {\n assertTrue(e.getMessage(), e.getMessage().contains(\"Too much redirect\"));\n }\n }",
"Map<String, String> getCachedLinks(Page page);",
"private static URLMapping[] getParamsURLMappings(String params) {\n\n if (StringUtils.isBlank(params)) {\n return null;\n }\n\n String[] ps = StringUtils.split(params, '&');\n\n URLMapping[] urlMappings = new URLMapping[ps.length];\n\n for (int i = 0; i < ps.length; i++) {\n\n String[] pArr = StringUtils.split(ps[i], '=');\n\n URLMapping urlMapping = getURLMappingByValue(pArr[0], URLMappingEnum.PARAM);\n\n if (urlMapping == null) {\n urlMapping = new URLMapping();\n urlMapping.setSplitKey(StringUtils.split(\"url$param$1000$\" + pArr[0], '$'));\n }\n\n if (pArr.length > 1) {\n\n urlMapping.setFinalValue(pArr[1]);\n\n } else {\n\n urlMapping.setFinalValue(PARAM_NO_VALUE);\n }\n\n urlMappings[i] = urlMapping;\n }\n\n for (int i = 0; i < urlMappings.length; i++) {\n\n for (int j = 0; j < urlMappings.length - i - 1; j++) {\n\n if (urlMappings[j].getSplitKey() == null) {\n continue;\n }\n\n if (Integer.valueOf(urlMappings[j].getSplitKey()[2]) > Integer\n .valueOf(urlMappings[j + 1].getSplitKey()[2])) {\n\n URLMapping temp = urlMappings[j];\n urlMappings[j] = urlMappings[j + 1];\n urlMappings[j + 1] = temp;\n }\n }\n }\n\n return urlMappings;\n\n }",
"protected String getSuccessRedirectUrl(String redirectUrl, User user, CookieBuilder cookie) {\n return redirectUrl;\n }",
"@ApiModelProperty(value = \"The Software Statement redirect URIs\")\n\n\n public List<String> getRedirectUri() {\n return redirectUri;\n }",
"boolean followRedirects() {\n return parseBoolean(get(FOLLOW_REDIRECTS), true);\n }",
"boolean isFollowRedirect();",
"Uri getJurisdiction();",
"Set<String> getSubjectHumanRedirects();",
"public static Map<String, Object> logRequestHeadersToMap(HttpServletRequest request) {\n // Locate\n Map<String, String> retLocate = new LinkedHashMap<>();\n retLocate.put(\"Country\", request.getLocale().getCountry());\n retLocate.put(\"DisplayCountry()\", request.getLocale().getDisplayCountry());\n retLocate.put(\"Language\", request.getLocale().getLanguage());\n retLocate.put(\"DisplayLanguage\", request.getLocale().getDisplayLanguage());\n retLocate.put(\"DisplayName\", request.getLocale().getDisplayName());\n retLocate.put(\"DisplayScript\", request.getLocale().getDisplayScript());\n retLocate.put(\"DisplayVariant\", request.getLocale().getDisplayVariant());\n retLocate.put(\"ISO3Country\", request.getLocale().getISO3Country());\n retLocate.put(\"ISO3Language\", request.getLocale().getISO3Language());\n retLocate.put(\"Variant\", request.getLocale().getVariant());\n retLocate.put(\"LanguageTag\", request.getLocale().toLanguageTag());\n // Others\n Map<String, Object> retOthers = new LinkedHashMap<>();\n retOthers.put(\"Method\", request.getMethod());\n retOthers.put(\"Host\", request.getRequestURL().toString());\n retOthers.put(\"AuthType\", request.getAuthType());\n retOthers.put(\"RequestURI\", request.getRequestURI());\n retOthers.put(\"RequestedSessionId\", request.getRequestedSessionId());\n retOthers.put(\"RemoteUser\", request.getRemoteUser());\n retOthers.put(\"RemotePort\", String.valueOf(request.getRemotePort()));\n retOthers.put(\"RemoteAddr\", request.getRemoteAddr());\n retOthers.put(\"ContextPath\", request.getContextPath());\n retOthers.put(\"CharacterEncoding\", request.getCharacterEncoding());\n retOthers.put(\"ContentType\", request.getContentType());\n retOthers.put(\"PathInfo\", request.getPathInfo());\n retOthers.put(\"PathTranslated\", request.getPathTranslated());\n retOthers.put(\"Protocol\", request.getProtocol());\n retOthers.put(\"ServletPath\", request.getServletPath());\n retOthers.put(\"LocalAddr\", request.getLocalAddr());\n retOthers.put(\"LocalName\", request.getLocalName());\n retOthers.put(\"TrailerFields\", request.getTrailerFields());\n\n // Cookies\n Map<String, String> retCookies = new LinkedHashMap<>();\n if (request.getCookies() != null) {\n for (Cookie cookie : request.getCookies()) {\n retCookies.put(cookie.getName(), cookie.getValue());\n }\n }\n // Headers\n Map<String, String> retHeaders = new LinkedHashMap<>();\n Enumeration<String> headerNames = request.getHeaderNames();\n while (headerNames.hasMoreElements()) {\n String str = headerNames.nextElement();\n retHeaders.put(str, request.getHeader(str));\n }\n\n\n // Return Map\n Map<String, Object> retVal = new LinkedHashMap<>();\n retVal.put(\"Headers\", retHeaders);\n retVal.put(\"Cookies\", retCookies);\n retVal.put(\"Locate\", retLocate);\n retVal.put(\"Others\", retOthers);\n retVal.put(\"QueryParams\", getQueryParams(request));\n\n return retVal;\n }",
"public List<Map<String,Object>> getURLs() {\n return urls;\n }",
"public Map<String, Match> getReferenceMatches();",
"public Optional<String> redirectLocation() {\n return header(LOCATION);\n }",
"@Override\n public void resolveUrls(KeycloakUriBuilder authUrlBuilder) {\n }",
"protected String calculateRedirectUrl(HttpServletRequest request, String contextPath, String url) {\r\n\t\tif (UrlUtils.isAbsoluteUrl(url)) {\r\n\t\t\treturn url;\r\n\t\t}\r\n\r\n\t\tif (!url.startsWith(\"/\")) {\r\n\t\t\turl = \"/\" + url;\r\n\t\t}\r\n\r\n\t\tint serverPort = portResolver.getServerPort(request);\r\n\t\tString scheme = request.getScheme();\r\n\r\n\t\tRedirectUrlBuilder urlBuilder = new RedirectUrlBuilder();\r\n\t\turlBuilder.setScheme(scheme);\r\n\t\turlBuilder.setPort(serverPort);\r\n\t\turlBuilder.setServerName(request.getServerName());\r\n\t\turlBuilder.setContextPath(request.getContextPath());\r\n\t\turlBuilder.setPathInfo(url);\r\n\r\n\t\tif (forceHttps && \"http\".equals(scheme)) {\r\n\t\t\tInteger httpsPort = portMapper.lookupHttpsPort(Integer.valueOf(serverPort));\r\n\t\t\tif (httpsPort != null) {\r\n\t\t\t\turlBuilder.setScheme(\"https\");\r\n\t\t\t\turlBuilder.setPort(httpsPort.intValue());\r\n\t\t\t} else {\r\n\t\t\t\tlog.warn(\"Unable to redirect to HTTPS as no port mapping found for HTTP port \" + serverPort);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn urlBuilder.getUrl();\r\n\t}",
"private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }",
"boolean followRedirects() {\n return parseBoolean(settings.get(FOLLOW_REDIRECTS), true);\n }",
"protected Map<String, URL> createMap(Collection<? extends IconRecord> records)\n {\n Map<String, URL> map = New.map(records.size());\n for (IconRecord record : records)\n {\n map.put(getPublicUrl(record.imageURLProperty().get()), record.imageURLProperty().get());\n }\n return map;\n }",
"void sendRedirect(HttpServletResponse response, String location) throws AccessControlException, IOException;",
"public URI getRedirectURI() {\n return redirectURI;\n }",
"protected List<List<URL>> getDefaultUrlList() throws MalformedURLException {\n URL[] urls1 = { \n new URL(\"http://www.dre.vanderbilt.edu/~schmidt/ka.png\"),\n new URL(\"http://www.dre.vanderbilt.edu/~schmidt/uci.png\"),\n new URL(\"http://www.dre.vanderbilt.edu/~schmidt/gifs/dougs-small.jpg\")\n };\n URL[] urls2 = {\n new URL(\"http://www.cs.wustl.edu/~schmidt/gifs/lil-doug.jpg\"),\n new URL(\"http://www.cs.wustl.edu/~schmidt/gifs/wm.jpg\"),\n new URL(\"http://www.cs.wustl.edu/~schmidt/gifs/ironbound.jpg\")\n };\n\n \tList<List<URL>> variableNumberOfInputURLs = \n new ArrayList<List<URL>>();\n variableNumberOfInputURLs.add(Arrays.asList(urls1));\n variableNumberOfInputURLs.add(Arrays.asList(urls2));\n \treturn variableNumberOfInputURLs;\n }",
"public static String returnUrlRedirect(String url) {\r\n\t\treturn url + Constants.REDIRECT;\r\n\t}",
"interface HttpRedirectsService {\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/300\")\n Call<Void> head300();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/300\")\n Call<ResponseBody> get300();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/301\")\n Call<Void> head301();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/301\")\n Call<ResponseBody> get301();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PUT(\"http/redirect/301\")\n Call<ResponseBody> put301(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/302\")\n Call<Void> head302();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/302\")\n Call<ResponseBody> get302();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PATCH(\"http/redirect/302\")\n Call<ResponseBody> patch302(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @POST(\"http/redirect/303\")\n Call<ResponseBody> post303(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/307\")\n Call<Void> head307();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/307\")\n Call<ResponseBody> get307();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PUT(\"http/redirect/307\")\n Call<ResponseBody> put307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PATCH(\"http/redirect/307\")\n Call<ResponseBody> patch307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @POST(\"http/redirect/307\")\n Call<ResponseBody> post307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HTTP(path = \"http/redirect/307\", method = \"DELETE\", hasBody = true)\n Call<ResponseBody> delete307(@Body Boolean booleanValue);\n\n }",
"public void setRedirect(String redirect) {\r\n\t\tthis.redirect = redirect;\r\n\t}",
"public void setUrlMap(Map<String, ?> urlMap)\r\n/* 22: */ {\r\n/* 23: 82 */ this.urlMap.putAll(urlMap);\r\n/* 24: */ }",
"protected String getFinalURL(HttpServletRequest request, HttpServletResponse response,\r\n\t\t\tRedirectRule rule, String targetURL) {\r\n\r\n\t\tString finalURL = getAbsoluteURL(request, targetURL);\r\n\t\tif ((rule instanceof RedirectAction) && ((RedirectAction)rule).encodeUrl == true)\r\n\t\t\tfinalURL = response.encodeRedirectURL(finalURL);\r\n\r\n\t\treturn finalURL;\r\n\t}",
"private Map<String, String> locationListToString(List<Element> locations) {\r\n Map<String, String> locMap = new LinkedHashMap<String, String>();\r\n for (Element location : locations) {\r\n String fileName = location.attributeValue(\"filename\");\r\n String lineNumber = location.attributeValue(\"line\");\r\n String current = locMap.get(fileName);\r\n locMap.put(fileName, null == current ? lineNumber : current + \", \" + lineNumber);\r\n }\r\n return locMap;\r\n }",
"HashMap getRequestingHosts()\n {\n return configfile.requesting_hosts;\n }",
"protected HashMap initReqFailedMap() {\n return new HashMap();\n }",
"public static List<UrlInfo> searchAllUrl() {\n\n //getSynonyms(queryKeywords);\n\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n ArrayList<Long> finalIdList = new ArrayList<Long>();\n\n String email = Secured.getUser(ctx());\n List<UrlEntry> entryIdList = UrlEntry.find()\n .select(\"entryId\")\n .where()\n .eq(\"email\", email)\n .findList();\n for (UrlEntry entry : entryIdList) {\n finalIdList.add(entry.getEntryId());\n }\n System.out.println(\"finalIdList---\" + finalIdList);\n List<UrlInfo> urlList = UrlInfo.find().select(\"url\").where().in(\"urlEntryId\", finalIdList).findList();\n /*ArrayList<String> urls = new ArrayList<String>();\n for (UrlInfo urlInfo : urlList) {\n urls.add(urlInfo.getUrl());\n }\n System.out.println(\"urls in search----\" + urls);*/\n return urlList;\n }",
"@SuppressWarnings(\"unchecked\")\n public Map<String, String> getMapContextPath() {\n FacesContext facesContext = FacesContext.getCurrentInstance();\n ExternalContext extenalContext = facesContext.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) extenalContext.getRequest();\n return (Map<String, String>) request.getSession().getAttribute(\"MAP_CONTEXT_PATH\");\n //xxx_temp end\n }",
"@Test\n public void testDNSRedirect() throws Exception {\n final CountDownLatch signal = new CountDownLatch(1);\n try {\n final String requestString = \"http://links.iterable.com/a/f4c55a1474074acba6ddbcc4e5a9eb38?_e=dt%40iterable.com&_m=f285fd5320414b3d868b4a97233774fe\";\n final String redirectString = \"http://iterable.com/product/fakeTest\";\n final String redirectFinalString = \"https://iterable.com/product/fakeTest\";\n IterableHelper.IterableActionHandler clickCallback = new IterableHelper.IterableActionHandler() {\n @Override\n public void execute(String result) {\n assertEquals(redirectString, result);\n assertFalse(redirectFinalString.equalsIgnoreCase(result));\n signal.countDown();\n }\n };\n IterableApi.getAndTrackDeeplink(requestString, clickCallback);\n assertTrue(\"callback is called\", signal.await(5, TimeUnit.SECONDS));\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"void redirect(Reagent reagent);",
"public List<ReplicaCatalogEntry> getSourceURLs(String site) {\n return (mSourceMap.containsKey(site)) ? mSourceMap.get(site) : new ArrayList();\n }",
"private void testValidIRISpecified(final String service,\n final String redirectPrefix,\n final String[] resourcesThatShouldResolve) {\n // Include an ampersand in the test suffix, as it is important\n // to confirm that this comes back without any form of escaping applied.\n String dummyTestSuffix = \"&dummyTestSuffix\";\n Response response = null;\n URI redirectLocation;\n for (String resource : resourcesThatShouldResolve) {\n try {\n response =\n NetClientUtils.doGetWithAdditionalComponentsNoRedirects(\n baseURL, service,\n webTarget -> webTarget.queryParam(\"iri\",\n resource));\n Assert.assertEquals(response.getStatusInfo().getFamily(),\n Family.REDIRECTION,\n \"lookupIRI response status for iri: \" + resource);\n redirectLocation = response.getLocation();\n } finally {\n if (response != null) {\n response.close();\n response = null;\n }\n }\n Assert.assertEquals(redirectLocation.toString(),\n redirectPrefix + \"?uri=\" + resource,\n \"Redirect URL for \" + resource);\n // Now again, with a suffix provided.\n try {\n response =\n NetClientUtils.doGetWithAdditionalComponentsNoRedirects(\n baseURL, service,\n webTarget -> webTarget.queryParam(\"iri\",\n resource)\n .queryParam(\"suffix\", dummyTestSuffix));\n Assert.assertEquals(response.getStatusInfo().getFamily(),\n Family.REDIRECTION,\n \"lookupIRI response status for iri: \" + resource);\n redirectLocation = response.getLocation();\n } finally {\n if (response != null) {\n response.close();\n response = null;\n }\n }\n Assert.assertEquals(redirectLocation.toString(),\n redirectPrefix + \"?uri=\" + resource + dummyTestSuffix,\n \"Redirect URL for \" + resource\n + \" with suffix \" + dummyTestSuffix);\n }\n }"
] | [
"0.67063427",
"0.63159674",
"0.59595245",
"0.58435005",
"0.5681132",
"0.5599178",
"0.5597897",
"0.5524204",
"0.543943",
"0.53952587",
"0.5367893",
"0.5362365",
"0.53368735",
"0.5330481",
"0.53286254",
"0.5324975",
"0.52926224",
"0.527794",
"0.5251526",
"0.5245726",
"0.522658",
"0.5168916",
"0.5145755",
"0.51320475",
"0.5098061",
"0.5096913",
"0.5094442",
"0.5092521",
"0.5078456",
"0.5067278",
"0.50581783",
"0.50551015",
"0.5032994",
"0.5029747",
"0.50228167",
"0.5013716",
"0.49985105",
"0.49914178",
"0.49803632",
"0.49784374",
"0.4972746",
"0.49628603",
"0.49621254",
"0.49620327",
"0.49618247",
"0.4949535",
"0.4928369",
"0.49281466",
"0.4927304",
"0.4913112",
"0.49069238",
"0.49037424",
"0.48951972",
"0.4893559",
"0.4893559",
"0.4889013",
"0.48758736",
"0.4874652",
"0.48691502",
"0.48601374",
"0.48477793",
"0.4845287",
"0.48336682",
"0.48322135",
"0.4825498",
"0.481977",
"0.48140493",
"0.48067376",
"0.48063654",
"0.47963306",
"0.47925448",
"0.47834232",
"0.47810236",
"0.4776201",
"0.47754613",
"0.47701043",
"0.47520158",
"0.4748365",
"0.47450197",
"0.47434396",
"0.47414908",
"0.47287866",
"0.47272345",
"0.47253874",
"0.4720532",
"0.472012",
"0.4704739",
"0.47011405",
"0.4699823",
"0.4689189",
"0.4668303",
"0.46641955",
"0.4651299",
"0.46449304",
"0.46410784",
"0.46202257",
"0.46200418",
"0.46096036",
"0.4605743",
"0.45908102"
] | 0.71731055 | 0 |
Public constructor is required by servlet spec | public ServletContextListener() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ServletPersonne() {\n super();\n }",
"private AppServlet() {\r\n\r\n }",
"public ToptenServlet() {\r\n\t\tsuper();\r\n\t}",
"public JsonServlet() {\n\t\tsuper();\n\t}",
"public HttpServlet() {\r\n\t\tsuper();\r\n\t}",
"private Request() {}",
"private Request() {}",
"public ControllerServlet() {\n\t\tsuper();\n\t}",
"private ServletUtils() { }",
"private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}",
"public AbstractServlet()\n {\n }",
"public StudentServlet() {\n\t\tsuper();\n\t}",
"public ShanChuServlet() {\n\t\tsuper();\n\t}",
"public DefaultHttpRequest() {\n }",
"public BaseServlet() {\r\n\t\tsuper();\r\n\t}",
"public OAuthServlet() {\r\n\t\tsuper();\r\n\t}",
"public ServletLogChute()\r\n {\r\n }",
"public SearchServlet() {\n\t\tsuper();\n\t}",
"public JwtRequest()\n\t{\n\t\t\n\t}",
"private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }",
"public EchoServlet()\n {\n super();\n\n // Create a logging instance\n this.log = Logger.getLogger(EchoServlet.class.getName());\n\n log.info(\"Constructed new EchoServlet\");\n }",
"protected ServletInputStream() { }",
"public JwtRequest() {\n\t}",
"public RegServlet() {\r\n\t\tsuper();\r\n\t}",
"public RestServlet() {}",
"private HTTPSession ()\n\t{\n\t\tthis (null, false, null);\n\t}",
"public EntryServlet()\n {\n super();\n }",
"private Server()\n\t{\n\t}",
"public SkillServlet() {\r\n\t\tsuper();\r\n\t}",
"public UserServlet() {\n super();\n }",
"private Servlets() {\n\t\tthrow new AssertionError();\n\t}",
"public PointServlet() {\n\t\tsuper();\n\t}",
"public Request() {\n }",
"public RackPortletServlet() {\n }",
"public Request() {\n\n }",
"public SearchEmployeesServlet() {\r\n\t\tsuper();\r\n\t}",
"public UBERequest() {\r\n }",
"public ImageIOServlet() {\n\t\tsuper();\n\t}",
"public HttpFilter() { }",
"Constructor() {\r\n\t\t \r\n\t }",
"private APIClient() {\n }",
"public NewsModifyServlet() {\n\t\tsuper();\n\t}",
"private Request() {\n initFields();\n }",
"public Http()\n {\n numberOfParameters = -1;\n }",
"public API() {}",
"private WebRequest() {\n initFields();\n }",
"private HttpClient() {\n\t}",
"public ServletServerHttpRequest(HttpServletRequest servletRequest)\r\n/* 33: */ {\r\n/* 34: 65 */ Assert.notNull(servletRequest, \"'servletRequest' must not be null\");\r\n/* 35: 66 */ this.servletRequest = servletRequest;\r\n/* 36: */ }",
"public KorisniciREST() {\n }",
"public Constructor(){\n\t\t\n\t}",
"public GenericResource() {\r\n }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"protected GaConnector() {\n }",
"private Response() {}",
"private Response() {}",
"public GenericResource()\r\n {\r\n }",
"public StatisticsServlet() {\n\t\tsuper();\n\t}",
"private RequestExecution() {}",
"public EmployeeServlet()\n {\n logger = Logger.getLogger(getClass().getName());\n }",
"protected AuctionServer()\n\t{\n\t}",
"private RestUtil() {\n\t}",
"public ResponseBuffer()\n {\n // Do nothing.\n }",
"public GenericResource() {\n }",
"private Reqbaz() {\n super(\"reqbaz\", null);\n }",
"private Resource() {}",
"public GenericResource()\n {\n }",
"public BdgServlet() {\r\n\t\tsuper();\r\n\t}",
"public TestServerApi()\r\n\t{\r\n\t\t\r\n\t}",
"public Request(){\n\t\tthis(null, null, null);\n\t}",
"public ResourceUtils() {\r\n //stub\r\n }",
"private MApi() {}",
"public DefaultNashRequestImpl() {\n\t\t\n\t}",
"public AddOrderServlet() {\n\t\tsuper();\n\t}",
"public ShowServlet() {\n\t\tsuper();\n\t}",
"public api() {}",
"public HttpConnector(){\n super();\n }",
"public RPCRequest()\n\t{\n\t\tsuper();\n\t}",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"public Webinar() {\n\t\t\n\t}",
"public AbstractRequestParser()\n {\n super();\n \n //set flag\n this.initialized=false;\n }",
"public GetAdminClassServlet() {\n\t\tsuper();\n\t}",
"public LoginServlet() {\n\t\tsuper();\n\t}",
"public LoginServlet() {\n\t\tsuper();\n\t}",
"public GXWebObjectBase(HttpContext httpContext)\n\t{\n\t\tsuper(httpContext);\n\t\tcastHttpContext();\n\t}",
"public GetMessageServlet() {\n\t\tsuper();\n\t}",
"protected StandardizerServer()\r\n\t{\r\n\t}",
"public RESTWorkItemHandler() {\n\t}",
"public PageUtil() {\n\n\t}",
"public CalccustoRequest()\r\n\t{\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public WebServer ()\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t{\r\n\t\tthis.shost = DEF_HOST; \t\t\t\t\t\t\t\t\r\n\t\tthis.sPort = DEF_PORT; \t\t\t\t\t\t\t\t\r\n\t}",
"public RestService() {\r\n \r\n }",
"public Response(){\n\t\t// nothing needed\n\t}",
"private WolUtil() {\n }",
"private ResourceFactory() {\r\n\t}",
"public BasicResponse() {\n }",
"private Instantiation(){}",
"private PortletRequestUtils() {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}",
"private ClientController() {\n }",
"public Controller()\n\t{\n\n\t}",
"public FileUploadServlet() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}"
] | [
"0.7728938",
"0.7638955",
"0.7390061",
"0.735874",
"0.7355245",
"0.735245",
"0.735245",
"0.7327141",
"0.72331125",
"0.7219205",
"0.7211854",
"0.7208325",
"0.7189762",
"0.71581805",
"0.7106087",
"0.7078185",
"0.7071745",
"0.70598465",
"0.7052743",
"0.7047305",
"0.7012284",
"0.70100033",
"0.6987868",
"0.6981788",
"0.6966198",
"0.69595456",
"0.6955968",
"0.6952902",
"0.69354486",
"0.69005394",
"0.68950534",
"0.6893408",
"0.6866828",
"0.6863458",
"0.6856895",
"0.68471813",
"0.6836718",
"0.6825187",
"0.6806708",
"0.67872244",
"0.6785696",
"0.6785052",
"0.67744684",
"0.6751715",
"0.67494833",
"0.6740119",
"0.6737201",
"0.6730576",
"0.67283076",
"0.6714129",
"0.67093825",
"0.6701426",
"0.6700051",
"0.6685645",
"0.6685645",
"0.6679884",
"0.6679594",
"0.66674423",
"0.66555226",
"0.66503096",
"0.66266423",
"0.66257083",
"0.6617849",
"0.65897536",
"0.6581416",
"0.65806407",
"0.65626264",
"0.6547052",
"0.65414387",
"0.6533274",
"0.6527465",
"0.65246886",
"0.6523231",
"0.651516",
"0.6508826",
"0.65036124",
"0.650178",
"0.64948875",
"0.64893085",
"0.64884365",
"0.648703",
"0.6468498",
"0.6468498",
"0.6468403",
"0.6465402",
"0.6450436",
"0.6447962",
"0.64478284",
"0.6439313",
"0.6437231",
"0.643474",
"0.6420653",
"0.64172757",
"0.64086246",
"0.64084387",
"0.64071083",
"0.6404067",
"0.6402605",
"0.63989127",
"0.6397766",
"0.63954896"
] | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.nav, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.7904163",
"0.7805678",
"0.7766155",
"0.77271765",
"0.7631901",
"0.76217514",
"0.75843245",
"0.7530648",
"0.74879694",
"0.74575084",
"0.74575084",
"0.7438342",
"0.742121",
"0.7402876",
"0.7391506",
"0.7386729",
"0.7379215",
"0.73702943",
"0.7361895",
"0.7355702",
"0.7345358",
"0.7341575",
"0.7329735",
"0.7328178",
"0.7325559",
"0.731858",
"0.7316479",
"0.7313328",
"0.7303971",
"0.7303971",
"0.7301762",
"0.72979945",
"0.72931767",
"0.7286697",
"0.72830683",
"0.7280712",
"0.727849",
"0.72597504",
"0.7259679",
"0.7259679",
"0.7259679",
"0.72593844",
"0.7249859",
"0.72235924",
"0.7219315",
"0.72173464",
"0.7204549",
"0.7199998",
"0.7199193",
"0.71932447",
"0.7185174",
"0.71770936",
"0.71685654",
"0.71678275",
"0.7153802",
"0.7153724",
"0.7135714",
"0.71352243",
"0.71352243",
"0.71292186",
"0.7128784",
"0.7124442",
"0.712348",
"0.712319",
"0.7122235",
"0.71173996",
"0.71168983",
"0.71168983",
"0.71168983",
"0.71168983",
"0.7116834",
"0.7116512",
"0.7115111",
"0.71124107",
"0.71099734",
"0.7109092",
"0.7105732",
"0.7099278",
"0.70981765",
"0.7094616",
"0.70939064",
"0.70939064",
"0.7086415",
"0.708213",
"0.70807576",
"0.7080365",
"0.707349",
"0.7068445",
"0.7061929",
"0.70604044",
"0.70603245",
"0.70515686",
"0.70372933",
"0.70372933",
"0.7036149",
"0.7035617",
"0.7035617",
"0.70319855",
"0.70304316",
"0.7029743",
"0.7019147"
] | 0.0 | -1 |
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.nav_dashboard) {
Intent intent = new Intent(DashboardActivity.this, DashboardActivity.class);
startActivity(intent);
} else if (id == R.id.nav_activities) {
Intent intent = new Intent(DashboardActivity.this, CategoryActivity.class);
startActivity(intent);
} else if (id == R.id.nav_explore) {
Intent intent = new Intent(DashboardActivity.this, ExploreActivity.class);
startActivity(intent);
} else if (id == R.id.nav_feed) {
Intent intent = new Intent(DashboardActivity.this, FeedActivity.class);
startActivity(intent);
} else if (id == R.id.nav_settings) {
Intent intent = new Intent(DashboardActivity.this, SettingsActivity.class);
startActivity(intent);
} else if (id == R.id.nav_sign_out) {
sharedPref.edit().clear().commit();
Intent intent = new Intent(DashboardActivity.this, MainActivity.class);
startActivity(intent);
finish();
} else if (id == R.id.nav_profile){
Intent intent = new Intent(DashboardActivity.this, UserProfileActivity.class);
startActivity(intent);
}
DrawerLayout drawer = findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"void onDialogNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }",
"@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }",
"@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}",
"@Override\n public void OnItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}",
"@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}",
"@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }",
"@Override\n public void onItemClick(int pos) {\n }",
"@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }",
"private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }",
"void onMenuItemClicked();",
"@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}",
"@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }",
"@Override\n public void onItemClick(View view, String data) {\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}",
"abstract public void onSingleItemClick(View view);",
"@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }",
"@Override\n public void itemClick(int pos) {\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }",
"@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n public void onItemClick(Nson parent, View view, int position) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }",
"@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }",
"@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"public void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"void onLinkClicked(@Nullable ContentId itemId);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"void onItemClick(int position);",
"@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }",
"void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n startNavigation();\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}",
"@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }",
"void clickItem(int uid);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }",
"@Override\n public void onItemClick(View view, int position) {\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }",
"public void onItemClick(View view, int position) {\n\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}",
"void onClick(View item, View widget, int position, int which);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}",
"public void menuClicked(MenuItem menuItemSelected);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}"
] | [
"0.7882124",
"0.7236464",
"0.698732",
"0.6946372",
"0.6916901",
"0.6916901",
"0.68844694",
"0.6873591",
"0.686708",
"0.676677",
"0.6742629",
"0.67214864",
"0.6717165",
"0.6713329",
"0.669872",
"0.6698353",
"0.66798544",
"0.6661854",
"0.66607356",
"0.66481036",
"0.6642803",
"0.6623931",
"0.662357",
"0.662129",
"0.66033",
"0.66021395",
"0.6600152",
"0.6599059",
"0.65941995",
"0.6584664",
"0.6584511",
"0.65808487",
"0.65763396",
"0.65744627",
"0.65689784",
"0.6562458",
"0.6558661",
"0.65584403",
"0.65523845",
"0.65523845",
"0.6549912",
"0.6539788",
"0.6534839",
"0.6534335",
"0.6524221",
"0.6524221",
"0.65224",
"0.652187",
"0.6521522",
"0.6518279",
"0.65159607",
"0.65158904",
"0.65032136",
"0.6497458",
"0.6497458",
"0.64969337",
"0.64924973",
"0.64875525",
"0.648736",
"0.6487312",
"0.6486583",
"0.64819175",
"0.6481632",
"0.64743537",
"0.64642686",
"0.6454597",
"0.64466894",
"0.64433545",
"0.64433545",
"0.64433545",
"0.64433545",
"0.64433545",
"0.6438348",
"0.6437009",
"0.64354813",
"0.6432734",
"0.6430776",
"0.64280325",
"0.6425111",
"0.6425111",
"0.6412026",
"0.64107025",
"0.6409034",
"0.6409034",
"0.6408862",
"0.64087605",
"0.64059615",
"0.64004433",
"0.6395193",
"0.63946575",
"0.63908607",
"0.6390733",
"0.6388775",
"0.6388775",
"0.638549",
"0.6368311",
"0.6368311",
"0.63639385",
"0.63639385",
"0.63639385",
"0.6358034"
] | 0.0 | -1 |
Test of findDuplicates method, of class LexicalChecker. | public void testFindDuplicates() {
System.out.println("findDuplicates");
List<String> elements = new ArrayList<>();
elements.add("foo");
elements.add("bar");
elements.add("abc");
elements.add("foo");
elements.add("cde");
elements.add("cde");
elements.add("efg");
elements.add("cde");
Set<String> expResult = new LinkedHashSet<>();
expResult.add("foo");
LexicalChecker instance = new LexicalChecker();
Set<String> result = instance.findDuplicates(elements);
assertNotSame(expResult, result);
expResult.add("cde");
assertEquals(expResult, result);
} | {
"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}",
"@Test\r\n\tpublic void test1() {\r\n\t\tint[] nums = {1,2,3,1,4};\r\n\t\tAssert.assertEquals(true, containsDuplicate(nums));\r\n\t}",
"public static void main(String[] args) {\n\t\tint[] input ={1, 1, 2, 3, 5, 5, 7, 9, 9, 9};\n\t\t\n\t\tfindDuplicates(input);\n\t}",
"int getNumberOfDetectedDuplicates();",
"public static void incrDuplicates() { ++duplicates; }",
"@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 }",
"public static void main(String[] args) {\n\t\tint[] a1 = {1,2,3,4,5,6,7,8,9};\n\t\tSystem.out.println(containsDuplicates(a1));\n\t\tint[] a2 = {1,2,3,4,6,6,7,8,9};\n\t\tSystem.out.println(containsDuplicates(a2));\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint arr[] = {1, 9, 45, 6, 9, 10, 7};\n\t\t\n\t\tfindDuplicatesBruteForce(arr);\n\t\t\n\t\tfindDuplicatesBySorting(arr);\n\t\t\n\t\t\n\t\tint arr2[] = {3,2,1,2,2, 3, 4};\n\t\t\n\t\tfindDuplicatesByHashTable(arr2);\n\t\t\n\t\tfindDuplicatesByNegation(arr2);\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint [] arr = {2,5,1,3,9,0,2,3,1,5,0,5,2};\n\t\t\n\t\tint n = arr.length;\n\t\t\n\t\tSystem.out.println(n);\n\t\t\n\t\tfindDuplicates(arr,n);\n\n\t}",
"public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplicatesE(input);\n return dupA == dupB && dupA == dupC && dupA == dupD && dupA == dupE;\n }",
"@Test\n public void testHasDups() {\n var arg = new String[] {\"a\",\"b\",\"c\"};\n Sequence instance = new Sequence();\n boolean expResult = false;\n boolean result = instance.hasDups(arg);\n assertEquals(expResult, result);\n }",
"@Test\n public void testRemoveDuplicates() {\n System.out.println(\"removeDuplicates\");\n assertArrayEquals(\"abcd\".toCharArray(), q1_3.removeDuplicates(\"abcd\".toCharArray()));\n assertArrayEquals(null, q1_3.removeDuplicates(null));\n assertArrayEquals(\"a****\".toCharArray(), q1_3.removeDuplicates(\"aaaaa\".toCharArray()));\n assertArrayEquals(\"a**b**\".toCharArray(), q1_3.removeDuplicates(\"aaabbb\".toCharArray()));\n assertArrayEquals(\"abcdefg*\".toCharArray(), q1_3.removeDuplicates(\"abcdefga\".toCharArray()));\n assertArrayEquals(\"abcdefg*\".toCharArray(), q1_3.removeDuplicates(\"abcdefgb\".toCharArray()));\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] nums = {2,3,4,5,7,6,0};\r\n\t\t\r\n\t\tSystem.out.println(containsDuplicate(nums));\r\n\r\n\t}",
"static void findDuplicates(int[] input)\n\t{\n\t\t\n\t\tint length= input.length;\n\t\t\n\t\tSystem.out.println(\"The length of the given array is = \"+length);\n\t\t\n\t\t\n\t\tint[] register= new int[input.length];\n\t\t\n\t\t\n\t\tfor(int i: input)\n\t\t{\n\t\t\tregister[i]=1;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Missing numbers in the given array\");\n\t\t\n\t\tfor(int i=1; i<register.length; i++)\n\t\t{\n\t\t\tif(register[i]==0)\n\t\t\t\tSystem.out.println(i);\n\t\t}\n\t\tfor(int a: input)\n\t\t{\n\t\t\tSystem.out.print(a);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tfor(int b: register)\n\t\t{\n\t\tSystem.out.print(b);\n\t\t\n\t\t}\n\t}",
"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}",
"public static void main(String[] args) {\n\n int[] nums = new int[] {1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4};\n System.out.println(containsNearbyDuplicate(nums, 10));\n }",
"public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter the size of the array\");\n int n = sc.nextInt();\n int arr[] = new int[n];\n System.out.println(\"enter the elements in the array\");\n for (int i = 0; i < arr.length; i++) {\n arr[i] = sc.nextInt();\n }\n HashSet<Integer> set = new HashSet<Integer>();\n for (int k = 0; k < n; k++) {\n set.add(arr[k]);\n }\n LinkedList list = new LinkedList(set);\n for (int l = 0; l < list.size(); l++) {\n int val = ((Integer) list.get(l)).intValue();\n if (duplicate(arr, val) > 1)\n System.out.println(\"Occurence of \" + val + \" is \" + duplicate(arr, val));\n }\n }",
"public static boolean hasDups(int num[]) {\n\n //boolean value to trigger while loop, intially false, set to true when a duplicate is found\n boolean found = false;\n\n //int i initialized to 0\n int i = 0;\n\n/*\n //while loop to search through array \n while (found != true) {\n */\n //for loop to loop through array elements after the first one\n //compares the first array element to each successive one for a duplicate\n\n for (int k = 1; k < num.length - 1; k++) {\n\n if (num[i] == num[k]) { //if statement that checks the adjacent values until the end of the array\n\n found = true; //flag for found to be set to true which will end while loop and return result \n\n } //end if\n\n else if (num[i] != num[k]) { //if statement that checks if te adjacent values are not equal to ensure found is false, and continue while loop\n\n found = false; //flag for found to be set to false which will contineu while loop to search through array\n\n } //end else if \n i++; //increments i so it is 1 less than k to check adjacent values in the array\n } //end for\n\n //} //end while\n return found; //retun value\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 }",
"static void test_evensOnlyNoDupes() {\n\n System.out.println( \"\\nTESTS for evensOnlyNoDupes() : \" );\n\n System.out.print( \"String 'BBddHHjj' returns: \" );\n try { System.out.println( StringStuff.evensOnlyNoDupes( \"BBddHHjj\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"String 'BcdBcdBcd' returns: \" );\n try { System.out.println( StringStuff.evensOnlyNoDupes( \"BcdBcdBcd\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n\n }",
"@SuppressWarnings({ \"unchecked\", \"static-access\" })\r\n\tpublic boolean checkArticleIsDuplicated(){\r\n\t\r\n\t\tnum_DupInDBLP = 0;\r\n\t\t\t\t\r\n\t\tCheckExist check = new CheckExist();\r\n\t\t\r\n\t\tnumberArray = (ArrayList<Integer>) check.CheckTitleSignaturePublications(dbsaPublicationCheckList).clone();\r\n\t\tduplicateNumber = numberArray.size();\r\n\t\t\r\n\t\tduplicationArtilce = false;\r\n\t\tif(numberArray.size() > 0){\r\n\t\t\tfor(int i = 0; i < numberArray.size(); i++)\r\n\t\t\t{\t\r\n\t\t\t\tmodel.setValueAt(true, numberArray.get(i), 8);\r\n\t\t\t\tresultsJTable.addRowToPaint(numberArray.get(i), Color.red);\r\n\t\t\t\tduplicationArtilce = true;\r\n\t\t\t\t\r\n\t\t\t\tnum_DupInDBLP ++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetFetcherInfo();\r\n\t\t//System.out.println(num_DupInDBLP);\r\n\t\tcheckDuplicateJButton.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\tDBSAApplication.statisticPanel.updateStatistic(num_Total);\r\n\t\treturn duplicationArtilce;\r\n\t}",
"public static void main(String[] args) {\n\t\tint r = findDuplicate(new int[]{1,1,3});\n\t\tSystem.out.println(r);\n\t}",
"public void testDuplicate() {\n System.out.println(\"duplicate\");\n BufferedCharSequence instance = null;\n BufferedCharSequence expResult = null;\n BufferedCharSequence result = instance.duplicate();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"private void checkDuplicates(String[] array) {\n\t\tfor (int j =0;j<array.length;j++)\n\t\t for (int k=j+1;k<array.length;k++)\n\t\t if (array[j].endsWith(array[k])){\n\t\t \tSystem.out.println(array[j] + array[k]);\n\t\t }\n\t}",
"public static void main(String[] args) {\n\t\tint a[] = { 1, 2, 3, 6, 7, 8, 2, 3 };\r\n\r\n\t\tSystem.out.println(\"The Duplicates in the array is: \");\r\n\t\t\r\n\t\t//1 1\r\n\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tfor (int j=i+1; j < a.length; j++) {\r\n\t\t\t\tif (a[i] == a[j]) {\r\n\t\t\t\t\tSystem.out.println(a[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic int dupMovieChk(Search search) throws Exception {\n\t\treturn 0;\r\n\t}",
"public static void main(String[] args) {\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\t\tfor(int i = 0; i <= 30; i++) { numbers.add(i); }\n\t\t\n\t\t// Add some numbers manually\n\t\tnumbers.add(22);\n\t\tnumbers.add(43);\n\t\tnumbers.add(10);\n\t\t\n\t\t// Find the duplicate numbers\n\t\tDuplicateNumbers dn = new DuplicateNumbers(numbers);\n\t\tList<Integer> answer = dn.findDuplicates();\n\t\t\n\t\t// Display the answer\n\t\tSystem.out.println(\"Duplicate Numbers: \" + answer);\n\t}",
"@Test\n\tvoid testRemoveAllAdjacentDuplicatesInString() {\n\t\tRemoveAllAdjacentDuplicatesInString tester = new RemoveAllAdjacentDuplicatesInString();\n\t\tassertEquals(\"ca\", tester.removeDuplicates(\"abbaca\"));\n\t}",
"public static void testDedupe(){\n LinkedList<String> list = new LinkedList<String>();\n \n for(int i = 0; i < 10; i++)\n list.add(\"Number \" + i);\n for(int j = 0; j < 5; j++)\n list.add(\"Number \" + j);\n \n //print test list\n for (String num : list)\n System.out.print(num + \" \");\n \n //Call deDupe and reprint list\n LinkedLists.deDupe(list);\n System.out.println(\"List after removing dupes: \" + '\\n');\n for (String num : list)\n System.out.print(num + \" \");\n }",
"public static void main(String[] args) {\n\t\tfinal long startTime = System.nanoTime();\r\n\t\t\r\n\t\tint [] plop = {1,1,1,2,2,3};\r\n\t\tSystem.out.println(removeDuplicates2(plop));\r\n\t\t\r\n\r\n\t\tfinal long duration = System.nanoTime() - startTime;\r\n\t\tSystem.out.println(duration);\r\n\t\t\r\n\t}",
"public boolean checkDuplicates(String chars) {\n char[] check = chars.toCharArray();\n for (int i = 0; i < chars.length(); i++) {\n for (int j = i + 1; j < chars.length(); j++) {\n if (check[i] == check[j]) {\n return true;\n }\n }\n }\n return false;\n }",
"public boolean checkDuplicates() {\n\t\tboolean[] vals = new boolean[9];\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tfor(int k = 0; k < 3; k++) {\n\t\t\t\tint num = this.getCellNum(i, k);\n\t\t\t\tif(num != 0) {\n\t\t\t\t\tif(!vals[num-1]) {\n\t\t\t\t\t\t//The number hasn't already been found\n\t\t\t\t\t\tvals[num-1] = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//A duplicate number was found\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"static void FindDuplicate(String[] strArray){\n\t\t\n\t\tHashSet<String> set = new HashSet<String>();\n\t\t\n\t\tfor(String arrayElement : strArray){\n\t\t\tif(!set.add(arrayElement))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Duplicate Element is: \"+ arrayElement);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tString s=\"hello world lokl\";\n\t\tchar[] chararray=s.toCharArray();\n\t\tSet<Character> set = new HashSet<Character>();\n\t\t//hashset is implementation of set interface\n\t\t\n\t\tint ctr=0;\n\t\tfor(int i=0; i<chararray.length;i++)\n\t\t{\n\t\t\tif(!set.add(chararray[i]))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"index of duplicate char-\" + chararray[i]+\" \" +i);\n\t\t\t\tctr++;\n\t\t\t}\n\n\n\t\t}\n\t\t\n\t\tSystem.out.println(\"total no of duplicate characters\"+ ctr);\n\t\t\n\n\t}",
"@Test\n\tvoid RepeatedNumberTest() \n\t{ int[] oneNum = new int[] {1};\n\t\tint[] twoDiffNums = new int[] {1, 2};\n\t\tint[] twoSameNums = new int[] {2, 2};\n\t\tint[] insideOut = new int[] {5, 4, 3, 2, 1, 1, 2, 3, 4, 5};\n\t\t\n\t\tassertFalse(utilities.RepeatedNumber(oneNum));\n\t\tassertFalse(utilities.RepeatedNumber(twoDiffNums));\n\t\tassertTrue(utilities.RepeatedNumber(twoSameNums));\n\t\tassertTrue(utilities.RepeatedNumber(insideOut));\n\t}",
"private static void findDuplicatesBySorting(int[] arr) {\n\t\t\n\t\tint[] givenArray = arr;\n\t\tArrays.sort(givenArray);\n\t\t\n\t\tfor ( int i=0; i<givenArray.length - 1 ; i++)\n\t\t{\n\t\t\tif( givenArray[i] == givenArray[i+1])\n\t\t\t{\n\t\t\t\tSystem.out.println(givenArray[i] + \" is the duplicate by sort method \");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t\n\t}",
"boolean duplicatedUsername(String username);",
"private static void findDuplicatesBruteForce(int[] arr) {\n\t\t\n\t\tfor(int i = 0; i< arr.length ; i++)\n\t\t{\n\t\t\tfor ( int j = i+1 ; j < arr.length ; j++)\n\t\t\t{\n\t\t\t\tif(arr[i] == arr[j])\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(arr[i] + \" is duplicate by brute force method\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\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 }",
"public void checkDuplicate (ArrayList studentAnswer, int answer) {\r\n if (!studentAnswer.contains(answer)){\r\n studentAnswer.add(answer);\r\n }\r\n }",
"@Test\n\tpublic void testRepeatedInsert() {\n\t\tSetADT<String> items = new JavaSet<>();\n\t\titems.insert(\"A\");\n\t\titems.insert(\"B\");\n\t\titems.insert(\"C\");\n\t\titems.insert(\"C\");\n\t\t\n\t\t// No matter what, \"C\" can't be added twice.\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\t//double checking - same as for loop\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\tassertEquals(3, items.size());\n\t\tassertEquals(true, items.contains(\"A\"));\n\t\tassertEquals(true, items.contains(\"B\"));\n\t\tassertEquals(true, items.contains(\"C\"));\n\t\t\n\t}",
"@Test(testName = \"duplicateElementsFromOneArrays\")\n\t public static void commonElementsFromOneArray() \n\t {\n\t int[] my_array = {1, 2, 5, 5, 6, 6, 7, 2};\n\t \n\t for (int i = 0; i < my_array.length-1; i++)\n\t {\n\t for (int j = i+1; j < my_array.length; j++)\n\t {\n\t if ((my_array[i] == my_array[j]) && (i != j))\n\t {\n\t System.out.println(\"Duplicate Element : \"+my_array[j]);\n\t }\n\t }\n\t }\n\t }",
"protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }",
"@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 }",
"public static void main(String[] arg) {\n\n //declare the scanner\n Scanner scan = new Scanner(System.in);\n\n //create the array num\n int num[] = new int[10];\n\n //initialize a string called answer\n String answer = \"\";\n\n //create a do while loop to accept input from the user\n do {\n System.out.print(\"Enter 10 ints- \");\n for (int j = 0; j < 10; j++) {\n num[j] = scan.nextInt();\n }\n String out = \"The array \";\n out += listArray(num); //return a string of the form \"{2, 3, -9}\" \n if (hasDups(num)) {\n out += \"has \";\n }\n else {\n out += \"does not have \";\n }\n out += \"duplicates.\";\n System.out.println(out);\n out = \"The array \";\n out += listArray(num);\n if (exactlyOneDup(num)) {\n out += \"has \";\n }\n else {\n out += \"does not have \";\n }\n out += \"exactly one duplicate.\";\n System.out.println(out);\n System.out.print(\"Go again? Enter 'y' or 'Y', anything else to quit- \");\n answer = scan.next();\n } while (answer.equals(\"Y\") || answer.equals(\"y\"));\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}",
"@Test\n public void removeDuplicatesFromString() {\n\n assertEquals(\"IAMDREW\", Computation.removeDuplicates(\"IIIAAAAMDREEEWW\"));\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}",
"private static ArrayList<Result> removeDuplicates(ArrayList<Result> toDeDup){\n\t\t// This is a hash map that keeps track of the result term\n\t\t// and the index at which it is found.\n\t\tMap<String, Integer> hashm = new HashMap<String, Integer>();\n\t\tArrayList<Result> noDups = new ArrayList<Result>();\n\t\tfor(int i = 0; i < toDeDup.size(); i++){\n\t\t\t// Random bug where scores > 100 sometimes\n\t\t\tif (toDeDup.get(i).getScore()>100){\n\t\t\t\ttoDeDup.get(i).setScore(100-(toDeDup.get(i).getScore()-100));\n\t\t\t}\n\t\t\t// If the result term isn't already in the hash map add it\n\t\t\tif(!hashm.containsKey(toDeDup.get(i).getName().trim())){\n\t\t\t\thashm.put(toDeDup.get(i).getName().trim(), i);\n\t\t\t}else{\n\t\t\t\t// If the result term is already in the hash map\n\t\t\t\t// Compare the scores between the current term and the\n\t\t\t\t// one already in the hashmap. Add the highest.\n\t\t\t\tif (toDeDup.get(i).getScore() > toDeDup.get(hashm.get(toDeDup.get(i).getName().trim())).getScore())\n\t\t\t\t\thashm.put(toDeDup.get(i).getName().trim(), i);\n\t\t\t}\n\t\t}\n\t\t// Go through the hash map and add all of the index's to the \n\t\t// ArrayList of results to return\n\t\tfor (String key: hashm.keySet()){\n\t\t\tnoDups.add(toDeDup.get(hashm.get(key)));\n\t\t}\n\t\treturn noDups;\n\t}",
"void checkRepeated() {\r\n Move check = listOfMoves.peek();\r\n if (map.containsKey(check)) {\r\n _repeated = true;\r\n _winner = map.get(check.from()).opponent();\r\n }\r\n _repeated = false;\r\n }",
"public boolean isDupe(T element);",
"static void test_oddsOnlyNoDupes() {\n\n System.out.println( \"\\nTESTS for oddsOnlyNoDupes() : \" );\n\n System.out.print( \"String 'AAccQQww' returns: \" );\n try { System.out.println( StringStuff.oddsOnlyNoDupes( \"AAccQQww\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n System.out.print( \"String 'AbcAbcAbc' returns: \" );\n try { System.out.println( StringStuff.oddsOnlyNoDupes( \"AbcAbcAbc\" ) ); }\n catch ( Exception e ) { System.out.println ( false ); }\n\n\n }",
"public static void main(String[] args) {\n\t\tString str_fail = \"abccs\";\n\t\tString str_pass = \"abcd\";\n\t\tSystem.out.println(isUnique.doubleLoop(str_fail));\n\t\tSystem.out.println(isUnique.doubleLoop(str_pass));\n\t\t\n\t\tSystem.out.println(isUnique.hashing(str_fail));\n\t\tSystem.out.println(isUnique.hashing(str_pass));\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\tAnagramCheck();\n\t\tSet<Character> se = new HashSet<Character>();\n\t\tSet<Character> se1 = new HashSet<Character>();\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer sb1 = new StringBuffer();\n\t\tString str =\"javav\";\n\t\t\n\t\tfor(int i =0; i <str.length();i++)\n\t\t{\n\t\t\tCharacter ch = str.charAt(i);\n\t\t\t\n\t\t\tif(!se.contains(ch))\n\t\t\t{\n\t\t\t\tse.add(ch);\n\t\t\t\tsb.append(ch);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tse1.add(ch);\n\t\t\t\tsb1.append(ch);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"The duplicates after removed \"+sb.toString());\n\t\t\n\t\tSystem.out.println(\"The duplicate item is \"+sb1.toString());\n\t}",
"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}",
"public static void main(String args[]) {\n\t\t\n\t\tint arr[]= {1,2,3,2,3,4,5,4,6};\n\t\t\n\t\tSystem.out.print(\"The original including the duplicate elements is: \");\n\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" \\n \");\n\t\t\n//\t\tThe search for the duplicate array begins here.\n\t\t\n\t\tSystem.out.print(\"The array of duplicate elements are the following: \");\n\t\t\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\t\t\n\t\t\tfor(int j=i+1;j<arr.length;j++) {\n\t\t\t\tif(arr[i]==arr[j]) {\n\t\t\t\t\tSystem.out.print(arr[j] + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testGetDuplicateUsers() {\n UserMapping userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1-GP\");\n\n userMappingDao.save(userMapping);\n\n // this one will show\n userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1\");\n\n userMappingDao.save(userMapping);\n\n List<UserMapping> userMappings = userMappingDao.getDuplicateUsers(\"nhsno1\", \"username1\", tenancy);\n\n // should get back 1 result\n assertEquals(\"incorrect number of duplicates found for nhsno1\", 1, userMappings.size());\n\n assertEquals(\"incorrect duplicate found for nhsno1\", \"usernameDuplicate1\", userMappings.get(0).getUsername());\n }",
"public static void main(String[] args) {\n int[] nums = {0,0,1,1,1,2,2,3,3,4};\n int val = removeDuplicates(nums);\n System.out.println(val);\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<String> arrayListWithDups = new ArrayList<String>();\n\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"test\");\n\t\tarrayListWithDups.add(\"nonie\");\n\t\tarrayListWithDups.add(null);\n\t\tarrayListWithDups.add(\"中中中\");\n\t\tarrayListWithDups.add(\"homework\");\n\t\tarrayListWithDups.add(null);\n\n\t\t// Printing listWithDuplicateElements\n\t\tSystem.out.print(\"Input:\");\n\t\tSystem.out.println(arrayListWithDups);\n\n\t\t// Constructing HashSet using listWithDuplicateElements\n\t\tHashSet<String> removeDups = new HashSet<String>(arrayListWithDups);\n\n\t\t// Constructing listWithoutDuplicateElements using set\n\t\tArrayList<String> arrayListNoDups = new ArrayList<String>(removeDups);\n\n\t\t// Printing listWithoutDuplicateElements\n\t\tSystem.out.print(\"Ouput: \");\n\t\tSystem.out.println(arrayListNoDups);\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 }",
"public boolean checkforDuplicates(Tour tocheck) {\r\n\t\t boolean duplicate=false;\r\n\t\tfor(int t=0; t<tours.length-1;t++) {\r\n\t\t\tif(tocheck.checkforOrderDiffrence(tours[t])==false) {\r\n\t\t\t\tduplicate=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn duplicate;\r\n\t}",
"static void solution1Day1Part2() {\n\n Scanner file = null;\n Set<Integer> resultingFrequencies = new HashSet<>();\n int resultingFrequency = 0;\n int change = 0;\n boolean duplicateFound = false;\n\n try {\n while (!duplicateFound) {\n\n file = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n\n while (file.hasNext()) {\n //System.out.println(\"\\nCurrent frequency is: \" + resultingFrequency);\n change = file.nextInt();\n resultingFrequency += change;\n //System.out.println(\"Change of: \" + change);\n //System.out.println(\"Resulting frequency is: \" + resultingFrequency);\n\n if (resultingFrequencies.contains(resultingFrequency)) {\n System.out.println(\"\\nDay1 Part2 - The first duplicate resulting frequency is: \" + resultingFrequency);\n duplicateFound = true;\n break;\n }\n resultingFrequencies.add(resultingFrequency);\n }\n file.close();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }",
"public static void main(String[] args) {\n\t\tRemoveDuplicatesfromSortedArray test = new RemoveDuplicatesfromSortedArray();\n\t\tint[] nums = {1,1,2};\n\t\tint r = test.removeDuplicates(nums);\n\t\tSystem.out.println(r);\n\t}",
"@Test\n\tpublic void singleWordGrepTest2() throws Exception {\n\t\t// word is 'crazy'\n\t\tHashSet<String> grepFound = loadGrepResults(\"crazy\");\n\t\tCollection<Page> index = queryTest.query(\"crazy\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}",
"@Test\n public void shouldReturnUniqueCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n boolean noMatches = true;\n\n\n for (int i = 0; i < codenames.length-1; i++)\n {\n for (int j = i+1; j < codenames.length; j++)\n {\n if (codenames[i] == codenames[j])\n {\n noMatches = false;\n // Here to give more detailed feedback in case the test fails.\n System.out.println(\"Match found: \" + codenames[i] + \" \" + codenames[j]);\n }\n }\n }\n\n assert(noMatches);\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 }",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tList<Integer> nums = new ArrayList<>();\r\n\t\t\r\n\t\tnums.add(10);nums.add(10);nums.add(10);nums.add(8);\r\n\t\tnums.add(11);nums.add(10);nums.add(10);nums.add(10);\r\n\r\n\t\tSystem.out.println(nums);\r\n\t\t\r\n\t\tList<Integer> unique1 = new ArrayList<>(); \r\n\t\t\r\n\t\t\r\n\t\t // find unique NON DUPLICATE VALUES\r\n\t\tfor(Integer num: nums) {\r\n\t\t\tif(!unique1.contains(num)) { // if unique1 doesn't contains num add it\r\n\t\t\t\tunique1.add(num); //<<<<<======= adding to unique1 num one by one\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique1.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t \r\n\t\t\r\n\t\tList<Integer> unique2 = new ArrayList<>();\r\n\t\t\r\n\t\tfor(int i =0; i<nums.size(); i++) { // find unique ( appearence once)\r\n\t\t\tint count=0;\r\n\t\t\t\r\n\t\t\tInteger value = nums.get(i);\r\n\t\t\tfor(int k =0; k<nums.size(); k++) {\r\n\t\t\t\tif(nums.get(k)== value && i != k) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(count == 0) {\r\n\t\t\t\tunique2.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique2);\r\n\t\t\r\n\t}",
"public static void printDuplicate(String str){\n\t\t\n\t\tString[] strArray = str.split(\" \");\n\t\t\n\t\tHashMap<String, Integer> hm = new HashMap<>();\n\t\t\n\t\t/*for(String tempString : strArray){\n\t\t\tif(hm.containsKey(strArray[i])){\n\t\t\t\t\n\t\t\t\thm.put(strArray[i], hm.get(strArray[i])+1);\n\t\t\t}else{\n\t\t\t\thm.put(strArray[i], 1);\n\t\t\t}\n\t\t}*/\n\t\t\n\t\t//or\n\t\t\n\t\tfor(int i=0; i<strArray.length; i++){\n\t\t\t\n\t\t\tif(hm.containsKey(strArray[i])){\n\t\t\t\t\n\t\t\t\thm.put(strArray[i], hm.get(strArray[i])+1);\n\t\t\t}else{\n\t\t\t\thm.put(strArray[i], 1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(hm);\n\t\t\n\t\tfor (Map.Entry<String, Integer> entry : hm.entrySet()) {\n\t\t\tif(entry.getValue()>1){\n\t\t\t\tSystem.out.print(\"Item : \" + entry.getKey() + \" Count : \" + entry.getValue());\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t//java 8 iteration\n\t\thm.forEach((k,v)->{\n\t\t\t//System.out.println(\"Item : \" + k + \" Count : \" + v);\n\t\t\t\n\t\t\tif(v > 1){\n\t\t\t\t\n\t\t\t\tSystem.out.println(k +\" \" + v);\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"@Test\n void shouldNotSkipDuplicates() {\n Report report = parse(\"pit-with-duplicates.xml\");\n\n assertThat(report).hasSize(22);\n }",
"public static boolean duplicateCheck(ArrayList<Integer> aList) {\n\t\tBoolean duplicates = false;\n\t\tint elementIndex = 0;\n\t\twhile (duplicates == false && elementIndex < aList.size()-1) {\n\t\t\tint compareIndex = elementIndex + 1;\n\t\t\twhile (duplicates == false && compareIndex < aList.size()) {\n\t\t\t\t//System.out.println(aList.get(elementIndex));\n\t\t\t\t//System.out.println(aList.get(compareIndex));\n\t\t\t\tif (aList.get(elementIndex) == aList.get(compareIndex)) {\n\t\t\t\t\t//System.out.println(\"duplicate is true\");\n\t\t\t\t\tduplicates = true;\n\t\t\t\t}\n\t\t\t\tcompareIndex++;\n\t\t\t}\n\t\t\telementIndex++;\n\t\t}\n\t\tif (duplicates == true) {\n\t\t\t//System.out.println(\"final return for duplicate is true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//System.out.println(\"final return for duplicate is false\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean containsDuplicate(int[] nums) {\r\n\t Set<Integer> set = new HashSet<Integer>();\r\n\t for(int i = 0; i < nums.length; i++) {\r\n\t if(set.contains(nums[i]))\r\n\t return true;\r\n\t else\r\n\t set.add(nums[i]);\r\n\t }\r\n\t return false;\r\n\t }",
"@Test\n public void testRepeatedMatch() {\n assertMetrics(\"fieldCompleteness:1 queryCompleteness:0.6667 segments:1 earliness:1 gaps:1\",\n \"pizza hut pizza\",\"pizza hut\");\n }",
"public static void main(String[] args)\n\t{\n\t\tHashSet<String> wordsWithNoDuplicates = new HashSet<>();\n\t\t\n\t\twordsWithNoDuplicates.add(\"poop\");\n\t\twordsWithNoDuplicates.add(\"butt\");\n\t\twordsWithNoDuplicates.add(\"ass\");\n\t\twordsWithNoDuplicates.add(\"ass\");\n\t\t\n\t\tfor (String word : wordsWithNoDuplicates)\n\t\t{\n\t\t\tSystem.out.println(word);\n\t\t}\n\n\t}",
"public int removeDuplicatesMethod1(int[] nums) {\n \tif(nums == null) {\n \t\treturn 0;\n \t}\n int len = nums.length;\n if(len == 0) {\n \treturn 0;\n }\n int endOfNewArray = 0;\n int cnt = 1;\n int temp = nums[0];\n for(int i = 1; i < len; i++) {\n \tif(nums[i] == temp) {\n \t\tif(cnt < 2) {\n \t\t\tcnt++;\n \t\t\tnums[++endOfNewArray] = nums[i];\n \t\t}\n \t}else {\n \t\tcnt = 1;\n \t\tnums[++endOfNewArray] = nums[i];\n \t\ttemp = nums[i];\n \t}\n }\n return ++endOfNewArray;\n }",
"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}",
"protected int checkForDuplicateGiftCards(Order order) {\r\n ArrayList paymentGroupClonedList = new ArrayList(order.getPaymentGroups());\r\n Iterator paymentGroupIterator = paymentGroupClonedList.iterator();;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n String giftCardListCheckString = \"\";\r\n String paymentGroupListCheckString = \"\";\r\n int returnValue = NO_ERRORS;\r\n PaymentGroupImpl paymentGroup;\r\n \r\n while (paymentGroupIterator.hasNext()) {\r\n paymentGroup = (PaymentGroupImpl) paymentGroupIterator.next();\r\n if (paymentGroup instanceof NMCreditCard && ((NMCreditCard) paymentGroup).getCreditCardNumber() != null && ((NMCreditCard) paymentGroup).getCidTransient() != null) {\r\n paymentGroupListCheckString += ((NMCreditCard) paymentGroup).getCreditCardNumber().trim() + ((NMCreditCard) paymentGroup).getCidTransient().trim() + \"~\";\r\n }\r\n }\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n \r\n if (!tempGiftCard.getIsBlank()) {\r\n if (paymentGroupListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n \r\n if (giftCardListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n Iterator giftCardIterator2 = getGiftCardList().iterator(); // another iterator to flag the other card that is a duplicate\r\n GiftCard tempGiftCard2 = null;\r\n while (giftCardIterator2.hasNext()) {\r\n tempGiftCard2 = (GiftCard) giftCardIterator2.next();\r\n if (tempGiftCard2.getCardNumber().trim().equalsIgnoreCase(tempGiftCard.getCardNumber()) && tempGiftCard2.getCid().trim().equalsIgnoreCase(tempGiftCard.getCid())) {\r\n tempGiftCard2.setIsValid(false);\r\n }\r\n }\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n }\r\n giftCardListCheckString += tempGiftCard.getCardNumber() + tempGiftCard.getCid() + \"~\";\r\n }\r\n \r\n return returnValue;\r\n }",
"@Test\n\tpublic void singleWordGrepTest1() throws Exception {\n\t\t// word is 'insane'\n\t\tHashSet<String> grepFound = loadGrepResults(\"insane\");\n\t\tCollection<Page> index = queryTest.query(\"insane\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality with cardinality and one subset\n\t\tassertEquals(indexFound.size(), grepFound.size());\n\t\t\n\t\tHashSet<String> difference = new HashSet<String>(grepFound);\n\t\tdifference.removeAll(indexFound);\n\t\tassertEquals(0, difference.size());\n\t}",
"public static void detectDuplicateNumbersM1(int[] numbersToDetect){\n map = new HashMap<Integer,Integer>();\n logger.info(\"hashmap is created\");\n for (int j : numbersToDetect) {\n if (map.get(j) == null) {\n logger.info(j + \" is added map\");\n map.put(j, 1);\n } else {\n logger.info(j + \" detected second time\");\n System.out.println(\"duplicated number: \" + j);\n break;\n }\n }\n }",
"public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tString[] niz = { \"abc\",\"bcd\",\"efg\",\"ijk\",\"lmn\",\"abc\",\"bcd\"};\n\n\t\tfor(int i=0;i<niz.length-1;i++) {\n\t\t\tfor(int j=i+1;j<niz.length;j++) {\n\t\t\t\tif(niz[i]== niz[j] && (i !=j)) { // moze ici i ovako if( (my_array[i].equals(my_array[j])) && (i != j) )\n\t\t\t\t\tSystem.out.println(\"dupli elementi su : \" + niz[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private boolean containsDuplicate(final int[] inputarray){\n Set<Integer> cells = new HashSet<Integer>();\n for (int i : inputarray){\n if (cells.contains(i) || (i < 1 || i > inputarray.length)) return true;\n cells.add(i);\n }\n return false;\n }",
"public static void findDuplicateWords(String inputString)\r\n\t{\r\n\t\t// split the words in words array \r\n\t\tString words[]= inputString.split(\" \");\r\n\t\t\r\n\t\t//Create HashMap for count the words \r\n\t\tHashMap<String, Integer> wordcount = new HashMap<String, Integer>();\r\n\t\t\r\n\t\t// to check each word in given array \r\n\t\t\r\n\t\tfor(String word: words )\r\n\t\t{\r\n\t\t\t//if word is present \r\n\t\t\tif(wordcount.containsKey(word)) {\r\n\t\t\t\twordcount.put(word.toLowerCase(), wordcount.get(word)+1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twordcount.put(word,1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//extracting all the keys of map : wordcount\r\n\t\tSet<String> wordInString = wordcount.keySet();\r\n\t\t\r\n\t\t// iterate the loop through all the wors in wordCount \r\n\t\tfor(String word : wordInString)\r\n\t\t{\r\n\t\t\tif(wordcount.get(word)>1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(word+ \" : \" + wordcount.get(word));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"private static void findDuplicatesByHashTable(int[] arr) {\n\t\t\n\t\t\n\t\tHashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\t\n\t\tfor(int i=0; i<arr.length ; i++)\n\t\t{\n\t\t\tif(!map.containsKey(arr[i]))\n\t\t\t{\n\t\t\t\tmap.put(arr[i], 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmap.put(arr[i], map.get(arr[i])+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( Map.Entry<Integer, Integer> entry : map.entrySet() )\n\t\t{\n\t\t\tif(entry.getValue() > 1 )\n\t\t\t{\n\t\t\t\tSystem.out.println(\" Duplicate is by HashTable \" + entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"public void containsDuplicates(String debugString) {\n\t\tfor(int i = 0; i < this.solutionLength; i++) {\n\t\t\tif(this.getSolutionRepresentation().lastIndexOf(this.getSolutionRepresentation().get(i)) != i && this.getSolutionRepresentation().lastIndexOf(this.getSolutionRepresentation().get(i)) != -1) {\n\t\t\t\tSystem.out.println(\"[WARNING] - solution contains duplicates. DS: \" + debugString);\n\t\t\t}\n\t\t}\n\t}",
"public static int duplicateCount(String text) {\n String[] textArray = text.toLowerCase().split(\"\");\n List<String> temp = new ArrayList<String>();\n\n // Storing all of the duplicated strings\n for(int i=0; i < textArray.length; i++){\n for(int j=i+1; j < textArray.length; j++){\n if(textArray[i].equals(textArray[j])){\n temp.add(textArray[i]);\n }\n }\n }\n \n // Convert list to array\n String[] itemsArray = new String[temp.size()];\n itemsArray = temp.toArray(itemsArray);\n \n // Removing all the duplicated strings by using hashset\n Set<String> set = new HashSet<String>();\n for(int i = 0; i < itemsArray.length; i++){\n set.add(itemsArray[i]);\n }\n\n // Returning the length \n return set.size();\n }",
"public static boolean hasDups(int[] num) {\n \n //create an int called control\n int control = 1;\n\n //check to see if there are any duplicates in num []\n for (int i = 0; i < num.length; i++) {\n\n for (int j = control; j < num.length; j++) {\n\n if (num[i] == num[j]) {\n return true;\n\n } //end of if statement\n\n } //end of for loop\n\n for (int j = 0; j < i; j++) {\n\n if (num[i] == num[j]) {\n return true;\n\n } //end of if statement\n\n } //end of for loop\n \n control++;\n \n } //end of for loop\n\n return false;\n\n }",
"public boolean findAndRemoveDuplicates() {\n return mFindAndRemoveDuplicates;\n }",
"public int findDuplicatesE(int[] input) {\n int duplicates = 0;\n for (int i = 0; i < input.length; i++) {\n for (int j = i + 1; j < input.length; j++) {\n if (input[i] == input[j]) {\n duplicates++;\n break;\n }\n }\n }\n return duplicates;\n }",
"public static void main(String[] args) {\n\t\tint[] nums = {-1, -1};\r\n\t\tNearbyAlmostDuplicate nad = new NearbyAlmostDuplicate();\r\n\t\tSystem.out.println(nad.containsNearbyAlmostDuplicate(nums, 1, 0));\r\n\t}",
"public static boolean hasDuplicates(String s) {\n\t\tif (StringUtils.isEmpty(s)) {\n\t\t\treturn false;\n\t\t}\n\t\tchar[] c = s.toCharArray();\n\t\tArrays.sort(c);\n\t\tfor (int i = 0; i < c.length - 1; i++) {\n\t\t\tif (c[i] == c[i+1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"static void UseArrayList(ArrayList<Integer> myList2){\r\n\t\tLong start = System.currentTimeMillis();\r\n\t\tfor (int n=0; n<myList2.size();n++)\r\n\t\t{\r\n\t\t\tfor (int m=n+1; m<myList2.size();m++){\r\n\t\t\t\tif( myList2.get(n)== myList2.get(m) ) {System.out.println(\"Duplicate found \"+myList2.get(n));}\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong End = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Total time taken for executing this code is: \" + (End-start));\r\n\t}",
"public static void main(String[] args) {\n\t\tListNode head = new ListNode(1);\n\t\tListNode nodeA = new ListNode(2);\n\t\tListNode nodeB = new ListNode(2);\n\t\tListNode nodeC = new ListNode(3);\n\t\t\n\t\thead.next = nodeA;\n\t\tnodeA.next = nodeB;\n\t\tnodeB.next = nodeC;\n\t\t\n\t\tDeleteDuplicates instance = new DeleteDuplicates();\n\t\thead = instance.solution(head);\n\t\twhile(head != null)\n\t\t{\n\t\t\tSystem.out.println(head.val);\n\t\t\thead = head.next;\n\t\t}\n\t}",
"public void checkForRepeats()\r\n {\n for(int i = 0;i < scriptAds.size();i++)\r\n {\r\n for(int j = i;j < scriptAds.size();j++)\r\n {\r\n if(j + 1 >= scriptAds.size() == false)\r\n { \r\n if(scriptAds.get(i).getAdNumber().toLowerCase().equals(scriptAds.get(j + 1).getAdNumber().toLowerCase()))\r\n {\r\n // i + 1 and j + 2 are used to offset counting by 0\r\n infoText.append(\"<p><strong><font size=\\\"4\\\">CC Num \" + (scriptAds.get(i).getccNumber()) + \" : \" +\r\n scriptAds.get(i).getAdNumber() + \" is a repeat with CC# \" + (j + 2) + \"\\n\" + importFileName + \"</font></strong></p>\");\r\n }\r\n }\r\n }\r\n }\r\n }",
"@Test\n\tpublic void singleWordGrepTest3() throws Exception {\n\t\t// word is 'mistress'\n\t\tHashSet<String> grepFound = loadGrepResults(\"mistress\");\n\t\tCollection<Page> index = queryTest.query(\"mistress\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}",
"static boolean findDuplicate (String word)\n {\n Stack<Character> st = new Stack<>();\n for (int i = 0; i < word.length(); i++) {\n\n char currentChar = word.charAt(i);\n\n if (currentChar == ')') {\n\n if (st.peek() == '(') {\n return true;\n }\n else {\n while (st.peek() != '(') {\n st.pop();\n }\n st.pop();\n }\n }\n else {\n st.push(currentChar);\n }\n }\n return false;\n }",
"public static void main(String[] args) {\n\r\n\t\tDuplicatesWithList dl=new DuplicatesWithList();\r\n\t\tdl.add();\r\n\t}",
"public static void main(String[] args) {\n ArrayList<Character> actual=new ArrayList<>();\n actual.add('R');\n actual.add('G');\n actual.add('B');\n actual.add('Y');\n ArrayList<Character> guess=new ArrayList<>();\n guess.add('G');\n guess.add('G');\n guess.add('R');\n guess.add('R');\n ArrayList<Character> hitLists=new ArrayList<>();\n ArrayList<Character> pseudoLists=new ArrayList<>();\n int hits=0;\n int pseudoHits=0;\n for(int i=0;i<4;i++)\n {\n \t if(actual.get(i)==guess.get(i))\n \t {\n \t\t hits++;\n \t\t hitLists.add(actual.get(i));\n \t }\n }\n for(int i=0;i<4;i++)\n {\n \t char g=guess.get(i);\n \t if(g!=actual.get(i)&&!hitLists.contains(g)&&actual.contains(g))\n { \n\t pseudoLists.add(g);\n }\n }\n for(int i=0;i<pseudoLists.size();i++)\n { char g=pseudoLists.get(i);\n \t int actualOccs=numOccurences(g,actual);\n \t int guessOccs=numOccurences(g,guess);\n \t \n\t\tif(guessOccs==actualOccs)\n \t {\n \t\t pseudoHits++; \n \t }\n\t\telse{\n\t\t\tpseudoHits+=Math.min(guessOccs,actualOccs);\n\t\t}\t \n System.out.println(g);\n }\n \n \n System.out.println(hits+\" hits \"+pseudoHits+\" pseudoHits\");\n\t}",
"public static void main(String[] args) throws IOException {\n File file = new File(\"E:\\\\MyOwnProject\\\\data\\\\test.txt\");\n Scanner scanner = new Scanner(file);\n \t\n// \tint[] values = {1,2,2,3,4,5,5,5,6,7,7,7,8,9,9,9,9,10};\n// \tSinglyLinkedList llist = new SinglyLinkedList();\n// for (int val:values){\n// llist.insertNode(val);\n// }\n// SinglyLinkedListNode result = removeDuplicates(llist.head);\n// printSinglyLinkedList(result);\n //BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv(\"OUTPUT_PATH\")));\n\n// int tests = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// for (int testsItr = 0; testsItr < tests; testsItr++) {\n// int index = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// SinglyLinkedList llist1 = new SinglyLinkedList();\n//\n// int llist1Count = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// for (int i = 0; i < llist1Count; i++) {\n// int llist1Item = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// llist1.insertNode(llist1Item);\n// }\n// \n// \tSinglyLinkedList llist2 = new SinglyLinkedList();\n//\n// int llist2Count = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// for (int i = 0; i < llist2Count; i++) {\n// int llist2Item = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// llist2.insertNode(llist2Item);\n// }\n// \n// \tSinglyLinkedListNode ptr1 = llist1.head;\n// SinglyLinkedListNode ptr2 = llist2.head;\n//\n// for (int i = 0; i < llist1Count; i++) {\n// if (i < index) {\n// ptr1 = ptr1.next;\n// }\n// }\n//\n// for (int i = 0; i < llist2Count; i++) {\n// if (i != llist2Count-1) {\n// ptr2 = ptr2.next;\n// }\n// }\n//\n// ptr2.next = ptr1;\n//// printSinglyLinkedList(llist1.head);\n//// printSinglyLinkedList(llist2.head);\n// int result = findMergeNode(llist1.head, llist2.head);\n// System.out.println(String.valueOf(result));\n// }\n// scanner.close();\n// int[] arr = {3,-7,0};\n// System.out.println(minimumAbsoluteDifference(arr));\n// int money = 5;\n// int[] cost = {2, 1, 3, 5, 6};\n// whatFlavors(cost,money);\n// List<List<Integer>> queries = new ArrayList<>();\n// List<Integer> query = new ArrayList<>();\n// query.add(1);query.add(3);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(2);query.add(3);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(3);query.add(2);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(1);query.add(4);\n// queries.add(query); \n// query = new ArrayList<>();\n// query.add(1);query.add(5);\n// queries.add(query); \n// query = new ArrayList<>();\n// query.add(1);query.add(5);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(1);query.add(4);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(3);query.add(2);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(2);query.add(4);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(3);query.add(2);\n// queries.add(query);\n// int[][] queries = {{1, 5},{1, 6},{3, 2},{1, 10},{1, 10},{1, 6},{2, 5},{3, 2}};\n// List<Integer> res = freqQuery(queries);\n// for(Integer i:res){\n// \t System.out.println(i);\n// }\n String s1 = \"OUDFRMYMAW\";\n String s2 = \"AWHYFCCMQX\";\n System.out.println(commonChild(s1,s2));\n \n \n }",
"public int findDuplicate2(int[] nums) {\n\n if (nums == null || nums.length < 2){\n throw new IllegalArgumentException(\"Array size is less than 2\");\n }\n\n Set<Integer> set = new HashSet<>();\n\n for (int i = 0; i < nums.length; i++){\n if (set.contains(nums[i])){\n return nums[i];\n } else {\n set.add(nums[i]);\n }\n }\n\n return 0;\n }",
"public int findDuplicate(int[] nums) {\n int slow = nums[0];\n int fast = nums[0];\n do {\n slow = nums[slow];\n fast = nums[nums[fast]];\n } while (slow != fast);\n \n slow = nums[0];\n while (slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n return slow;\n }"
] | [
"0.7097055",
"0.68297446",
"0.6616557",
"0.6405332",
"0.6365893",
"0.6356367",
"0.62772185",
"0.61961114",
"0.6163668",
"0.61538523",
"0.6109795",
"0.60349774",
"0.5971091",
"0.59332323",
"0.5931462",
"0.589783",
"0.5884179",
"0.5860663",
"0.58359694",
"0.5826971",
"0.581536",
"0.58024186",
"0.5789206",
"0.57784873",
"0.5751266",
"0.5749534",
"0.57473105",
"0.5716898",
"0.5709776",
"0.5708282",
"0.570815",
"0.5673693",
"0.5659223",
"0.5651529",
"0.5646109",
"0.5631415",
"0.562723",
"0.562192",
"0.5613559",
"0.55776393",
"0.5576632",
"0.5557474",
"0.55502546",
"0.553486",
"0.550886",
"0.5505606",
"0.5501931",
"0.5497125",
"0.54954326",
"0.54927295",
"0.5483265",
"0.5457127",
"0.54567826",
"0.54518807",
"0.54507565",
"0.5437764",
"0.5437351",
"0.54328907",
"0.5432113",
"0.54193854",
"0.5412113",
"0.5401028",
"0.5394476",
"0.53878385",
"0.53841674",
"0.5376119",
"0.53580594",
"0.534737",
"0.53473276",
"0.53412116",
"0.5339544",
"0.5338909",
"0.53388774",
"0.53350717",
"0.5335038",
"0.5331568",
"0.5321283",
"0.5319403",
"0.53184944",
"0.530842",
"0.530466",
"0.5304458",
"0.5304408",
"0.53015566",
"0.52991295",
"0.52919245",
"0.5290025",
"0.5288452",
"0.52870643",
"0.5287004",
"0.52867615",
"0.5274686",
"0.52736986",
"0.5272316",
"0.526871",
"0.52448285",
"0.5243294",
"0.52408856",
"0.5229583",
"0.5226455"
] | 0.8333545 | 0 |
/ name for display purposes only | public String getDisplayName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String nameLabel();",
"String getDisplay_name();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getName() ;",
"public String toString() {return name;}",
"String displayName();",
"String displayName();",
"protected abstract String name ();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"public String getName()\r\n {\n return \"tan\";\r\n }",
"public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }",
"public String name();",
"public String name();",
"public String name();",
"public String name();",
"public String name();",
"public String name();",
"public String name();",
"public String name();",
"public String name();",
"public String getName ();",
"private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}",
"public void showNAME() {\r\n\t\tSystem.out.println(getName().toUpperCase());\r\n\t}",
"@VTID(7)\r\n java.lang.String name();",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s\", getName());\n\t}",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
] | [
"0.7705845",
"0.7657129",
"0.7390206",
"0.7390206",
"0.7390206",
"0.7390206",
"0.7390206",
"0.7390206",
"0.73523337",
"0.7351575",
"0.73483753",
"0.73483753",
"0.7322878",
"0.7308588",
"0.7308588",
"0.7308588",
"0.7308588",
"0.7308588",
"0.7308588",
"0.72923017",
"0.7225764",
"0.72237355",
"0.72237355",
"0.72237355",
"0.72237355",
"0.72237355",
"0.72237355",
"0.72237355",
"0.72237355",
"0.72237355",
"0.7223038",
"0.7218231",
"0.72008365",
"0.7197811",
"0.7191204",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652",
"0.7177652"
] | 0.72701186 | 23 |
/ user ID may be autogenerated or some other unique key | public String getUserID(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getUserID() {\n return user_id;\n }",
"long getUserId();",
"long getUserId();",
"java.lang.String getUserID();",
"java.lang.String getUserID();",
"java.lang.String getUserID();",
"Long getUserId();",
"protected long getUserID() {\n return userID;\n }",
"public long getUserID() {\n //userID++;\n return userID++;\n }",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"String getUserID();",
"public long getUserId();",
"public long getUserId();",
"public long getUserId();",
"public long getUserId();",
"@Override\r\n\tpublic String getUserID() {\n\t\treturn null;\r\n\t}",
"Integer getUserId();",
"private synchronized int generateUserID(){\r\n\t\tint i;\r\n\t\tfor(i = 1; users.containsKey(i);i++);\r\n\t\treturn i;\r\n\t}",
"String getUserId();",
"String getUserId();",
"private synchronized int getUserId() {\n return userId;\n }",
"public void setUser1X_ID (int User1X_ID);",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"public int getUserID()\n {\n return userID;\n }",
"@Override\n\tpublic Long getUserId() {\n\t\treturn user.getKey().getId();\n\t}",
"@Override\n\tpublic long getUserId();",
"@Override\n\tpublic long getUserId();",
"public Long getUserId()\n/* */ {\n/* 73 */ return this.userId;\n/* */ }",
"public int getUserID() {\n return userID;\n }",
"public int getUserID() {\n return userID;\n }",
"public int getUserID() {\n return userID;\n }",
"public int getIduser() {\n return iduser;\n }",
"public int getUser1X_ID();",
"public int getUser1_ID();",
"public int getUser1_ID();",
"public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }",
"public int getIdUser() {\n return idUser;\n }",
"public int getIdUser() {\n return idUser;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public int getUserID() {\n return userID_;\n }",
"public Long getUserid() {\r\n return userid;\r\n }",
"public void setIdUser(int value) {\n this.idUser = value;\n }",
"public void setUser1_ID (int User1_ID);",
"public void setUser1_ID (int User1_ID);",
"public Integer getUser_id() {\n\t\treturn user_id;\n\t}",
"public int getUserID()\n {\n return this.userID;\n }",
"int getUserId() {\r\n\t\t\treturn userId;\r\n\t\t}",
"public int getUserId() {\n return userId_;\n }",
"java.lang.String getUserIdOne();",
"public void setId_user(int id_user) {\n this.id_user = id_user;\n }",
"public Integer getUserID() {\n return userID;\n }",
"public int getUser1Y_ID();",
"public void setIdUser(Integer idUser) {\r\n\t\tthis.idUser = idUser;\r\n\t}",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }"
] | [
"0.7366919",
"0.7154586",
"0.7154586",
"0.712868",
"0.712868",
"0.712868",
"0.7042434",
"0.7021363",
"0.7011084",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70104825",
"0.70046496",
"0.70046496",
"0.70046496",
"0.69923013",
"0.6988082",
"0.6988082",
"0.6988082",
"0.6988082",
"0.69652134",
"0.69600904",
"0.69455355",
"0.69167304",
"0.69167304",
"0.6882044",
"0.6860985",
"0.68597645",
"0.68472916",
"0.6846682",
"0.6844675",
"0.6844675",
"0.6814888",
"0.68106455",
"0.68106455",
"0.68106455",
"0.679619",
"0.6774349",
"0.6770271",
"0.6770271",
"0.67621887",
"0.67477006",
"0.67477006",
"0.6738994",
"0.6738994",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.67388654",
"0.6738177",
"0.6734797",
"0.6717005",
"0.6717005",
"0.6710138",
"0.67043513",
"0.6702305",
"0.66976595",
"0.6689775",
"0.6689654",
"0.66883564",
"0.66882914",
"0.6685632",
"0.6669381",
"0.6669381",
"0.6669381",
"0.6669381",
"0.6644399",
"0.6644399",
"0.6644399",
"0.6644399",
"0.6644399",
"0.6644399",
"0.6644399",
"0.6644399",
"0.6644399"
] | 0.7125488 | 6 |
TODO Autogenerated method stub | @Override
protected boolean isValueIsValid(String value) {
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 |
TODO Autogenerated method stub | @Override
protected boolean updateCriteriaSet(String value) {
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 |
TODO Autogenerated method stub | @Override
protected ProductCriteriaSets getCriteriaSet(String values, ProductDetail existingProduct,
ProductCriteriaSets matchedCriteriaSet, int currentSetValueId) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
The Adapter is the central manager in the framework. It has knowledge of both IReceivers as well as the PipeLine and statistics. The Adapter is the class that is responsible for configuring, initializing and accessing/activating IReceivers, Pipelines, statistics etc. | public interface IAdapter extends IManagable {
/**
* Instruct the adapter to configure itself. The adapter will call the
* pipeline to configure itself, the pipeline will call the individual
* pipes to configure themselves.
* @see nl.nn.adapterframework.pipes.AbstractPipe#configure()
* @see PipeLine#configure()
*/
public void configure() throws ConfigurationException;
/**
* The messagekeeper is used to keep the last x messages, relevant to
* display in the web-functions.
*/
public MessageKeeper getMessageKeeper();
public IReceiver getReceiverByName(String receiverName);
public Iterator getReceiverIterator();
public PipeLineResult processMessage(String messageId, String message, IPipeLineSession pipeLineSession);
public PipeLineResult processMessageWithExceptions(String messageId, String message, IPipeLineSession pipeLineSession) throws ListenerException;
public void registerPipeLine (PipeLine pipeline) throws ConfigurationException;
public void setName(String name);
public boolean isAutoStart();
public String toString();
public String formatErrorMessage(String errorMessage, Throwable t, String originalMessage, String messageID, INamedObject objectInError, long receivedTime);
public void forEachStatisticsKeeperBody(StatisticsKeeperIterationHandler hski, Object data, int action) throws SenderException ;
/**
* state to put in PipeLineResult when a PipeRunException occurs.
*/
public String getErrorState();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NetworkMonitorAdapter( Adapter adapter )\r\n {\r\n super( adapter );\r\n }",
"public interface AdapterInterface {\n}",
"@Override\n public void getAdapters() {\n // standard Cricket adapters\n logAdapter = (LoggerAdapterIface) getRegistered(\"Logger\");\n echoAdapter = (EchoHttpAdapterIface) getRegistered(\"Echo\");\n database = (KeyValueDBIface) getRegistered(\"Database\");\n scheduler = (SchedulerIface) getRegistered(\"Scheduler\");\n htmlAdapter = (HtmlGenAdapterIface) getRegistered(\"WWWService\");\n fileReader = (FileReaderAdapterIface) getRegistered(\"FileReader\");\n // optional\n //scriptingService = (HttpAdapterIface) getRegistered(\"ScriptingService\");\n //scriptingEngine = (ScriptingAdapterIface) getRegistered(\"ScriptingEngine\");\n }",
"private void initializeAdapter() {\n }",
"private AdapterManager getAdapterManager() {\n return adapterManager;\n }",
"public KishouInboundAdapter(AdapterDefinition adapterDefinition) throws ComponentException {\n super(adapterDefinition);\n }",
"public interface AdapterLifeCycle {\n void onAdapterPause();\n void onAdapterResume();\n}",
"public CallPeerAdapter(CallPeer callPeer, CallPeerRenderer renderer)\n {\n this.callPeer = callPeer;\n this.renderer = renderer;\n }",
"@Override\n public AdapterManager<T> getAdapterManager() {\n return mAdapterManager;\n }",
"public Adapter getAdapter() {\n\t\treturn mAdapter;\n\t}",
"@Override\n\tpublic void setAdapter(DmcAdapterIF adapter) {\n\t\t\n\t}",
"@Override\n public Adapter adapt(Notifier notifier, Object type)\n {\n return super.adapt(notifier, this);\n }",
"public void setAdapter(String adapter) {\n this.adapter = adapter;\n }",
"void setAdapter(SqueezerItemAdapter<T> adapter);",
"public void setAdapter(String adapter) {\n this.adapter = adapter;\n }",
"public BreweriesAdapter() {\n }",
"public String getAdapter() {\n return adapter;\n }",
"public void notifyAdapters();",
"public void setAdapter(Adapter adapter) {\n this.adapter = adapter;\n }",
"public NetworkAdapter() {\n }",
"@Override\r\n\tpublic Adapter adapt(Notifier notifier, Object type) {\r\n\t\treturn super.adapt(notifier, this);\r\n\t}",
"@Override\r\n\tpublic Adapter adapt(Notifier notifier, Object type) {\r\n\t\treturn super.adapt(notifier, this);\r\n\t}",
"@Override\r\n\tpublic Adapter adapt(Notifier notifier, Object type) {\r\n\t\treturn super.adapt(notifier, this);\r\n\t}",
"@Override\r\n\tpublic Adapter adapt(Notifier notifier, Object type) {\r\n\t\treturn super.adapt(notifier, this);\r\n\t}",
"@Override\n\tprotected void setListenerAndAdapter() {\n\t\t\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"@Override\n\tpublic Adapter adapt(Notifier notifier, Object type) {\n\t\treturn super.adapt(notifier, this);\n\t}",
"public AdapterFactory getAdapterFactory()\n {\n return adapterFactory;\n }",
"@Override\n public void run() {\n try {\n logger.info(\"Starting\");\n communicator = Util.initialize();\n\n logger.info(\"Initialized\");\n\n ObjectAdapter adapter =\n communicator.createObjectAdapterWithEndpoints(\"Adapter\",\n String.format(\"tcp -h %s -p %d:udp -h %s -p %d\", hostAddress, hostPort, hostAddress, hostPort));\n\n logger.info(\"Adapter created\");\n\n com.zeroc.Ice.Object accountRegistererServant = new AccountRegistererImplementation(clients);\n com.zeroc.Ice.Object standardClientServant = new StandardManagerImplementation(clients);\n com.zeroc.Ice.Object premiumClientServant = new StandardManagerImplementation(clients);\n\n logger.info(\"Servants created\");\n\n adapter.add(accountRegistererServant, new Identity(\"accountRegistererServant\", null));\n adapter.add(standardClientServant, new Identity(\"standardClientServant\", null));\n adapter.add(premiumClientServant, new Identity(\"premiumClientServant\", null));\n\n logger.info(\"Servants added\");\n\n adapter.activate();\n\n logger.info(\"Adapter active. Waiting for termination.\");\n\n communicator.waitForShutdown();\n\n logger.info(\"Shutting down\");\n } catch (Exception e) {\n System.err.println(this.getClass().getName() + \" - ERROR: \" + e.getMessage());\n } finally {\n if (communicator != null) {\n try {\n logger.info(\"Destroying communicator\");\n communicator.destroy();\n } catch (Exception ignored) {\n // No need to handle this\n }\n }\n }\n }",
"public interface YsAdapterBiz {\n RetBody handBindDevices(ReqBindDev reqBindDev);\n RetBody handUnbindDevices(BaseBindDev req);\n}",
"public Adapter adapt(Notifier notifier, Object type) {\r\n\t\treturn super.adapt(notifier, this);\r\n\t}",
"IOutboundAdapter getOutboundAdapter();",
"public EdgeItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"public String adapterId() {\n return this.adapterId;\n }",
"public SystemBehaviorItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"@Override\n\tpublic DmcAdapterIF getAdapter() {\n\t\treturn null;\n\t}",
"public LeDeviceListAdapter() {\n super();\n mLeDevices = new ArrayList<BluetoothDevice>();\n mInflater = DeviceScanActivity.this.getLayoutInflater();\n }",
"public NetworkDependencyItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"public OperationCallItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}",
"protected abstract MainNetworkAdapter<T> getMainAdapter(Context context);",
"abstract public void setUpAdapter();",
"private void InitializeAdapter() {\n arrayAdapter = new PlanListRVArrayAdapter(mPlanList);\n recyclerView.setAdapter(arrayAdapter);\n /* arrayAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n //arrayAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onItemRangeChanged(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeChanged(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeInserted(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeRemoved(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {\n // arrayAdapter.notifyItemMoved(fromPosition,toPosition);\n // TODO itemcount가 1일 경우이므로 1보다 크면 제대로 동작하지 않는다.\n }\n });\n*/\n\n }",
"public MHLMobileIOClient(BandAccelerometerAppActivity a, String ip, int port, String id){\n this.parentActivity = a;\n this.sensorReadingQueue = new MHLBlockingSensorReadingQueue();\n this.ip = ip;\n this.port = port;\n this.userID = id;\n this.startClient();\n }",
"public ResourceAdapter getResourceAdapter() {\n log.finest(\"getResourceAdapter()\");\n return ra;\n }",
"public ObjectAdapter getAdapter() {\n return mAdapter;\n }",
"public interface Adaptable {\n\n}",
"public VideoMetadataMediator() {\n // Initialize the VideoServiceProxy.\n mVideoServiceProxy = new RestAdapter\n .Builder()\n .setEndpoint(SERVER_URL)\n .build()\n .create(VideoServiceProxy.class);\n }",
"public interface WrapperAdapter {\n\n RecyclerView.Adapter getWrappedAdapter();\n}",
"public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }",
"public interface MessageResourceAdapter extends ResourceAdapter {\n\n /**\n */\n ActiveMQConnection makeConnection(ActiveMQConnectionRequestInfo info) throws JMSException;\n\n /**\n * @param activationSpec\n */\n ActiveMQConnection makeConnection(MessageActivationSpec activationSpec) throws JMSException;\n\n /**\n * @return bootstrap context\n */\n BootstrapContext getBootstrapContext();\n\n /**\n */\n String getBrokerXmlConfig();\n\n /**\n * @return Returns the info.\n */\n ActiveMQConnectionRequestInfo getInfo();\n\n}",
"@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }",
"private static AdapterManager getAdapterManager() {\r\n return getPersistenceSession().getAdapterManager();\r\n }",
"public Icc_cdobj_recItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}",
"private Manager() {\n _transportViews = new ArrayList<TransportView>();\n _transportersClient = new ArrayList<TransporterClient>();\n }",
"public ComputerSystemItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}",
"public void setAdapterFactory(AdapterFactory adapterFactory)\n {\n this.adapterFactory = adapterFactory;\n }",
"@Override\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\n\t}",
"public ApplicationLoadBalancerBuilder_elasticloadbalancingv2ItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"@Override\n\t\tpublic <T> T getAdapter(Class<T> adapter) {\n\t\t\treturn null;\n\t\t}",
"public DbAdapter getAdapter() {\n return adapter;\n }",
"public ConnectionServiceAdapterServant(com.android.internal.telecom.IConnectionServiceAdapter r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.<init>(com.android.internal.telecom.IConnectionServiceAdapter):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.<init>(com.android.internal.telecom.IConnectionServiceAdapter):void\");\n }",
"private void setupAdapter() {\n FullWidthDetailsOverviewRowPresenter detailsPresenter;\n if (isIncomingRequest || isOutgoingRequest) {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactRequestDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n } else {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n }\n\n detailsPresenter.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.grey_900));\n detailsPresenter.setInitialState(FullWidthDetailsOverviewRowPresenter.STATE_HALF);\n\n // Hook up transition element.\n Activity activity = getActivity();\n if (activity != null) {\n FullWidthDetailsOverviewSharedElementHelper mHelper = new FullWidthDetailsOverviewSharedElementHelper();\n mHelper.setSharedElementEnterTransition(activity, TVContactActivity.SHARED_ELEMENT_NAME);\n detailsPresenter.setListener(mHelper);\n detailsPresenter.setParticipatingEntranceTransition(false);\n prepareEntranceTransition();\n }\n\n detailsPresenter.setOnActionClickedListener(action -> {\n if (action.getId() == ACTION_CALL) {\n presenter.contactClicked();\n } else if (action.getId() == ACTION_DELETE) {\n presenter.removeContact();\n } else if (action.getId() == ACTION_CLEAR_HISTORY) {\n presenter.clearHistory();\n } else if (action.getId() == ACTION_ADD_CONTACT) {\n presenter.onAddContact();\n } else if (action.getId() == ACTION_ACCEPT) {\n presenter.acceptTrustRequest();\n } else if (action.getId() == ACTION_REFUSE) {\n presenter.refuseTrustRequest();\n } else if (action.getId() == ACTION_BLOCK) {\n presenter.blockTrustRequest();\n }\n });\n\n ClassPresenterSelector mPresenterSelector = new ClassPresenterSelector();\n mPresenterSelector.addClassPresenter(DetailsOverviewRow.class, detailsPresenter);\n mPresenterSelector.addClassPresenter(ListRow.class, new ListRowPresenter());\n mAdapter = new ArrayObjectAdapter(mPresenterSelector);\n setAdapter(mAdapter);\n }",
"public QueueAdapter() {\n list = new ArrayList<>();\n }",
"public TrackItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}",
"public void bind() {\n\t\tview.setAdapter(adapter);\n\t}",
"public MHLMobileIOClient(BandAccelerometerAppActivity a, MHLBlockingSensorReadingQueue q, String ip, int port, String id){\n this.parentActivity = a;\n this.sensorReadingQueue = q;\n this.ip = ip;\n this.port = port;\n this.userID = id;\n this.startClient();\n }",
"public interface RTPConnector\n{\n public void close();\n\n public PushSourceStream getControlInputStream() throws IOException;\n\n public OutputDataStream getControlOutputStream() throws IOException;\n\n public PushSourceStream getDataInputStream() throws IOException;\n\n public OutputDataStream getDataOutputStream() throws IOException;\n\n public int getReceiveBufferSize();\n\n public double getRTCPBandwidthFraction();\n\n public double getRTCPSenderBandwidthFraction();\n\n public int getSendBufferSize();\n\n public void setReceiveBufferSize(int size) throws IOException;\n\n public void setSendBufferSize(int size) throws IOException;\n\n}",
"public EmergencyAdapter(ClickListener clickListener) {\n data = new ArrayList<>();\n this.clickListener = clickListener;\n }",
"public Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic void setAdapter(ListAdapter adapter) {\n\t\tsuper.setAdapter(adapter);\r\n\t\tthis.adapter = (FlowListAdapter)adapter;\r\n\t}",
"@Override\n public void init() {\n logger.info(\"Initializing Sample TAL adapter\");\n\n // In order to get ticket updates from Symphony adapter must subscribe to this explicitly here\n // After subscription is done, all updates will come to this adapter instance via calls to syncTalTicket method\n talProxy.subscribeUpdates(accountId, this);\n\n try {\n // obtain adapter configuration\n setConfig(talConfigService.retrieveTicketSystemConfig(accountId));\n } catch (Exception e) {\n throw new RuntimeException(\"SampleTalAdapterImpl was unable to retrieve \" +\n \"configuration from TalConfigService: \" + e.getMessage(), e);\n }\n\n // subscribe for getting adapter configuration updates\n talConfigService.subscribeForTicketSystemConfigUpdate(accountId,\n (ticketSystemConfig) -> setConfig(ticketSystemConfig));\n }",
"public interface ServerAdapter\nextends ClusterEventAdapter\n{\n\n\tpublic abstract ClusterMessageSender getClusterMessageSender();\n\n\t/**\n\t * @return the globalNamingServer\n\t */\n\tpublic abstract GlobalNamingServer getGlobalNamingServer();\n\tpublic abstract void setGlobalNamingServer(GlobalNamingServer globalNamingServer);\n\n\tpublic ServerAuthentication getServerAuthentication();\n\tpublic void setServerAuthentication(ServerAuthentication serverAuthentication);\n\t\n\t/**\n\t * @see gov.va.med.server.tomcat.ServerLifecycleListener#addLifecycleListener(gov.va.med.server.ServerLifecycleListener)\n\t */\n\tpublic abstract void addServerLifecycleListener(ServerLifecycleListener listener);\n\n\t/**\n\t * @see gov.va.med.server.tomcat.ServerLifecycleListener#removeLifecycleListener(gov.va.med.server.ServerLifecycleListener)\n\t */\n\tpublic abstract void removeServerLifecycleListener(ServerLifecycleListener listener);\n\n\t/**\n\t * \n\t * @param applicationEvent\n\t */\n\tpublic abstract void serverLifecycleEvent(ServerLifecycleEvent applicationEvent);\n\t\n}",
"private void setAdapter() {\n adapter = new MessageAdapter(messages);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(adapter);\n }",
"public NetworkAlertsAdapter(final ItineRennesActivity context) {\n \n super(context, R.layout.li_line_alert);\n this.context = context;\n layoutInfalter = LayoutInflater.from(context);\n }",
"public LineItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}",
"public void registerAdapters(IAdapterFactory factory, Class<?> adaptable);",
"public DataAdapter() {\n }",
"public void setupAdapter() {\n recyclerAdapter = new PhotosAdapter(this);\n recyclerViewPhotos.setAdapter(recyclerAdapter);\n }",
"public Object getAdapter(Object adaptableObject, Class adapterType) {\n \t\tif (IWorkbenchAdapter.class == adapterType) {\n \t\t\treturn getWorkbenchAdapter(adaptableObject);\n \t\t}\n \t\t\n \t\tif(IDeferredWorkbenchAdapter.class == adapterType) {\n \t\t\t Object o = getWorkbenchAdapter(adaptableObject);\n \t\t\t if(o != null && o instanceof IDeferredWorkbenchAdapter) {\n \t\t\t \treturn o;\n \t\t\t }\n \t\t\t return null;\n \t\t}\t\t\n \t\t\n \t\tif (IPropertySource.class == adapterType) {\n \t\t\treturn getPropertySource(adaptableObject);\n \t\t}\n \t\t\n \t\tif (IHistoryPageSource.class == adapterType){\n \t\t\treturn historyParticipant;\n \t\t}\n \t\t\n \t\tif (ITeamStateProvider.class == adapterType) {\n \t\t\tsynchronized (this) {\n \t\t\t\tif (teamStateProvider == null)\n \t\t\t\t\tteamStateProvider = new CVSTeamStateProvider(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());\n \t\t\t}\n \t\t\treturn teamStateProvider;\n \t\t}\n \t\t\n \t\treturn null;\n \t}",
"public SendersAdapter(Context context, ArrayList<Message> objects) {\n this.mContext = context;\n this.mDataset = objects;\n }",
"public void onAttachAdapter(RecyclerView.Adapter<?> adapter) {\n }",
"public FeedRecyclerAdapter() {\n super();\n }",
"public interface DataRelayClient {\n\n /**\n * Send data in a loop over UDP\n */\n public void streamData(String pathToFile) throws IOException;\n\n /**\n * Receive data in a loop via UDP\n */\n public void receiveData() throws IOException;\n\n /**\n * Initialize TCP connection\n */\n public void initializeTCP() throws IOException;\n /**\n * Initialize UDP connection\n */\n public void initializeUDP() throws IOException;\n\n /**\n * Get client ID from the server\n */\n public void setID() throws IOException;\n\n /**\n * Check if client is first to connect\n */\n public boolean isFirstToConnect() throws IOException;\n\n /**\n * Initialize the client\n */\n public void initialize() throws Exception;\n}",
"public interface StructureAdapterInterface {\n\n\t/**\n\t * Used before any additions to do any required pre-processing.\n\t * For example the user could use this to specify the amount of memory to be allocated.\n\t * @param totalNumBonds the total number of bonds in the structure\n\t * @param totalNumAtoms the total number of atoms found in the data.\n\t * @param totalNumGroups the total number of groups found in the data.\n\t * @param totalNumChains the total number of chains found in the data.\n\t * @param totalNumModels the total number of models found in the data.\n\t * @param structureId an identifier for the structure (e.g. PDB id).\n\t */\n\tvoid initStructure(int totalNumBonds, int totalNumAtoms, int totalNumGroups, int totalNumChains, \n\t\t\tint totalNumModels, String structureId);\n\n\t/**\n\t * A generic function to be used at the end of all data addition to do required cleanup on the structure\n\t */\n\tvoid finalizeStructure();\n\n\t/**\n\t * Sets the number of chains for a given model.\n\t * @param modelId identifier of the model within the structure\n\t * @param chainCount total number of chains within this model\n\t */\n\tvoid setModelInfo(int modelId, int chainCount);\n\n\t/**\n\t * Sets the information for a given chain.\n\t * @param chainId chain identifier - length of one to four\n\t * @param chainName chain name - public chain id\n\t * @param groupCount number of groups/residues in chain\n\t */\n\tvoid setChainInfo(String chainId, String chainName, int groupCount);\n\n\t/**\n\t * Sets the entity level annotation for a chain(s). ChainIds is a list of integers that indicate the chains this information\n\t * refers to. Sequence is the one letter amino acid sequence. Description and title are both free forms strings describing the entity and \n\t * acting as a title for the entity.\n\t * @param chainIndices the indices of the chain this refers to.\n\t * @param sequence the full sequence of the entity\n\t * @param description the text description of the entity\n\t * @param type as a string (POLYMER/NON-POLYMER and WATER)\n\t */\n\tvoid setEntityInfo(int[] chainIndices, String sequence, String description, String type);\n\n\t/**\n\t * Sets the information for a given group / residue with atomic data.\n\t * @param groupName 3 letter code name of this group/residue\n\t * @param groupNumber sequence position of this group\n\t * @param insertionCode the one letter insertion code\n\t * @param groupType a string indicating the type of group (as found in the chemcomp dictionary. Empty string if none available.\n\t * @param atomCount the number of atoms in the group\n\t * @param bondCount the number of unique bonds in the group\n\t * @param singleLetterCode the single letter code of the group\n\t * @param sequenceIndex the index of this group in the sequence\n\t * @param secondaryStructureType the type of secondary structure used (types are according to DSSP and number to \n\t * type mappings are defined in the specification)\n\t */\n\tvoid setGroupInfo(String groupName, int groupNumber, char insertionCode,\n\t\t\tString groupType, int atomCount, int bondCount, char singleLetterCode, \n\t\t\tint sequenceIndex, int secondaryStructureType);\n\n\n\t/**\n\t * Sets the atom level information for a given atom.\n\t * @param atomName 1-3 long string of the unique name of the atom\n\t * @param serialNumber a number counting atoms in a structure\n\t * @param alternativeLocationId a character indicating the alternate\n\t * location of the atom\n\t * @param x the x cartesian coordinate\n\t * @param y the y cartesian coordinate\n\t * @param z the z cartesian coordinate\n\t * @param occupancy the atomic occupancy\n\t * @param temperatureFactor the B factor (temperature factor)\n\t * @param element a 1-3 long string indicating the chemical element of the atom\n\t * @param charge the atomic charge\n\t */\n\tvoid setAtomInfo(String atomName, int serialNumber, char alternativeLocationId, \n\t\t\tfloat x, float y, float z, float occupancy, float temperatureFactor, String element, int charge);\n\n\t/**\n\t * Sets a single Bioassembly transformation to a structure. bioAssemblyId indicates the index of the bioassembly.\n\t * @param bioAssemblyIndex an integer index of this bioassembly.\n\t * @param inputChainIndices the integer indices of the chains involved in this bioassembly. \n\t * @param inputTransform a list of doubles indicating the transform for this bioassembly.\n\t * @param name the name of the bioassembly\n\t */\n\tvoid setBioAssemblyTrans(int bioAssemblyIndex, int[] inputChainIndices, double[] inputTransform, String name);\n\n\t/**\n\t * Sets the space group and unit cell information.\n\t *\n\t * @param spaceGroup the space group name, e.g. \"P 21 21 21\"\n\t * @param unitCell an array of length 6 with the unit cell parameters in order: a, b, c, alpha, beta, gamma\n\t * @param ncsOperatorList the list of NCS operation matrices\n\t */\n\tvoid setXtalInfo(String spaceGroup, float[] unitCell, double[][] ncsOperatorList);\n\n\t/**\n\t * Sets an intra-group bond.\n\t *\n\t * @param atomIndexOne the atom index of the first partner in the bond\n\t * @param atomIndexTwo the atom index of the second partner in the bond\n\t * @param bondOrder the bond order\n\t */\n\tvoid setGroupBond(int atomIndexOne, int atomIndexTwo, int bondOrder);\n\n\t/**\n\t * Sets an inter-group bond.\n\t * @param atomIndexOne the atom index of the first partner in the bond\n\t * @param atomIndexTwo the atom index of the second partner in the bond\n\t * @param bondOrder the bond order\n\t */\n\tvoid setInterGroupBond(int atomIndexOne, int atomIndexTwo, int bondOrder);\n\n\n\t/**\n\t * Sets the header information.\n\t * @param rFree the measured R-Free for the structure\n\t * @param rWork the measure R-Work for the structure\n\t * @param resolution the resolution of the structure\n\t * @param title the title of the structure\n\t * @param depositionDate the deposition date of the structure\n\t * @param releaseDate the release date of the structure\n\t * @param experimnetalMethods the list of experimental methods in the structure\n\t */\n\tvoid setHeaderInfo(float rFree, float rWork, float resolution, String title, String depositionDate, \n\t\t\tString releaseDate, String[] experimnetalMethods);\n\n}",
"public interface CustomAdapterHolder {\n\n View.OnClickListener onPlusClicked();\n RecyclerView.Adapter getAdapter();\n Filter getFilter();\n String getActionBarText();\n}"
] | [
"0.69092524",
"0.6554723",
"0.5979439",
"0.5945353",
"0.593535",
"0.59060276",
"0.5895108",
"0.58854455",
"0.58165073",
"0.5814965",
"0.5804324",
"0.5802508",
"0.57488614",
"0.5734375",
"0.5721545",
"0.56754285",
"0.56380796",
"0.5637041",
"0.56364465",
"0.5624382",
"0.56065416",
"0.56065416",
"0.56065416",
"0.56065416",
"0.5600729",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.5594859",
"0.55429775",
"0.55313706",
"0.5501123",
"0.5478339",
"0.5436895",
"0.543398",
"0.54195315",
"0.5413631",
"0.54127324",
"0.5405283",
"0.5399307",
"0.5376735",
"0.53743726",
"0.5362546",
"0.53515077",
"0.53501034",
"0.5330938",
"0.53167546",
"0.53129923",
"0.53102714",
"0.5308604",
"0.53003263",
"0.5292001",
"0.52831835",
"0.52831835",
"0.5268897",
"0.5255325",
"0.5239363",
"0.523878",
"0.52367836",
"0.52170235",
"0.5209569",
"0.5187744",
"0.5185809",
"0.51848257",
"0.51800656",
"0.51701283",
"0.5156469",
"0.5155407",
"0.51496047",
"0.5148859",
"0.51476926",
"0.51467156",
"0.5134186",
"0.51325077",
"0.51289475",
"0.51278424",
"0.5127093",
"0.5126651",
"0.51090115",
"0.50973666",
"0.50889134",
"0.5082308",
"0.5061942",
"0.5055151",
"0.50540715",
"0.5041064",
"0.5037196",
"0.50350404",
"0.50330377"
] | 0.76848495 | 0 |
Instruct the adapter to configure itself. The adapter will call the pipeline to configure itself, the pipeline will call the individual pipes to configure themselves. | public void configure() throws ConfigurationException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPipelineConfiguration(PipelineConfiguration pipe) {\r\n super.setPipelineConfiguration(pipe);\r\n bufferedAttributes = new AttributeCollection(pipe.getConfiguration());\r\n }",
"public abstract IOpipeConfiguration config();",
"@Override\n\t\t\tprotected void configure() {\n\t\t\t}",
"@Override\n\tpublic void configure() {\n\t\t\n\t}",
"@Override\n\tpublic void configure() {\n\n\t}",
"@Override\n public void configure() {\n }",
"@Override\r\n\tprotected void configure() {\n\t\t\r\n\t}",
"@Override\n protected void configure() {\n }",
"public interface IAdapter extends IManagable {\n\n /**\n \t * Instruct the adapter to configure itself. The adapter will call the\n \t * pipeline to configure itself, the pipeline will call the individual\n \t * pipes to configure themselves.\n \t * @see nl.nn.adapterframework.pipes.AbstractPipe#configure()\n \t * @see PipeLine#configure()\n \t */\n \tpublic void configure() throws ConfigurationException;\n \t\n \t/**\n \t * The messagekeeper is used to keep the last x messages, relevant to\n \t * display in the web-functions.\n \t */ \n\tpublic MessageKeeper getMessageKeeper();\n\tpublic IReceiver getReceiverByName(String receiverName);\n\tpublic Iterator getReceiverIterator();\n\tpublic PipeLineResult processMessage(String messageId, String message, IPipeLineSession pipeLineSession);\n\tpublic PipeLineResult processMessageWithExceptions(String messageId, String message, IPipeLineSession pipeLineSession) throws ListenerException;\n\n \tpublic void registerPipeLine (PipeLine pipeline) throws ConfigurationException;\n \tpublic void setName(String name);\n \tpublic boolean isAutoStart();\n\tpublic String toString();\n\n\tpublic String formatErrorMessage(String errorMessage, Throwable t, String originalMessage, String messageID, INamedObject objectInError, long receivedTime);\n\t\t\n\tpublic void forEachStatisticsKeeperBody(StatisticsKeeperIterationHandler hski, Object data, int action) throws SenderException ;\n\n /**\n * state to put in PipeLineResult when a PipeRunException occurs.\n */\n\tpublic String getErrorState();\n}",
"@Override\n\tprotected void configure() {\n\n\t}",
"public void setupPipelineBuffer(final HttpServerExchange exchange) {\n ((HttpServerConnection) exchange.getConnection()).getChannel().getSinkChannel().setConduit(this);\n }",
"@Override\r\n\tpublic void configure() throws Exception {\n\t\t\r\n\t}",
"@Override\n protected void configure() {\n MorphiaLoggerFactory.reset();\n init();\n bind();\n }",
"public void configure() throws Exception\n {\n // Do nothing by default, this method is supposed to be overridden if needed.\n }",
"@Override\r\n protected void configure() {\r\n bindRequiredName(\"LTAS_SERVICE_NAME\", \"LTAS_SERVICE_NAME\");\r\n bindRequiredName(\"RABBITMQ_HOST\", \"RABBITMQ_HOST\");\r\n bindRequiredName(\"RABBITMQ_PORT\", \"RABBITMQ_PORT\");\r\n bindRequiredName(\"RABBITMQ_USERNAME\", \"RABBITMQ_USERNAME\");\r\n bindRequiredName(\"RABBITMQ_PWD\", \"RABBITMQ_PWD\");\r\n bindRequiredName(\"RABBITMQ_VIRTUALHOST\", \"RABBITMQ_VIRTUALHOST\");\r\n\r\n bind(RabbitMQAPI.class);\r\n bind(RabbitMQService.class);\r\n\r\n }",
"void configure();",
"public PipelineConfig() {\n super();\n }",
"@Override\n\tprotected void configure() {\n\t\tbind(Tire.class);\n\t\tbind(Spoke.class);\n\n\t}",
"@Override\n\tpublic void configure(Context arg0) {\n\n\t}",
"@Override\n\tpublic void configure(Context arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void configure(Context arg0) {\n\t\t\n\t}",
"@Override\n protected void configure() {\n bind(EurekaInstanceConfig.class).toProvider(MyDataCenterInstanceConfigProvider.class).in(Scopes.SINGLETON);\n }",
"@Override\n\tpublic void configure(ComponentConfiguration arg0) {\n\n\t}",
"public abstract void configure(String[] args);",
"@Override\n\tpublic void configure(ComponentConfiguration arg0) {\n\t\t\n\t}",
"public void configure() {\n\n // here is a sample which processes the input files\n // (leaving them in place - see the 'noop' flag)\n // then performs content based routing on the message using XPath\n\n }",
"@Override\n public void configure() {\n final TCAAppConfig tcaAppConfig = getConfig();\n\n LOG.info(\"Configuring TCA Application with startup application configuration: {}\", tcaAppConfig);\n\n // Validate application configuration\n ValidationUtils.validateSettings(tcaAppConfig, new TCAAppConfigValidator());\n\n // App Setup\n setName(tcaAppConfig.getAppName());\n setDescription(tcaAppConfig.getAppDescription());\n\n // ========== Streams Setup ============== //\n // Create DMaaP MR Subscriber CDAP output stream\n final String tcaSubscriberOutputStreamName = tcaAppConfig.getTcaSubscriberOutputStreamName();\n LOG.info(\"Creating TCA VES Output Stream: {}\", tcaSubscriberOutputStreamName);\n final Stream subscriberOutputStream =\n new Stream(tcaSubscriberOutputStreamName, TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM);\n addStream(subscriberOutputStream);\n\n\n // ============ Datasets Setup ======== //\n // Create TCA Message Status Table\n final String tcaVESMessageStatusTableName = tcaAppConfig.getTcaVESMessageStatusTableName();\n final Integer messageStatusTableTTLSeconds = tcaAppConfig.getTcaVESMessageStatusTableTTLSeconds();\n LOG.info(\"Creating TCA Message Status Table: {} with TTL: {}\",\n tcaVESMessageStatusTableName, messageStatusTableTTLSeconds);\n final DatasetProperties messageStatusTableProperties =\n TCAMessageStatusPersister.getDatasetProperties(messageStatusTableTTLSeconds);\n createDataset(tcaVESMessageStatusTableName, ObjectMappedTable.class, messageStatusTableProperties);\n\n // Create TCA VES Alerts Table\n final String tcaVESAlertsTableName = tcaAppConfig.getTcaVESAlertsTableName();\n final Integer alertsTableTTLSeconds = tcaAppConfig.getTcaVESAlertsTableTTLSeconds();\n LOG.info(\"Creating TCA Alerts Table: {} with TTL: {}\",\n tcaVESAlertsTableName, alertsTableTTLSeconds);\n final DatasetProperties alertTableProperties =\n TCAVESAlertsPersister.getDatasetProperties(alertsTableTTLSeconds);\n createDataset(tcaVESAlertsTableName, ObjectMappedTable.class, alertTableProperties);\n\n // =========== Flow Setup ============= //\n addFlow(new TCAVESCollectorFlow(tcaAppConfig));\n\n // ========== Workers Setup =========== //\n LOG.info(\"Creating TCA DMaaP Subscriber Worker\");\n addWorker(new TCADMaaPSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\n LOG.info(\"Creating TCA DMaaP Publisher Worker\");\n addWorker(new TCADMaaPPublisherWorker(tcaAppConfig.getTcaVESAlertsTableName()));\n // TODO: Remove this before going to production\n addWorker(new TCADMaaPMockSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\n }",
"@Override\n\tprotected void configure() {\n\n\t\tbind(AddNetworkView.class).to(AddNetworkDesktopView.class).in(Singleton.class);\n\t\tbind(AddNetworkActivity.class);\n\n\t}",
"public SimpleXMLPipelineConfiguration() {\n configurations = new HashMap();\n }",
"@Override\n \t\t\tpublic void initChannel(final Channel channel) throws Exception {\n \n \t\t\t\tfinal NettyPipe pipe = pipeManager().findPipe(\n \t\t\t\t\t\tnetPoint.getPipeline());\n \n \t\t\t\tif (pipe == null) {\n \t\t\t\t\tlog.error(\"missing pipeline\", new IllegalArgumentException(\n \t\t\t\t\t\t\tnetPoint.getPipeline()));\n \t\t\t\t} else {\n \t\t\t\t\tpipe.apply(channel, mode);\n \t\t\t\t}\n \n \t\t\t}",
"private void setupGraph() {\n // we use subcomponent, this is a parent dependance\n mSpotifyStreamerComponent = DaggerSpotifyStreamerComponent\n .builder()\n .spotifyStreamerModule(new SpotifyStreamerModule(this))\n .build();\n }",
"@Override\n\tpublic void configure() {\n\t final SlackComponent slackComponent = (SlackComponent) this.getContext().getComponent(\"slack\");\n\t // set the webhook URL\n\t slackComponent.setWebhookUrl(\"https://hooks.slack.com/services/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\");\n\t\t\n\t\tfrom(from)\n\t\t.routeId(routeId)\n\t\t.setHeader(\"applicationId\", constant(applicationId))\n .process(processor)\n\t\t.to(toUris)\n\t\t.tracing(tracing)\n\t\t.log(log);\n\t}",
"private void setHapScannerPipe () {\n String parameterFileS = \"/Users/feilu/Documents/analysisL/production/parameters_hapScanner.txt\";\n new HapScanner(parameterFileS);\n }",
"@Override\n\tpublic void configureGAN() {\n\t\tGANProcess.type = GANProcess.GAN_TYPE.LODE_RUNNER;\n\t}",
"public void setPipeline(Pipeline pipeline){\n this.pipeline = pipeline;\n }",
"@Override\n\tpublic void configure(Subparser subparser) {\n\t\tsuper.configure(subparser);\n\n\t\tfinal ArgumentGroup group = subparser.addArgumentGroup(\"Preprocessing CLI Config\").description(\"Optional arguments to do a single import step by hand. Overrides json configuration.\");\n\n\t\tgroup.addArgument(\"--in\").required(false)\n\t\t\t .type(new FileArgumentType().verifyIsDirectory().verifyCanRead())\n\t\t\t .help(\"Directory containing the input files (in csv or gzipped csv format).\");\n\n\t\tgroup.addArgument(\"--out\").required(false)\n\t\t\t .type(new FileArgumentType().verifyIsDirectory().verifyCanCreate().verifyCanWrite())\n\t\t\t .help(\"Directory to write the output cqpp files to.\");\n\n\n\t\tgroup.addArgument(\"--desc\").required(false)\n\t\t\t .type(new FileArgumentType().verifyIsDirectory().verifyCanRead())\n\t\t\t .help(\"Directory containing the import description files (*.import.json).\");\n\n\t}",
"private void config() {\n\t}",
"@Override\n\tprotected void configure() {\n\t\tbind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);\n\t\t//experimental stuff...\n\t\tbind(PlaceController.class).to(MyPlaceController.class).in(Singleton.class);\n\t\t\n\t\t// binding view implementations.\n\t\tbind(ContentView.class).to(ContentViewImpl.class);\n\t\tbind(BannerView.class).to(BannerViewImpl.class);\n\t\tbind(SidebarView.class).to(SidebarViewImpl.class);\n\t\t\n\t\t//bind presenter impls...\n\t\tbind(ContentView.Presenter.class).to(ContentPresenter.class);\n\t\tbind(BannerView.Presenter.class).to(BannerPresenter.class);\n\t\tbind(SidebarView.Presenter.class).to(SidebarPrensenter.class);\n\t\t\n\t\t// entrypoint view.\n\t\tbind(MainView.class).to(MainViewImpl.class).in(Singleton.class);\n\t\tbind(MainView.Presenter.class).to(MainPresenterActivity.class).in(Singleton.class);\n\t\t\n\t}",
"protected void configurePorts() {\n \t\tremoveInputs();\n \t\tremoveOutputs();\n \n \t\t// FIXME: Replace with your input and output port definitions\n \n \t\t// Hard coded input port, expecting a single String\n \t\t//File name for the Input tables\n \t\taddInput(IN_FIRST_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_OUTPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FILTER, 0, true, null, String.class);\n \t\t\n \t\t\n \t\tif(configBean.getTypeOfInput().compareTo(\"File\")==0){\n \t\t\taddInput(IN_OUTPUT_TABLE_NAME, 0, true, null, String.class);\n \t\t}\n \t\t\n \n \t\t// Optional ports depending on configuration\n \t\t//if (configBean.getExampleString().equals(\"specialCase\")) {\n \t\t//\t// depth 1, ie. list of binary byte[] arrays\n \t\t//\taddInput(IN_EXTRA_DATA, 1, true, null, byte[].class);\n \t\t//\taddOutput(OUT_REPORT, 0);\n \t\t//}\n \t\t\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_SIMPLE_OUTPUT, 0);\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_REPORT, 0);\n \n \t}",
"@Override\n public void configurePipeline(PipelineConfigurer pipelineConfigurer) {\n // if the user has set createIfNotExists to true, create the FileSet here.\n if (config.createIfNotExists) {\n pipelineConfigurer.createDataset(config.fileSetName,\n FileSet.class,\n FileSetProperties.builder()\n .setInputFormat(TextInputFormat.class)\n .setOutputFormat(TextOutputFormat.class)\n .setEnableExploreOnCreate(true)\n .setExploreFormat(\"text\")\n .setExploreSchema(\"text string\")\n .build()\n );\n }\n // set the output schema of this stage so that stages further down the pipeline will know their input schema.\n pipelineConfigurer.getStageConfigurer().setOutputSchema(OUTPUT_SCHEMA);\n }",
"@Override\n public void configure(Context context) {\n this.context = context;\n this.projectConfigure = new ProjectConfigure(context.getString(\"project_conf_path\", \"\"));\n //初始化变量\n ProjectConfigure.BaseConfigure baseSinkConf = projectConfigure.checkUpdate();\n copyBaseSinkConf(baseSinkConf);\n\n Preconditions.checkArgument(this.batchSize > 0, \"batchSize must be greater than 0\");\n\n this.filePath = (String) Preconditions.checkNotNull((Object)context.getString(\"hdfs.path\"), \"hdfs.path is required\");\n if (this.filePath.endsWith(DIRECTORY_DELIMITER)) {\n this.filePath += DIRECTORY_DELIMITER;\n }\n\n if (this.sinkCounter == null) {\n this.sinkCounter = new SinkCounter(this.getName());\n }\n }",
"@Override\n\tprotected void configure() {\n\n\t\tbind(RacingBike.class).annotatedWith(ApacheRR.class).to(ApacheRR310.class);\n\t\tbind(RacingBike.class).annotatedWith(ApacheRS.class).to(ApacheRR200.class);\n//\t\tbind(RacingBike.class).annotatedWith(Names.named(\"ApacheRT\")).to(ApacheRR160.class);\n//\t\t\n//\t\tbind(String.class).annotatedWith(Names.named(\"Prajjwal Singh\")).toInstance(\"This is Prajjwal Singh Welcoming you here\");\n\t\t\n\t\t//provider class binding\n//\t\tbind(RacingBike.class).toProvider(ProviderBikes.class);\n\t\t\n//\t\tbind(ApacheRR310.class).to(ApacheRR200.class);\n\t\t\n\t}",
"@Override\n public void setupConfiguration(Configuration config)\n {\n\n }",
"@Override\n protected void initChannel(Channel ch) throws Exception {\n ch.remoteAddress();\n\n // Disable the write buffer watermark notification because we manage backpressure by ourselves.\n ChannelUtil.disableWriterBufferWatermark(ch);\n\n final ChannelPipeline p = ch.pipeline();\n p.addLast(new FlushConsolidationHandler());\n p.addLast(ReadSuppressingHandler.INSTANCE);\n configurePipeline(p, port.protocols(), null);\n config.childChannelPipelineCustomizer().accept(p);\n }",
"@Override\n protected void configure() {\n flow(\"OutputParamsAsXML\")\n .from(\"http://localhost:8080\") //embedded http server that listen on 8080 port\n .filter(groovy(\"message.payload != \\\"/favicon.ico\\\"\")) //don't process the browser request for `favicon.ico`\n .transformWith(HttpRequestBodyToParamMap.class) //transform http request body to a map\n .transformWith(ObjectToXml.class) //transform the payload (map) to xml\n .messageProperties()\n .put(\"Content-Type\", \"text/xml\"); //sets the output content-type to xml\n }",
"@Override\n protected void configure() {\n bind(OperationPerformingService.class);\n }",
"@Override\n public void configurePipeline(PipelineConfigurer pipelineConfigurer) {\n FailureCollector collector = pipelineConfigurer.getStageConfigurer().getFailureCollector();\n config.validateGcpParams(collector);\n config.validateConnProps(collector);\n config.validateOptionalProps(collector);\n collector.getOrThrowException();\n\n if (config.isClassLoadingReqd()) {\n try {\n delegate = createDelegate();\n delegate.configurePipeline(pipelineConfigurer);\n } catch (IOException e) { // Catch needed as super method does NOT have any throws clause\n throw new RuntimeException(\"Unable to access GCS or download JCo libraries from GCS\", e);\n } finally {\n jcoLibMgr.cleanUpResources(delegate);\n }\n }\n }",
"@Override\n protected void configure(Object tool, Map<String,Object> configuration)\n {\n super.configure(tool, configuration);\n\n Method init = getInit();\n if (init != null)\n {\n // ctx should, in all cases where a tool has such a method,\n // actually be a View(Tool)Context, but we don't want to link\n // to that class here, so as not to pollute the generic jar\n Object ctx = configuration.get(ToolContext.CONTEXT_KEY);\n if (ctx != null)\n {\n invoke(init, tool, ctx);\n }\n }\n }",
"public void connect(FilterFramework filter) {\n try {\n // Connect this filter's input to the upstream pipe's output stream\n PipedInputStream pis = new PipedInputStream();\n PipedOutputStream pos = new PipedOutputStream();\n pis.connect(pos);\n inputPipedReadPorts.add(pis);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(pos);\n ObjectInputStream objectInputStream = new ObjectInputStream(pis);\n inputReadPorts.add(objectInputStream);\n filter.addOutputStream(pos, objectOutputStream);\n } catch (Exception Error) {\n System.out.println(\"\\n\" + this.getName() + \" FilterFramework error connecting::\" + Error);\n } // try-catch\n }",
"public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }",
"public void setDependencyGeneratorElement(IConfigurationElement element);",
"protected void configureConnectionPool() {\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n JdbcConnectionProvider cp = new JdbcConnectionProvider(this.translator, adapter);\n this.connectionPool = new PoolConnectionProvider(cp, this.maxConnectionPoolSize);\n this.transactionProvider = new SimpleTransactionProvider(this.connectionPool);\n }",
"@Override\n protected void configure() {\n bindListener(Matchers.any(), new PageObjectModelTypeListener());\n }",
"@Override\n\tpublic void configure(CommandLineParser parser) {\n\t\tparser.addOptions(plugins);\n\t}",
"public void setCommandLineGeneratorElement(IConfigurationElement element);",
"protected final ChannelInitializer<Channel> pipeApply(\n \t\t\tfinal NetPoint netPoint, final NettyPipe.Mode mode) {\n \n \t\treturn new ChannelInitializer<Channel>() {\n \t\t\t@Override\n \t\t\tpublic void initChannel(final Channel channel) throws Exception {\n \n \t\t\t\t/** always link channel with owner end point */\n//\t\t\t\tchannel.attr(NettyDot.ATTR_NET_POINT).set(netPoint);\n \n \t\t\t\tfinal NettyPipe pipe = pipeManager().findPipe(\n \t\t\t\t\t\tnetPoint.getPipeline());\n \n \t\t\t\tif (pipe == null) {\n \t\t\t\t\tlog.error(\"missing pipeline\", new IllegalArgumentException(\n \t\t\t\t\t\t\tnetPoint.getPipeline()));\n \t\t\t\t} else {\n \t\t\t\t\tpipe.apply(channel, mode);\n \t\t\t\t}\n \n \t\t\t}\n \t\t};\n \n \t}",
"@Override\n\tpublic void configure(JobConf arg0) {\n\t\t\n\t}",
"@Override\n public void configure() throws Exception {\n from(\"direct:populateKafka\")\n // .threads(Integer.parseInt(Config.getProperty(\"threadPoolSize\")), Integer.parseInt(Config.getProperty(\"maxthreadPoolSize\")))\n .process(new Processor() {\n @Override\n public void process(Exchange exchange) throws Exception {\n try {\n exchange.getOut().setHeaders(exchange.getIn().getHeaders());\n DataSource ds = exchange.getIn().getHeader(\"dataSource\", DataSource.class);\n String kafkaPath = \"kafka:\" + Config.getProperty(\"kafkaURI\") + \"?topic=ds\" + ds.getSrcID() + \"&serializerClass=\" + Config.getProperty(\"kafkaSerializationClass\");\n exchange.getOut().setBody(exchange.getIn().getBody());\n exchange.getOut().setHeader(KafkaConstants.PARTITION_KEY, \"1\");\n exchange.getOut().setHeader(\"kPath\", kafkaPath);\n System.out.println(\"Successfully populated Kafka\");\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n }\n })\n .recipientList(header(\"kPath\"));\n\n }",
"@Override\n\tpublic void configure(List<SensorConfiguration> config) {\n\t\t\n\t}",
"@Override\n public void configure(List<SensorConfiguration> config) {\n }",
"@Override\n protected void configure() {\n bind(TransactionSystemClient.class)\n .annotatedWith(Names.named(\"transaction.off\"))\n .to(DetachedTxSystemClient.class).in(Scopes.SINGLETON);\n\n // When transaction is off, use a TransactionExecutorFactory that uses DetachedTxSystemClient\n install(new FactoryModuleBuilder()\n .implement(TransactionExecutor.class, DetachedTransactionExecutor.class)\n .build(Key.get(TransactionExecutorFactory.class, Names.named(\"transaction.off\"))));\n\n // Creates a DataFabricFacadeFactory injection for creating DataFabricFacade of different types.\n install(\n new FactoryModuleBuilder()\n .implement(DataFabricFacade.class, TransactionDataFabricFacade.class)\n .implement(DataFabricFacade.class, Names.named(\"transaction.off\"), DetachedDataFabricFacade.class)\n .build(DataFabricFacadeFactory.class)\n );\n\n expose(DataFabricFacadeFactory.class);\n }",
"@Override\n\tpublic void configure() throws Exception {\n\t\t\n\t\tProducerTemplate camelTemplate = getContext().createProducerTemplate();\n\n\t\tCamelHelper.getInstance().setHttpCamelTemplate(camelTemplate);\n\n\t\t//endpoint 설정\n\t\tfrom(\"jetty:http://0.0.0.0:9999\"+\"/testApi\")\n\t\t .routeId(\"HTTP_TEST_API\")\n\t\t .process(testProcessor)\n\t\t;\n\t}",
"@Override\n protected void initChannel(Channel ch) throws Exception {\n log.info(\"Initialize handler pipeline for: {}\", ch);\n ch.pipeline().addLast(\"lineBaseSplit\", new LineBasedFrameDecoder(Integer.MAX_VALUE));\n ch.pipeline().addLast(new StringDecoder());\n ch.pipeline().addLast(\"echo\", new EchoHandler2());\n }",
"public ConfigurationItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}",
"private void configureNode() {\n\t\twaitConfigData();\n\t\tpropagateConfigData();\n\n\t\tisConfigured = true;\n\t}",
"@Override\n public void configure(@Nonnull AbstractConfigNode node) throws ConfigurationException {\n Preconditions.checkArgument(node instanceof ConfigPathNode);\n try {\n ConfigurationAnnotationProcessor.readConfigAnnotations(getClass(), (ConfigPathNode) node, this);\n Map<String, Object> config = configuration(node);\n ClientBuilder builder = ClientBuilder.newBuilder();\n if (config != null && !config.isEmpty()) {\n for (String key : config.keySet()) {\n builder.property(key, config.get(key));\n }\n }\n builder.connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS);\n builder.readTimeout(readTimeout, TimeUnit.MILLISECONDS);\n\n if (useSSL) {\n builder.sslContext(SSLContext.getDefault());\n }\n client = builder.register(JacksonJaxbJsonProvider.class).build();\n state().setState(EConnectionState.Open);\n } catch (Exception ex) {\n state().setError(ex);\n throw new ConfigurationException(ex);\n }\n }",
"@Override\n public void configure() {\n\n final GroupedMessageAggregationStrategy groupedMessageAggregationStrategy = new GroupedMessageAggregationStrategy();\n final SizeAwareAggregationStrategy aggregationStrategy = new SizeAwareAggregationStrategy(groupedMessageAggregationStrategy);\n final AggregatedSizeCompletionPredicate completionPredicate = new AggregatedSizeCompletionPredicate(MAX_SIZE, aggregationStrategy);\n\n // @formatter:off\n\n from(\"timer:TIMER_1?period=1\")\n .bean(PersonProducer.class)\n .setHeader(GROUP, () -> RANDOM.nextInt(1))\n .marshal().json(Jackson)\n .to(\"seda:persons\")\n ;\n\n from(\"seda:persons?concurrentConsumers=5\")\n .aggregate()\n .header(GROUP)\n .aggregationStrategy(aggregationStrategy)\n .completionPredicate(completionPredicate)\n .parallelProcessing()\n .bean(ResultsPrinter.class)\n ;\n\n // @formatter:on\n }",
"protected AmqpTransportConfig() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic void prepare(Map arg0, TopologyContext arg1, OutputCollector arg2) {\n\t\tthis.outputCollector = arg2;\n\n\n\t\tvertx = Vertx.vertx();\n\t\tbroker_config = new RabbitMQOptions();\n\t\tbroker_config.setHost(\"localhost\");\n// broker_config.setPort(broker_port);\n// broker_config.setVirtualHost(broker_vhost);\n// broker_config.setUser(username);\n// broker_config.setPassword(password);\n\t\tbroker_config.setConnectionTimeout(6000);\n\t\tbroker_config.setRequestedHeartbeat(60);\n\t\tbroker_config.setHandshakeTimeout(6000);\n\t\tbroker_config.setRequestedChannelMax(5);\n\t\tbroker_config.setNetworkRecoveryInterval(500);\n\n\t\tclient = RabbitMQClient.create(vertx, broker_config);\n\t\tclient.start(start_handler -> {\n\t\t\tif (start_handler.succeeded()) {\n\n\t\t\t\tLog.info(\"vertx RabbitMQ client started successfully!\");\n\t\t\t}\n\t\t});\n\n//\t\tthis.invalidMessageCounter=new HashMap<>();\n\t}",
"@Override\n\t\tprotected void configure() {\n\t\t\tbind(NamedItem.class).annotatedWith(Names.named(\"Mariano\")).to(Mariano.class).asEagerSingleton();\n\t\t\tbind(NamedItem.class).annotatedWith(Names.named(\"Francisco\")).to(Francisco.class).asEagerSingleton();\n\t\t}",
"private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }",
"void configure (Settings settings);",
"@Override\n public void init(Map<String, String> config) {\n>>>>>>> DpStarterKit-fs:starter/src/main/java/com/datapipeline/starter/ConsoleOutputSinkPipe.java\n config.forEach((k, v) -> System.out.println(\"Key: \" + k + \" / Value: \" + v));\n String host = config.get(\"host\");\n String port = config.get(\"port\");\n MongoDBHelper.INSTANCE.getMongoClient(host, Integer.valueOf(port));\n }",
"@Override\n\tpublic void configure(Map<String, ?> configs, boolean isKey) {\n\t}",
"public void configure() throws Exception {\n\t\t\n\t\tXPathBuilder xPathBuilder = new XPathBuilder\n\t\t\t\t(\"//audit-events/audit-event\");\n\n\t\tfrom(\"activemq:batch.events\").\n\t\t\tsplit(xPathBuilder).\n\t\t\tparallelProcessing().\n\t\t\tto(\"activemq:insurance.events\");\n\t}",
"public void configure(URLConnection c) {\n }",
"@Override\n\tpublic void configure() {\n\t\tfrom(\"switchyard://EnrichService\").log(\"Received message for 'EnrichService' : ${body}\").process(new Processor() {\n\n\t\t\t@Override\n\t\t\tpublic void process(Exchange exchange) throws Exception {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<AdaptationTO> adaptationDirective = exchange.getIn().getHeader(\"adaptationDirective\", List.class);\n\t\t\t\tString message = (String)exchange.getIn().getBody();\n\t\t\t\t\n\t\t\t\tString xslt = (String) adaptationDirective.get(0).getData();\n\t\t\t\tStringReader reader = new StringReader(message);\n\t\t\t\tStringWriter writer = new StringWriter();\n\t\t\t\ttry {\n\t\t\t\t\tTemplates templates = tFactory.newTemplates(new StreamSource(new StringReader(xslt)));\n\t\t\t\t\tjavax.xml.transform.Transformer transformer = templates.newTransformer();\n\t\t\t\t\ttransformer.transform(new StreamSource(reader), new StreamResult(writer));\n\t\t\t\t\tmessage = writer.toString();\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tadaptationDirective.remove(0);\n\t\t\t\texchange.getIn().setBody(message);\n\t\t\t}\n\t\t}).log(\"Enrich body : ${body}\");\n\t\t;\n\t}",
"public void configure(Configuration config) throws ConfigurationException {\n\n this.inputConf = config.getChild(\"input-module\");\n this.inputName = this.inputConf.getAttribute(\"name\", this.inputHint);\n this.outputConf = config.getChild(\"output-module\");\n this.outputName = this.outputConf.getAttribute(\"name\", this.outputHint);\n this.defaultParameterName = config.getChild(\"parameter-name\").getValue(null);\n this.useGetValues = config.getChild(\"use-getValues\").getValueAsBoolean(this.useGetValues);\n }",
"@Override\n public void init(ConfigurationContext cfgCtx, TransportOutDescription transportOut)\n throws AxisFault {\n super.init(cfgCtx, transportOut);\n rabbitMQConnectionFactoryManager = new RabbitMQConnectionFactoryManager(transportOut);\n log.info(\"RabbitMQ AMQP Transport Sender initialized...\");\n\n }",
"protected void configurePorts() {\n\t\tremoveInputs();\n\t\tremoveOutputs();\n\n\t\t// FIXME: Replace with your input and output port definitions\n\n\t\t// Hard coded input port, expecting a single String\n\t\t//File name for the Input tables\n\t\taddInput(FIRST_INPUT, 0, true, null, String.class);\n\n\t\t\t\t\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_STD_OUTPUT, 0);\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_ERROR, 0);\n\t\taddOutput(VO_TABLE, 0);\n\n\t}",
"private void configure(ClientBuilder builder) {\n\n final ClientBuilderHolder<?> holder = new ClientBuilderHolder<>(builder);\n final ClientBuilderConfigurer configurer = new ClientBuilderConfigurer(holder);\n\n // configures the builder\n configureClientBuilder(configurer);\n\n // registers the providers\n registerProviders(holder.getClientBuilder(), getProviders());\n }",
"@Override\n public void configurePipeline(ETLStage stageConfig, PipelineConfigurer pipelineConfigurer) {\n if (!Strings.isNullOrEmpty(stageConfig.getProperties().get(BASE_PATH))) {\n String tpfsName = stageConfig.getProperties().get(TPFS_NAME);\n Preconditions.checkArgument(!Strings.isNullOrEmpty(tpfsName), \"TimePartitionedFileSet name must be given.\");\n pipelineConfigurer.createDataset(tpfsName, TimePartitionedFileSet.class.getName(), FileSetProperties.builder()\n .setBasePath(stageConfig.getProperties().get(BASE_PATH))\n .setInputFormat(AvroKeyInputFormat.class)\n .setOutputFormat(AvroKeyOutputFormat.class)\n .setEnableExploreOnCreate(true)\n .setSerDe(\"org.apache.hadoop.hive.serde2.avro.AvroSerDe\")\n .setExploreInputFormat(\"org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat\")\n .setExploreOutputFormat(\"org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat\")\n .setTableProperty(\"avro.schema.literal\", (stageConfig.getProperties().get(SCHEMA)))\n .build());\n }\n }",
"public void addPipe()\n {\n pipe = new PipeComponent();\n pipes.add(pipe);\n }",
"void configure(SamplerConfiguration configuration) throws UserErrorException;",
"public static StreamBuilder configure() {\n return new EventStreamBuilder();\n }",
"void setConfiguration();",
"public void configure(Configuration config) {\r\n learner = config.get(\"classifier\");\r\n if(learner == null)\r\n throw new IllegalArgumentException(\"No weka classifier specified. Make sure a 'classifier' property is specified.\");\r\n classifier = classifiers.get(learner);\r\n if(classifier == null)\r\n throw new IllegalArgumentException(\"Invalid weka classifier name of '\"+learner+\"' - must be one of \"+ArrayUtil.asString(classifiers.getValidNames()));\r\n\r\n super.configure(config);\r\n\r\n logger.config(\" \"+this.getClass().getName()+\"[\"+getName()+\"] configure: weka-classifier[\"+learner+\"]=\"+classifier);\r\n\r\n if(config.containsKey(\"options\"))\r\n {\r\n try\r\n {\r\n classifier.setOptions(config.get(\"options\").split(\" \"));\r\n }\r\n catch(Exception ex)\r\n {\r\n throw new RuntimeException(\"Failed to initialize \"+this.getClass().getName(),ex);\r\n }\r\n }\r\n }",
"private void configureVoice(Voice voice) {\n voice.setPitch(configurator.getPitch());\n voice.setVolume(configurator.getVolume());\n voice.setRate(configurator.getRate());\n }",
"public void configure(Element parent) {\n }",
"@Override\r\n\tpublic void configEngine(Engine me) {\n\r\n\t}",
"public void configurableDataInput() {\n }",
"public BindingConfigurationPanel() {\n initComponents();\n initGUI();\n }",
"@Override\n public void configure() throws Exception {\n restConfiguration()\n .component(\"netty-http\")\n .host(\"0.0.0.0\")\n .port(8099);\n\n rest()\n .post(\"/webhook\")\n .route()\n .setBody(constant(\"{\\\"ok\\\": true}\"))\n .endRest()\n .post(\"/slack/api/conversations.list\")\n .route()\n .setBody(constant(\n \"{\\\"ok\\\":true,\\\"channels\\\":[{\\\"id\\\":\\\"ABC12345\\\",\\\"name\\\":\\\"general\\\",\\\"is_channel\\\":true,\\\"created\\\":1571904169}]}\"))\n .endRest()\n .post(\"/slack/api/conversations.history\")\n .route()\n .setBody(constant(\n \"{\\\"ok\\\":true,\\\"messages\\\":[{\\\"type\\\":\\\"message\\\",\\\"subtype\\\":\\\"bot_message\\\",\\\"text\\\":\\\"Hello Camel Quarkus Slack\\\"\"\n + \",\\\"ts\\\":\\\"1571912155.001300\\\",\\\"bot_id\\\":\\\"ABC12345C\\\"}],\\\"has_more\\\":true\"\n + \",\\\"channel_actions_ts\\\":null,\\\"channel_actions_count\\\":0}\"));\n }",
"@Override\n\tpublic ComposerStatus compose(SystemConfig config, SystemContext systemContext) throws ComposerException {\n\t\tComposerStatus status = ComposerStatus.done;\t\n\t\tSet<String> datasinkExpectedQueues = new HashSet<String>(6);\n\n\t\ttry{\n\t\t\t\n\t\t\tif(config.getDataSinks() != null){\n\t\t\t\tfor(DataSink dataSink : config.getDataSinks()){\n\n\t\t\t\t\t//if user datasink is in the ingestapi list, continue\n\t\t\t\t\tJSONObject datasinkJson = this.getDatasink(dataSink.getFqn());\n\t\t\t\t\tif (datasinkJson != null) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Generate configuration filenames\n\t\t\t\t\t\tString datasinkname = SystemBuilderUtil.getSystemParameterValue(datasinkJson, \"shortname\");\n\t\t\t\t\t\tif (datasinkname == null) {\n\t\t\t\t\t\t\tdatasinkname = StringUtils.deleteWhitespace(SystemBuilderUtil.getSystemParameterValue(datasinkJson, \"name\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (datasinkname == null) \n\t\t\t\t\t\t\tthrow new ComposerException(String.format(\"%s is missing either the name or shortname overridden parameters in the plugin.\",dataSink.getFqn()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tString pipelineFilename = String.format(\"%s.%s.xml\", PIPELINE_FILENAME, datasinkname);\n\t\t\t\t\t\tString pipelineDefaultFilename = String.format(\"%s.%s.default.xml\", PIPELINE_FILENAME, datasinkname);\n\t\t\t\t\t\tString servicesFilename = String.format(\"%s.%s.xml\", SERVICES_FILENAME, datasinkname);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * output pipeline file, common for all datasinks\n\t\t\t\t\t\t */\n\t\t\t\t\t\t((XMLInstantiationProxy<?>) (factoryDefinition.getDefaultEntry())).setDefinitionFile(pipelineDefaultFilename);\n\t\t\t\t\t\t\n\t\t\t\t\t\tFile file = new File(outDir + pipelineFilename);\n\t\t\t\t\t\tserializer.createDefinitionFile(factoryDefinition, file); //output pipeline config file\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * output pipeline file that is specific for this datasink\n\t\t\t\t\t\t */\n\t\t\t\t\t\tXMLParser tmpParser = new XMLParser(true); //create parser\n\n\t\t\t\t\t\t// dynamically build template\n\t\t\t\t\t\tString pipelineTemplate = buildDatasinkXmlTemplate(dataSink.getFqn(), datasinkJson);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//recursively replace properties in data sink template\n\t\t\t\t\t\tInputStream is = new ByteArrayInputStream(properties.filterProperty(pipelineTemplate).getBytes());\n\t\t\t\t\t\ttmpParser.readXmlFileFromStream(is); //parse template to document\n\t\t\t\t\t\tis.close();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//recursively search elements and attributes to replace user configured parameters\n\t\t\t\t\t\ttmpParser = replaceTemplateParameters(dataSink,tmpParser, tmpParser.getDocumentElement(), tmpParser.getDocumentElement().getNodeName());\n\t\t\t\t\t\t\n\t\t\t\t\t\ttmpParser.writeXmlFile(outDir + pipelineDefaultFilename); //output pipeline default xml file\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * read services xml filefrom template, filter to resolve properties, then output\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttmpParser = new XMLParser(true); //reset parser\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Dynamically generate the datasink's services.X.xml vs reading static configs from jar\n\n\t\t\t\t\t\tint numThreads = 0;\n\t\t\t\t\t\tString dataSinkProcessGroupDependencies = \"\";\n\t\t\t\t\t\tboolean usesBlockStorage = false;\n\t\t\t\t\t\tfor (DataSinkConfig sysContextDsinkConfig : systemContext.getDataSinkConfigs()) {\n\t\t\t\t\t\t\tif (sysContextDsinkConfig.getFqn().equals(dataSink.getFqn())) {\n\t\t\t\t\t\t\t\tnumThreads = sysContextDsinkConfig.getNumThreads();\n\t\t\t\t\t\t\t\tdataSinkProcessGroupDependencies = sysContextDsinkConfig.getProcessGroupDependencies();\t\n\t\t\t\t\t\t\t\tusesBlockStorage = sysContextDsinkConfig.isUsesBlockStorage();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (numThreads < 1)\n\t\t\t\t\t\t\tthrow new ComposerException(String.format(\"Unable to determine the number of threads to configure for %s\",dataSink.getFqn()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tString servicesXmlTemplate = DatasinkProcessingServicesBuilder.build(numThreads, templateDir, usesBlockStorage, dataSinkProcessGroupDependencies);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//set queue name for processor for each data sink\n\t\t\t\t\t\tproperties.setProperty(\"generated.datasink.queue.name\", SystemBuilderUtil.generateDataModelQueueName(dataSink.getFqn()));\n\t\t\t\t\t\tdatasinkExpectedQueues.add(properties.getProperty(\"generated.datasink.queue.name\"));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set the shortname for this datasink which is used for the pipeline definition reference\n\t\t\t\t\t\tproperties.setProperty(\"shortname\", datasinkname);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//recursively replace properties in data sink template\n\t\t\t\t\t\tis = new ByteArrayInputStream(properties.filterProperty(servicesXmlTemplate).getBytes());\n\t\t\t\t\t\ttmpParser.readXmlFileFromStream(is); //parse template to document\n\t\t\t\t\t\tis.close();\n\t\t\t\t\t\t\n\t\t\t\t\t\ttmpParser.writeXmlFile(outDir + servicesFilename); //output services xml file\n\t\t\t\t\t\t\n\t\t\t\t\t\t//temporary fix, correct after v1.0 release, outputs alerting datasink topic name to property file\n\t\t\t\t\t\tif(\"com.deleidos.rtws.ext.datasink.AlertingDataSink\".equals(dataSink.getFqn())){\n\t\t\t\t\t\t\tifTopicExistsSetProperty(dataSink);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}//end if data sink exists\n\t\t\t\t}//end for\n\t\t\t}//end if data sink config from user\n\t\t}\n\t\tcatch(ComposerException ce){\n\t\t\tstatus = ComposerStatus.error;\n\t\t\tthrow ce;\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tlogger.error(e.toString(), e);\n\t\t\te.printStackTrace();\n\t\t\tstatus = ComposerStatus.error;\n\t\t\tthrow new ComposerException(e.toString(), e);\n\t\t}\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String expectedQueue : datasinkExpectedQueues) {\n\t\t\tsb.append(expectedQueue);\n\t\t\tsb.append(\",\");\t\t\t\n\t\t}\n\t\t// save off all expected internal jms queue names\n\t\tlogger.info(String.format(\"datasink.internal.queues: {%s}\",sb.toString()));\n\t\tproperties.setProperty(\"datasink.internal.queues\", sb.toString());\n\t\t\n\t\treturn status;\n\t}",
"private void setupNextEncoder() {\n channel.outboundPipeline().replace(this, outboundHandlers);\n }",
"public ImageProviderPipeline() {\n/* 82 */ this(null, null);\n/* */ }",
"@Override\n public void configure(Configuration conf) throws ConfigurationException\n {\n super.configure( conf );\n lazyLoading = conf.getAttributeAsBoolean( LAZY_LOADING, false);\n getLogger().debug(\"setting lazyLoading: \" + lazyLoading);\n }",
"@Override\n protected UnaryFunction<PipelineOptions, Pipeline> getCreatePipelineFromOpts() {\n return opts -> {\n opts.setRunner(runner);\n if (runner.getSimpleName().equals(\"FlinkRunner\")) {\n prepareFlinkEnvironment(opts.as(FlinkPipelineOptions.class));\n }\n return Pipeline.create(opts);\n };\n }",
"public void reConfigure();",
"@Override\n protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {\n return builder.sources(BjShareInterceptorApplication.class, Connector.class);\n }"
] | [
"0.63833964",
"0.6253544",
"0.5999952",
"0.5925481",
"0.59215313",
"0.58939344",
"0.57768345",
"0.57724315",
"0.56794465",
"0.5674608",
"0.56612974",
"0.5625391",
"0.5532799",
"0.54901123",
"0.5478373",
"0.54751897",
"0.5424742",
"0.5395256",
"0.53872824",
"0.5352655",
"0.5352655",
"0.5330359",
"0.52735823",
"0.5269101",
"0.52595437",
"0.5253972",
"0.52481604",
"0.5173338",
"0.51413566",
"0.51023805",
"0.5067603",
"0.5028743",
"0.5013212",
"0.5002334",
"0.49785706",
"0.49769983",
"0.49667776",
"0.49623564",
"0.49374855",
"0.49236596",
"0.4920319",
"0.49157017",
"0.4909375",
"0.4896219",
"0.48908797",
"0.48895708",
"0.48821795",
"0.4879624",
"0.48783717",
"0.48657757",
"0.4860443",
"0.4843329",
"0.4829962",
"0.48192567",
"0.4817457",
"0.4796198",
"0.47952697",
"0.477152",
"0.4771241",
"0.47674108",
"0.47582984",
"0.47562823",
"0.47524434",
"0.47456518",
"0.47443852",
"0.47368896",
"0.47321486",
"0.47273228",
"0.47258297",
"0.47143936",
"0.4708569",
"0.4704575",
"0.47028676",
"0.46923503",
"0.46899524",
"0.46816027",
"0.46736088",
"0.46677995",
"0.46650013",
"0.466303",
"0.46601358",
"0.46581343",
"0.46551067",
"0.4653024",
"0.4650488",
"0.46413463",
"0.46294764",
"0.46259975",
"0.46208906",
"0.46101213",
"0.4608938",
"0.4603445",
"0.4598817",
"0.45949516",
"0.45922422",
"0.45909134",
"0.45899606",
"0.4588895",
"0.45871365",
"0.45867935"
] | 0.50507 | 31 |
The messagekeeper is used to keep the last x messages, relevant to display in the webfunctions. | public MessageKeeper getMessageKeeper(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendPreviousMessagesToClient() throws IOException {\n String previousMessages = messagesManager.toString(); // Gets the contents of the queue containing the last 15 messages\n outputFromServer.println(previousMessages); // Sends a message to client\n }",
"private void viewMessage()\n {\n System.out.println( inbox );\n inbox = \"\";\n }",
"protected void clearMessages(){\n\t\twMessages.clear();\n\t}",
"public void getNewMessage() {\n boolean z;\n if (this.popupMessages.isEmpty()) {\n onFinish();\n finish();\n return;\n }\n if ((this.currentMessageNum != 0 || this.chatActivityEnterView.hasText() || this.startedMoving) && this.currentMessageObject != null) {\n int size = this.popupMessages.size();\n int i = 0;\n while (true) {\n if (i >= size) {\n break;\n }\n MessageObject messageObject = this.popupMessages.get(i);\n if (messageObject.currentAccount == this.currentMessageObject.currentAccount && messageObject.getDialogId() == this.currentMessageObject.getDialogId() && messageObject.getId() == this.currentMessageObject.getId()) {\n this.currentMessageNum = i;\n z = true;\n break;\n }\n i++;\n }\n }\n z = false;\n if (!z) {\n this.currentMessageNum = 0;\n this.currentMessageObject = this.popupMessages.get(0);\n updateInterfaceForCurrentMessage(0);\n } else if (this.startedMoving) {\n if (this.currentMessageNum == this.popupMessages.size() - 1) {\n prepareLayouts(3);\n } else if (this.currentMessageNum == 1) {\n prepareLayouts(4);\n }\n }\n this.countText.setText(String.format(\"%d/%d\", new Object[]{Integer.valueOf(this.currentMessageNum + 1), Integer.valueOf(this.popupMessages.size())}));\n }",
"void resetMessageCounter();",
"Message getCurrentMessage();",
"protected void messageList() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tmessageStore.print();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}",
"@Override\n public final void removeNextMessage() {\n }",
"public void switchToNextMessage() {\n if (this.popupMessages.size() > 1) {\n if (this.currentMessageNum < this.popupMessages.size() - 1) {\n this.currentMessageNum++;\n } else {\n this.currentMessageNum = 0;\n }\n this.currentMessageObject = this.popupMessages.get(this.currentMessageNum);\n updateInterfaceForCurrentMessage(2);\n this.countText.setText(String.format(\"%d/%d\", new Object[]{Integer.valueOf(this.currentMessageNum + 1), Integer.valueOf(this.popupMessages.size())}));\n }\n }",
"public String getNextMessage(){\r\n String msg = this.receivedMessages.get(0);\r\n this.receivedMessages.remove(0);\r\n return msg;\r\n }",
"public MessageManager() {\n this.messageList = new HashMap<>();\n }",
"@Override\n\tpublic int getMessageCounter() {\n\t\treturn counter;\n\t}",
"@Override\n public int numberOfMessages() {\n return messages.size();\n }",
"public String getNewLogMessages() {\n streamHandler.flush();\n String text = baos.toString();\n baos.reset();\n return text;\n }",
"public void travelMessages() {\n Set<MessageInterface> messages = travelingMessages.keySet();\n \n Statistics statistics = Statistics.getStatistics();\n statistics.calculateNetworkLoad(messages.size());\n Set<MessageInterface> messagesToBeRemoved = new HashSet<>();\n for (MessageInterface message : messages) {\n Integer leftDistance = travelingMessages.get(message) - 1;\n if (leftDistance <= 0) {\n messagesToBeRemoved.add(message);\n arrivedMessages.add(message);\n } else {\n travelingMessages.put(message, leftDistance);\n }\n }\n messagesToBeRemoved.forEach(message -> travelingMessages.remove(message));\n }",
"@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}",
"private void dequeueMessages()\n\t{\n\t\twhile (_msg_queue.size() > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t_ml.messageReceived( (Serializable) _msg_queue.removeFirst());\n\t\t\t}\n\t\t\tcatch (RuntimeException rte)\n\t\t\t{\n\t\t\t\trte.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void loadMessages() {\n\t\tList<Message> messages = null;\n\t\ttry {\n\t\t\tmessages = msgHelper.getMessages();\n\t\t} catch (URLException e) {\n\t\t\tLog.d(\"MESSAGE\", \"Tried loading messages without a URL configured.\");\n\t\t\tcancelTask();\n\t\t}\n\t\tif (messages == null) {\n\t\t\treturn;\n\t\t}\n\t\tLog.d(\"MESSAGE\", \"Adding messages: \" + messages.size());\n\t\tif (messages.size() > 0) {\n\t\t\taddMessages(messages);\n\t\t}\n\t\t//pruneMessages(messageList, MAX_MESSAGES);\n\t\tupdateHandler.post(updateRunner);\n\t}",
"long incrementInMsgs() {\n return inMsgs.incrementAndGet();\n }",
"private void processMessageQueue(){\n\t\tKIDSGUIAlert m = null;\n\t\tStringBuilder newText = new StringBuilder(logLines.getText());\n\t\twhile ((m = this.logMessages.poll()) != null){\n\t\t\tnewText.append(String.format(\"%s\\n\", m.toString()));\n\t\t}\n\t\tlogLines.setText(newText.toString());\n\t}",
"void resetMessages() {\n this.messageListExpected = new ArrayList<>();\n indexExpected = 0;\n }",
"private void writeMessageInDataFile(String message){\n try {\n String messageToWrite = \"\\n\" + this + message;\n messagesManager.add(messageToWrite); // adds last message to last 15 messages queue\n Files.write(Paths.get(\"messages.txt\"), messageToWrite.getBytes(), StandardOpenOption.APPEND); // writes last message in messages database\n }catch (IOException e) {\n System.err.println(\"*** ERROR ***\\nCouldn't write in data file.\");\n }\n }",
"public void listMessages() {\n\t\tSystem.out.println(\"== The wall of \" + name + \" ==\");\n\t\tfor(String msg : messages)\n\t\t{\n\t\t\tSystem.out.println(msg);\n\t\t}\n\t}",
"public int getTotalNumOfMsg(){ return allmessage.size();}",
"@Override\n\tprotected void onDeletedMessages(Context context, int total) {\n\t}",
"private void onLoadMoreMessages() {\n if (mIsRefreshable) {\n mRefreshManager.loadMoreMessages(getAccountId(), getMailboxId());\n }\n }",
"public int getNewMessageCount() throws MessagingException {\n // MONITORENTER : this\n var1_1 = this.isOpen();\n if (!var1_1) {\n // MONITOREXIT : this\n return -1;\n }\n var2_2 = 0;\n var3_3 = this.getMessageCount();\n var4_4 = 1;\n block5 : do {\n if (var4_4 > var3_3) {\n // MONITOREXIT : this\n return var2_2;\n }\n try {\n var1_1 = this.getMessage(var4_4).isSet(Flags.Flag.RECENT);\n var5_5 = var2_2;\n if (var1_1) {\n var5_5 = var2_2 + 1;\n }\nlbl18: // 4 sources:\n do {\n ++var4_4;\n var2_2 = var5_5;\n continue block5;\n break;\n } while (true);\n }\n catch (MessageRemovedException var6_6) {\n var5_5 = var2_2;\n ** continue;\n }\n } while (true);\n }",
"private MQTTopicManager() {\n for(Integer counter=1;counter!=Short.MAX_VALUE;counter++){\n messageIdList.add(counter);\n }\n }",
"private int getMessageCount() {\r\n return mMessages.length;\r\n }",
"@Override\n \t public void run() {\n \t \tGetMessageUnreadFunc();\n \t }",
"protected byte[] getNextMessage(){\n if (messages.size() > 0) {\n byte message[] = messages.get(0).clone();\n messages.remove(0);\n return message;\n } else {\n return null;\n }\n \n }",
"Message getNextMessage();",
"private void RecoverMessages()\n {\n String messages = new String();\n int nodeIndex = getNodeIndex(localport);\n int i;\n String msgToSend;\n for(i=nodeIndex+1;i<=nodeIndex+2;i++)\n {\n msgToSend = localport;\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n\n Log.i(\"current node\",Integer.toString(nodeIndex));\n for(i=nodeIndex+4;i>=nodeIndex+3;i--)\n {\n Log.i(\"replicate from\",nodes[i % 5]);\n msgToSend = nodes[i % 5];\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n Log.i(\"messages recovered\", messages);\n if(!messages.equals(\"null\") && messages.length()>0)\n {\n Log.i(\"sasa\",Integer.toString(messages.length()));\n String msgs = messages.substring(0,messages.length()-1);\n String[] Allmessages = msgs.split(\" \");\n Log.i(\"recover\",msgs);\n for(String msg: Allmessages)\n {\n String key = msg.split(\"&&\")[0];\n String value = msg.split(\"&&\")[1];\n if(myKeys.containsKey(key))\n continue;\n myKeys.put(key,value);\n }\n\n }\n }",
"@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}",
"public void onMessage(Message message) {\n lastMessage = message;\n\n }",
"private void addMessageToUI (Message message) {\n if (message == null) {\n return;\n }\n\n //find the correct position based on timestamp\n int index = chatMessages.size() - 1;\n while (index >= 0 && message.getTimestamp() < chatMessages.get(index).getTimestamp()) {\n index--;\n }\n\n //update inerted message show time/sender flags\n Message lastMsg = index >= 0 ? chatMessages.get(index) : null;\n message.showMessageTime = lastMsg == null || message.getTimestamp() - lastMsg.getTimestamp() > Message.GROUP_TIME_THRESHOLD;\n message.showMessageSender = lastMsg == null || message.showMessageTime || !message.getSenderId().equals(lastMsg.getSenderId());\n chatMessages.add(index + 1, message);\n chatRoomAdapter.notifyItemInserted(index + 1);\n\n //upate next message show time/sender flags\n Message nextMsg = index + 2 < chatMessages.size() ? chatMessages.get(index + 2) : null;\n if (nextMsg != null) {\n boolean nextMsgShowMsgTime = nextMsg.getTimestamp() - message.getTimestamp() > Message.GROUP_TIME_THRESHOLD;\n boolean nextMsgShowMsgSender = nextMsgShowMsgTime || !nextMsg.getSenderId().equals(message.getSenderId());\n if (nextMsgShowMsgTime != nextMsg.showMessageTime || nextMsgShowMsgSender != nextMsg.showMessageSender) {\n nextMsg.showMessageTime = nextMsgShowMsgTime;\n nextMsg.showMessageSender = nextMsgShowMsgSender;\n chatRoomAdapter.notifyItemChanged(index + 2);\n }\n }\n\n chatLayoutManager.scrollToPosition(chatMessages.size() - 1);\n }",
"Message getPreviousMessage();",
"public void handleMessageAction(ActionEvent event) {\n if (action.getSelectedToggle() == sendMessage){\n sendPane.setVisible(true);\n reviewPane.setVisible(false);\n }\n else{ //action.getSelectedToggle() == reviewMessage\n sendPane.setVisible(false);\n reviewPane.setVisible(true);\n\n StringBuilder builder = new StringBuilder();\n\n for ( String i : messageController.getMessageForMe(this.sender)){\n builder.append(i).append(\"\\n\");\n }\n this.inbox.setText(String.valueOf(builder));\n\n }\n }",
"public void MakeOldMessageList(){\n byte[] nb = new byte[]{1};\n ArrayList<Integer> Ids = catalogue.getmasID();\n ArrayList<byte[]> names = catalogue.getCNameMessages();\n for(int b = 0; b < Ids.size(); b++){\n OldMessagesIDs.add(0);\n }\n for(int b = 0; b < names.size(); b++){\n OldMessages.add(nb);\n }\n\n for(int b = 0; b < Ids.size(); b++){\n OldMessagesIDs.set(b,Ids.get(b));\n }\n for(int b = 0; b < names.size(); b++){\n OldMessages.set(b,names.get(b));\n }\n }",
"public void resetSystemMessageCount(){\n\t\tiMessageCount = 0;\n\t}",
"@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}",
"public int getNewMessageCount() {\n return messages.size() + droppedMessages.size();\n }",
"public void run()\n {\n \n try {\n String Msg = \"\";\n ArrayList<String> tokens=new ArrayList<String>();\n while ((Msg = this.reader.readLine())!=null)\n {\n if(!tokens.isEmpty())\n {\n //not empty,clear.\n tokens.clear();\n\n }\n //check the msg\n System.out.println(\"Inside while, Received msg in client handler:\"+Msg);\n //all the meta datas are separated using :\n tokens.addAll(Constants.tokens(Msg, \":\"));\n //if it's a login request\n if(tokens.contains(Constants.LOGIN_ID))\n {\n this.userID=tokens.get(1);//the 2nd string of this format LOGIN_ID:username:password\n this.password=tokens.get(2);\n this.client_delegate.validate(this);\n }\n //if it's a log out request.\n if(tokens.contains(Constants.LOGOUT_ID))\n {\n this.client_delegate.logout(this);\n }\n //public room message\n if(tokens.contains(Constants.PUBLIC_ROOM))\n {\n \n if(tokens.get(1).contains(\"file\"))\n {\n //there is smiley,but the parts were separated due to the presence of an internal : after word 'file'\n this.client_delegate.sendMessage(tokens.get(1)+\":\"+tokens.get(2));\n }\n else\n {\n //the message is without smiley...\n this.client_delegate.sendMessage(tokens.get(1));\n }\n \n }\n //private message\n if(tokens.contains(Constants.MESSAGE_ID))\n {\n //private message\n if(tokens.get(2).contains(\"file\"))\n {\n //there is smiley,but the parts were separated due to the presence of an internal : after word 'file'\n this.client_delegate.sendMessageFromThisTo(tokens.get(1), tokens.get(2)+\":\"+tokens.get(3), tokens.get(4));\n }\n else\n {\n //the message is without smiley...\n this.client_delegate.sendMessageFromThisTo(tokens.get(1), tokens.get(2), tokens.get(3));\n }\n }\n if(tokens.contains(Constants.FILE))\n {\n this.client_delegate.sendFileTo(tokens.get(1), Integer.parseInt(tokens.get(2)), tokens.get(3));\n }\n \n \n\n }\n } catch (Exception ex) {\n System.out.printf(\"Error parsing message from client:%s.\",this.userID);\n }\n }",
"private void initMsgs() {\n }",
"private void initMsgs() {\n }",
"private void receiveMessage() {\n ParseQuery<ParseObject> refreshQuery = ParseQuery.getQuery(\"Group\");\n\n refreshQuery.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject parseObject, ParseException e) {\n if (e == null) {\n chatMessageArray = parseObject.getList(\"groupMessageArray\");\n\n messageArrayList.clear();\n messageArrayList.addAll(chatMessageArray);\n chatListAdapter.notifyDataSetChanged();\n chatLV.invalidate();\n } else {\n System.out.println(e.getMessage());\n }\n }\n });\n }",
"public final void manageMessage(Message message)\n\t{\n\t\tif(message.getText() != null)\n\t\t{\n\t\t\ttextMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getAudio() != null)\n\t\t{\n\t\t\taudioMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getDocument() != null)\n\t\t{\n\t\t\tdocumentMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getPhoto() != null)\n\t\t{\n\t\t\tphotoMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getSticker() != null)\n\t\t{\n\t\t\tstickerMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVideo() != null)\n\t\t{\n\t\t\tvideoMessage(message);\n\t\t\treturn;\n\t\t}\n\n\t\tif(message.getVideoNote() != null)\n\t\t{\n\t\t\tvideoNoteMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVoice() != null)\n\t\t{\n\t\t\tvoiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t\tif(message.getContact() != null)\n\t\t{\n\t\t\tcontactMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getLocation() != null)\n\t\t{\n\t\t\tlocationMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVenue() != null)\n\t\t{\n\t\t\tvenueMessage(message);\n\t\t\treturn;\n\t\t}\n\n\t\tif (message.getDice() != null)\n\t\t{\n\t\t\tdiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatMember() != null)\n\t\t{\n\t\t\tnewChatMemberMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatMembers() != null)\n\t\t{\n\t\t\tnewChatMembersMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getLeftChatMember() != null)\n\t\t{\n\t\t\tleftChatMemberMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getPinned_message() != null)\n\t\t{\n\t\t\tpinnedMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatTitle() != null)\n\t\t{\n\t\t\tnewChatTitleMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatPhoto() != null)\n\t\t{\n\t\t\tnewChatPhotoMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.GetDeleteChatPhoto())\n\t\t{\n\t\t\tgroupChatPhotoDeleteMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.GetGroupChatCreated())\n\t\t{\n\t\t\tgroupChatCreatedMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getGame() != null)\n\t\t{\n\t\t\tgameMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getSuccessfulPayment() != null)\n\t\t{\n\t\t\tsuccessfulPaymentMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getInvoice() != null)\n\t\t{\n\t\t\tinvoiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t}",
"public void addMessage(String msg){messages.add(msg);}",
"@Override\n\tpublic void onMessageReceive(String clientName, String message) {\n\t\tlog.log(Level.INFO, \"Last Messenger: \" + lastMessName);\n\t\tif (lastMessUser != null && lastMessName != null) {\n\t\t\tlastMessUser.setBackground(Color.lightGray);\n\t\t\tlastMessUser.setOpaque(false);\n\t\t}\n\t\tIterator<User> iter = users.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tUser u = iter.next();\n\t\t\tif (u.getName().equals(clientName)) {\n\t\t\t\tmessUser = u;\n\t\t\t\tmessName = clientName;\n\t\t\t}\n\t\t}\n\t\tmessUser.setBackground(Color.orange);\n\t\tmessUser.setOpaque(true);\n\n\t\tlog.log(Level.INFO, \"Current Messenger: \" + messName + \", Last Messenger: \" + lastMessName);\n\t\tlastMessUser = messUser;\n\t\tlastMessName = messName;\n\n\t\tlog.log(Level.INFO, String.format(\"%s: %s\", clientName, message));\n\t\tself.addMessage(String.format(\"%s: %s\", clientName, message));\n\t}",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:47.209 -0500\", hash_original_method = \"C8B20551C681C75E8A94C862CADE3192\", hash_generated_method = \"A7433FDE5A5DBECF9F0AF160B3A18046\")\n \nprivate synchronized void postMessage(Message msg) {\n if (mHandler == null) {\n if (mQueuedMessages == null) {\n mQueuedMessages = new Vector<Message>();\n }\n mQueuedMessages.add(msg);\n } else {\n mHandler.sendMessage(msg);\n }\n }",
"private synchronized void addMessage(String user, String message) {\n\t\tchatData.addElement(new ChatMessage(user, message));\n\t\tif (chatData.size() > 20)\n\t\t\tchatData.removeElementAt(0);\n\t}",
"void removeAll(){\n\t\tmessages.clear();\n\t}",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"@Override\n\tpublic void msgAtCook() {\n\t\t\n\t}",
"public ListeMessage() {\n\t\tmessagesEntrant = new ArrayList<Message>();\n\t\tmessagesSortant = new ArrayList<Message>();\n\t\tmessages = new ArrayList<Message>();\n\t}",
"public void deleteMessages() {\n\t\tmessageDAO.modifyMessageList(currentContact.getMsgId(), new LinkedList<Mensaje>());\n\t\tcurrentContact.removeMessages();\n\t\tcontactDAO.modifyContact(currentContact);\n\t\t// Groups share the message list, only single contacts has to be updated\n\t\tif (currentContact instanceof ContactoIndividual) {\n\t\t\tUsuario user = userCatalog.getUser(currentContact.getUserId());\n\t\t\tOptional<Contacto> result = user.getContacts().stream().filter(c -> c.getUserId() == currentUser.getId())\n\t\t\t\t\t.findFirst();\n\t\t\tif (!result.isPresent())\n\t\t\t\treturn;\n\t\t\tmessageDAO.modifyMessageList(result.get().getMsgId(), new LinkedList<Mensaje>());\n\t\t\tresult.get().removeMessages();\n\t\t\tcontactDAO.modifyContact(result.get());\n\t\t}\n\t}",
"final protected Messages getMessages() {\r\n return messages;\r\n }",
"private synchronized String processMessage(Socket clientSocket, PrintWriter printWriter, String rawMessage)\n {\n Hashtable<Server.TokenType,String> parsedMessage = Server.parseRawMessage(rawMessage);\n String result = \"OK\";\n\n switch (parsedMessage.get(Server.TokenType.ACTION).toUpperCase())\n {\n case \"REGISTER\":\n String rTopic = parsedMessage.get(Server.TokenType.TOPIC);\n if(clientTopicsTable.get(clientSocket).add(rTopic))\n {\n sendToClient(printWriter, \"OK\");\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] Client \" + clientSocket + \" REGISTER \" + rTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"Client \" + clientSocket + \" REGISTER \" + rTopic);\n }\n else\n {\n sendToClient(printWriter, \"ERROR\");\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] ERROR - Client \" + clientSocket + \" REGISTER to existing topic - \" + rTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.ERROR.toString(), \"Client \" + clientSocket + \" REGISTER to existing topic - \" + rTopic);\n }\n break;\n case \"LEAVE\":\n String lTopic = parsedMessage.get(Server.TokenType.TOPIC);\n if(clientTopicsTable.get(clientSocket).remove(lTopic))\n {\n sendToClient(printWriter, \"OK\");\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] Client \" + clientSocket + \" LEAVE \" + lTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"Client \" + clientSocket + \" LEAVE \" + lTopic);\n }\n else\n {\n sendToClient(printWriter, \"ERROR\");\n\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] ERROR - Client \" + clientSocket + \" LEAVE an unregistered topic - \" + lTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.ERROR.toString(), \"Client \" + clientSocket + \" LEAVE an unregistered topic - \" + lTopic);\n }\n break;\n case \"SEND\":\n String topic = parsedMessage.get(Server.TokenType.TOPIC);\n String content = parsedMessage.get(Server.TokenType.CONTENT);\n\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] Client \" + clientSocket + \" sent \" + content + \" on topic \" + topic);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"Client \" + clientSocket + \" sent \" + content + \" on topic \" + topic);\n String ipPort = clientSocket.getInetAddress() + \":\" + clientSocket.getPort();\n //Send the message to the subscribers\n clientTopicsTable.forEach((client, topics) ->\n {\n if (topics.contains(topic)) {\n try {\n PrintWriter pw = new PrintWriter(client.getOutputStream());\n String output = \"( \" + topic + \" ) \" + ipPort + \" \" + Server.getCurrentTimeStamp() + \" - \" + content;\n\n //send to client\n sendToClient(pw, output);\n\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] FORWARD ( \" + topic + \" ) \" + ipPort + \" \" + Server.getCurrentTimeStamp() + \" - \" + content + \" to client - \" + client);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"FORWARD ( \" + topic + \" ) \" + ipPort + \" \" + Server.getCurrentTimeStamp() + \" - \" + content + \" to client - \" + client);\n } catch (IOException e) {\n System.out.println(\"Error occurred while sending message to client \" + client);\n }\n }\n });\n break;\n case \"CLOSE\":\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] CLOSE connection with \" + clientSocket);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"CLOSE connection with \" + clientSocket);\n this.stop = true;\n result = \"CLOSE\";\n break;\n }\n return result;\n }",
"@Override\n\tpublic void msgAtCooking() {\n\t\t\n\t}",
"public synchronized void broadcastMsg(String msg) {\n try (BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(\"chatHistory.txt\", true)));) {\n bufferedWriter.append(msg).append(\"\\n\");\n } catch (IOException e) {\n LOG.error(\"Try save history to file\", e);\n e.printStackTrace();\n }\n\n for (ClientHandler clientHandler : clients) {\n clientHandler.sendMsg(msg);\n }\n }",
"private void onMessage(JsonRpcMessage msg) {\n List<JsonRpcMessage> extraMessages = super.handleMessage(msg, true);\n notifyMessage(msg);\n for(JsonRpcMessage extraMsg: extraMessages) {\n notifyMessage(extraMsg);\n }\n }",
"@Override\n\tpublic long getNewPrivateMessage(String userName) throws Exception {\n\t\treturn 0;\n\t}",
"public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }",
"private void logAllMessages() {\r\n HistoricalMessage message;\r\n SessionProvider provider = SessionProvider.createSystemProvider();\r\n while (!logQueue.isEmpty()) {\r\n message = logQueue.poll();\r\n if (message != null) {\r\n this.addHistoricalMessage(message, provider);\r\n }\r\n }\r\n provider.close();\r\n }",
"private void postMessages() {\n List<models.MessageProbe> probes = new Model.Finder(String.class, models.MessageProbe.class).where().ne(\"curr_status\", 1).findList();\n for (models.MessageProbe currProbe : probes) {\n if ((currProbe.curr_status == models.MessageProbe.STATUS.WITH_ERROR) || (currProbe.curr_status == models.MessageProbe.STATUS.NEW)) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToPost());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.POSTED;\n currProbe.curr_error = null;\n postCounter++;\n }\n currProbe.update();\n }\n }\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.DELETED) {\n currProbe.delete();\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.EDITED) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToModify());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.WAIT_CONFIRM;\n currProbe.curr_error = null;\n editCounter++;\n }\n currProbe.update();\n }\n }\n }\n }\n }",
"public abstract void stickerMessage(Message m);",
"public void addMessage() {\n }",
"java.lang.String listMessageCounter() throws java.lang.Exception;",
"private void publish( String msg )\n {\n lastMessage = msg;\n System.out.println( msg );\n }",
"public static Map<Long,Message> getMessages(){\r\n\t\treturn messages;\r\n\t\t\r\n\t}",
"public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }",
"static void loadMessages(String messagesFilePath) {\r\n \t\tMessage[] messageIDs = Message.values();\r\n \t\tmessages = new String[Message.values().length];\r\n \r\n \t\tHashMap<String, CustomizableMessage> defaults = new HashMap<String, CustomizableMessage>();\r\n \r\n \t\t// initialize default messages\r\n \t\taddDefault(defaults, Message.YOU_HAVE_TO_SNEAK, \"&7You have to sneak to remove this.\", null);\r\n \t\taddDefault(defaults, Message.SIGN_REMOVED, \"&aBillboard sign was removed.\", null);\r\n \t\taddDefault(defaults, Message.ADDED_SIGN, \"&aThis sign can now be rented from &f{2} &afor &8{0} $ &afor &8{1} days&a.\", \"0: price 1: duration 2: creator\");\r\n \t\taddDefault(defaults, Message.ALREADY_BILLBOARD_SIGN, \"&7This sign is already a billboard sign.\", null);\r\n \t\taddDefault(defaults, Message.NO_TARGETED_SIGN, \"&7You have to target a sign.\", null);\r\n \t\taddDefault(defaults, Message.ONLY_AS_PLAYER, \"This only works as player.\", null);\r\n \t\taddDefault(defaults, Message.INFO_HEADER, \"&3Billboard - Information\", null);\r\n \t\taddDefault(defaults, Message.INFO_CREATOR, \"&5Creator: &2{0}\", \"0: creator\");\r\n \t\taddDefault(defaults, Message.INFO_OWNER, \"&5Owner: &2{0}\", \"0: owner\");\r\n \t\taddDefault(defaults, Message.INFO_PRICE, \"&5Price: &2{0} $\", \"0: price\");\r\n \t\taddDefault(defaults, Message.INFO_DURATION, \"&5Duration: &2{0} days\", \"0: duration\");\r\n \t\taddDefault(defaults, Message.INFO_RENT_SINCE, \"&5Rented since: &2{0}\", \"0: since date\");\r\n \t\taddDefault(defaults, Message.INFO_RENT_UNTIL, \"&5Rented until: &2{0}\", \"0: until date\");\r\n \t\taddDefault(defaults, Message.INFO_TIME_LEFT, \"&5Time remaining: &2{0}\", \"0: time left\");\r\n \t\taddDefault(defaults, Message.CLICK_TO_RENT, \"&6Click the sign again, to rent it from &8{2} &6for &b{0} $ &6for &b{1} days&6.\", \"0: price 1: duration 2: creator\");\r\n \t\taddDefault(defaults, Message.YOU_HAVE_RENT_A_SIGN, \"&aYou have rented this sign now from &8{2} &6for &b{1} days &a. \\n&bTo edit it: &aright-click it with a sign\", \"0: price 1: duration 2: creator\");\r\n \t\taddDefault(defaults, Message.TRANSACTION_FAILURE, \"&cSomething went wrong: {0}\", \"0: errorMessage\");\r\n \t\taddDefault(defaults, Message.NO_LONGER_AVAILABLE, \"&cThis sign is no longer available!\", null);\r\n \t\taddDefault(defaults, Message.NOT_ENOUGH_MONEY, \"&cYou have not enough money! \\nYou need &8{0} $&c, but you only have &8{1} $&c!\", \"0: price 1: balance\");\r\n \t\taddDefault(defaults, Message.MAX_RENT_LIMIT_REACHED, \"&cYou already own too many billboard signs &7(limit: &e{0}&7)&c!\", \"0: limit\");\r\n \t\taddDefault(defaults, Message.CANT_RENT_OWN_SIGN, \"&cYou can't rent your own sign.\", null);\r\n \t\taddDefault(defaults, Message.NO_PERMISSION, \"&cYou have no permission for that.\", null);\r\n \t\taddDefault(defaults, Message.SIGN_LINE_1, \"&bRENT ME\", \"0: price 1: duration 2: creator\");\r\n \t\taddDefault(defaults, Message.SIGN_LINE_2, \"&f(click!)\", \"0: price 1: duration 2: creator\");\r\n \t\taddDefault(defaults, Message.SIGN_LINE_3, \"&8{0} $\", \"0: price 1: duration 2: creator\");\r\n \t\taddDefault(defaults, Message.SIGN_LINE_4, \"&8{1} days\", \"0: price 1: duration 2: creator\");\r\n \t\taddDefault(defaults, Message.DATE_FORMAT, \"dd/MM/yyyy HH:mm:ss\", \"Only change this if you know what you are doing..\");\r\n \t\taddDefault(defaults, Message.TIME_REMAINING_FORMAT, \"%d days %d h %d min\", \"Only change this if you know what you are doing..\");\r\n \t\taddDefault(defaults, Message.INVALID_NUMBER, \"&cInvalid number: {0}\", \"0: the invalid argument\");\r\n \t\taddDefault(defaults, Message.RENT_SIGN_LINE_1, \"&aRent by\", \"0: price 1: duration 2: creator 3: new owner\");\r\n\t\taddDefault(defaults, Message.RENT_SIGN_LINE_2, \"&f{0}\", \"0: price 1: duration 2: creator 3: new owner\");\r\n \t\taddDefault(defaults, Message.RENT_SIGN_LINE_3, \"&cRight-click\", \"0: price 1: duration 2: creator 3: new owner\");\r\n \t\taddDefault(defaults, Message.RENT_SIGN_LINE_4, \"&cwith a sign!\", \"0: price 1: duration 2: creator 3: new owner\");\r\n \r\n \t\t// load the message file\r\n \t\tFileConfiguration config = YamlConfiguration.loadConfiguration(new File(messagesFilePath));\r\n \r\n \t\t// for each message ID\r\n \t\tfor (int i = 0; i < messageIDs.length; i++) {\r\n \t\t\t// get default for this message\r\n \t\t\tMessage messageID = messageIDs[i];\r\n \t\t\tCustomizableMessage messageData = defaults.get(messageID.name());\r\n \r\n \t\t\t// if default is missing, log an error and use some fake data for\r\n \t\t\t// now so that the plugin can run\r\n \t\t\tif (messageData == null) {\r\n \t\t\t\tBillboards.logger.severe(\"Missing message for \" + messageID.name() + \". Please contact the developer.\");\r\n \t\t\t\tmessageData = new CustomizableMessage(messageID, \"Missing message! ID: \" + messageID.name() + \". Please contact a server admin.\", null);\r\n \t\t\t}\r\n \r\n \t\t\t// read the message from the file, use default if necessary\r\n \t\t\tmessages[messageID.ordinal()] = config.getString(\"Messages.\" + messageID.name() + \".Text\", messageData.text);\r\n \t\t\tconfig.set(\"Messages.\" + messageID.name() + \".Text\", messages[messageID.ordinal()]);\r\n \t\t\t// translate colors\r\n \t\t\tmessages[messageID.ordinal()] = ChatColor.translateAlternateColorCodes('&', messages[messageID.ordinal()]);\r\n \r\n \t\t\tif (messageData.notes != null) {\r\n \t\t\t\tmessageData.notes = config.getString(\"Messages.\" + messageID.name() + \".Notes\", messageData.notes);\r\n \t\t\t\tconfig.set(\"Messages.\" + messageID.name() + \".Notes\", messageData.notes);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// save any changes\r\n \t\ttry {\r\n \t\t\tconfig.save(messagesFilePath);\r\n \t\t} catch (IOException exception) {\r\n \t\t\tBillboards.logger.severe(\"Unable to write to the configuration file at \\\"\" + messagesFilePath + \"\\\"\");\r\n \t\t}\r\n \r\n \t\tdefaults.clear();\r\n \t\tSystem.gc();\r\n \t}",
"public String getCurrentMessage() { return currentMessage; }",
"public static void saveOnlyMessagesToDB(TelegramApi api, DBStorage dbStorage, TLVector<TLDialog> dialogs,\n Map<Integer, TLAbsChat> chatsHashMap,\n Map<Integer, TLAbsUser> usersHashMap,\n Map<Integer, TLAbsMessage> messagesHashMap,\n int msgLimit, int parLimit, int filter, int maxDate, int minDate) {\n for (TLDialog dialog : dialogs) {\n\n System.out.println();\n System.out.println(\"Crawling dialog: \" + ConsoleOutputMethods.getDialogFullNameWithID(dialog.getPeer().getId(), chatsHashMap, usersHashMap));\n System.out.println(\"Top message: \" + dialog.getTopMessage());\n\n MessageHistoryExclusions exclusions = new MessageHistoryExclusions(dbStorage, dialog);\n if (exclusions.exist()){\n System.out.println(\"Top DB message: \" + exclusions.getMaxId());\n int count = dialog.getTopMessage() - exclusions.getMaxId();\n System.out.println(\"Downloading at most \" + (count > 0 ? count : 0) + \" messages\");\n }\n\n\n //reads full dialog info\n TLObject fullDialog = DialogsHistoryMethods.getFullDialog(api, dialog, chatsHashMap, usersHashMap);\n //writes full dialog info\n dbStorage.writeFullDialog(fullDialog, chatsHashMap, usersHashMap);\n\n //reads the messages\n TLAbsMessage topMessage = DialogsHistoryMethods.getTopMessage(dialog, messagesHashMap);\n TLVector<TLAbsMessage> absMessages;\n if (exclusions.exist()) {\n absMessages = DialogsHistoryMethods.getWholeMessageHistoryWithExclusions(api, dialog, chatsHashMap, usersHashMap, topMessage, exclusions, msgLimit, maxDate, minDate);\n } else {\n absMessages = DialogsHistoryMethods.getWholeMessageHistory(api, dialog, chatsHashMap, usersHashMap, topMessage, msgLimit, maxDate, minDate);\n }\n System.out.println(\"Downloaded: \" + absMessages.size());\n // writes messages of the dialog to \"messages + [dialog_id]\" table/collection/etc.\n dbStorage.writeTLAbsMessages(absMessages, dialog);\n\n //reads participants\n TLObject participants = DialogsHistoryMethods.getParticipants(api, fullDialog, chatsHashMap, usersHashMap, parLimit, filter);\n // writes participants of the dialog to \"messages + [dialog_id]\" table/collection/etc.\n dbStorage.writeParticipants(participants, dialog);\n\n // sleep between transmissions to avoid flood wait\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignored) {\n }\n }\n // write hashmaps\n System.out.println(\"Writing obtained users chats, duplicates may occure\");\n dbStorage.writeUsersHashMap(usersHashMap);\n dbStorage.writeChatsHashMap(chatsHashMap);\n System.out.println(\"Done\");\n System.out.println();\n }",
"public void receiveMessage(String msg)\r\n {\r\n mailbox.add( msg );\r\n if (myWindow != null)\r\n {\r\n while(!mailbox.isEmpty())\r\n {\r\n myWindow.showMessage( mailbox.remove() );\r\n }\r\n }\r\n }",
"private void updateNewsMessages() {\n getNewsMessages().clear();\n getNewsMessages().addAll(getNewsMap().values());\n }",
"public void updatedMsgArea() {\r\n Platform.runLater(() -> {\r\n VBox msgCell = null;\r\n List<VBox> msgCellList = new ArrayList<>();\r\n ArrayList<String> msgList, msgComponent;\r\n\r\n msgList = userHashMap.get(sendMessageTarget);\r\n\r\n if(msgList == null) {\r\n messageArea.setContent(null);\r\n messageArea.setPannable(true);\r\n } else {\r\n for(int i = 0; i < msgList.size(); i++) {\r\n if(sendMessageTarget.matches(\"chatBoxServer.Connection@1a24k3c0\")) {\r\n String[] removeHeader = msgList.get(i).split(\"(grp->MSGheaderFromCLIENT:)\");\r\n\r\n msgComponent = computeUsernameMsg(removeHeader);\r\n } else {\r\n String[] removeHeader = msgList.get(i).split(\"(pm->MSGheaderFromCLIENT:)\");\r\n msgComponent = computeUsernameMsg(removeHeader);\r\n }\r\n\r\n if(msgComponent.get(0).matches(\"You\")) {\r\n Label msgtext = new Label();\r\n msgtext.setText(msgComponent.get(1));\r\n msgtext.setMaxWidth(410);\r\n msgtext.setWrapText(true);\r\n msgtext.setPadding(new Insets(15, 15, 15, 15));\r\n msgtext.setFont(new Font(\"Arial\", 17));\r\n CornerRadii cornerRadius = new CornerRadii(10);\r\n msgtext.setBackground(new Background(new BackgroundFill(Color.rgb(224, 224, 224), cornerRadius, Insets.EMPTY)));\r\n\r\n HBox hbox = new HBox();\r\n hbox.getChildren().add(msgtext);\r\n hbox.setAlignment(Pos.BASELINE_RIGHT);\r\n hbox.setPadding(new Insets(0,0,0,50));\r\n\r\n msgCell = new VBox();\r\n msgCell.getChildren().add(hbox);\r\n msgCell.setPrefWidth(420);\r\n msgCell.setAlignment(Pos.CENTER_RIGHT);\r\n } else {\r\n Label username = new Label();\r\n username.setText(msgComponent.get(0));\r\n username.setMaxWidth(410);\r\n username.setFont(new Font(\"Verdana\", 14));\r\n username.setWrapText(true);\r\n username.setPadding(new Insets(10, 10, 0, 10));\r\n\r\n Label msgtext = new Label();\r\n msgtext.setText(msgComponent.get(1));\r\n msgtext.setMaxWidth(410);\r\n msgtext.setWrapText(true);\r\n msgtext.setPadding(new Insets(5, 10, 10, 10));\r\n msgtext.setFont(new Font(\"Arial\", 17));\r\n\r\n VBox mCell = new VBox(username, msgtext);\r\n CornerRadii cornerRaddius = new CornerRadii(10);\r\n mCell.setBackground(new Background(new BackgroundFill(Color.rgb(224, 224, 224), cornerRaddius, Insets.EMPTY)));\r\n\r\n HBox hbox = new HBox();\r\n hbox.getChildren().add(mCell);\r\n hbox.setPadding(new Insets(0,50,0,15));\r\n hbox.setAlignment(Pos.BASELINE_LEFT);\r\n\r\n msgCell = new VBox();\r\n msgCell.getChildren().add(hbox);\r\n msgCell.setPrefWidth(420);\r\n msgCell.setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n msgCellList.add(msgCell);\r\n }\r\n\r\n VBox completeMsgCell = new VBox();\r\n completeMsgCell.setSpacing(5);\r\n completeMsgCell.setPadding(new Insets(10,0,0,0));\r\n for(int i = 0; i<msgCellList.size(); i++) {\r\n completeMsgCell.getChildren().add(msgCellList.get(i));\r\n }\r\n messageArea.setContent(completeMsgCell);\r\n messageArea.setPannable(true);\r\n }\r\n });\r\n }",
"@Override\n\t \t\tpublic void handleMessage(Message msg) {\n\t \t\treceive();\n\t \t\t\t// myTextView.setText(String.valueOf(cnt));\n\t \t\t}",
"@Override\r\n\t\tpublic void run() {\n\t\t\tStaticString.information = null;// 判断回复信息之间清空之前信息\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\tSocketConnet.getInstance().communication(888,new String[]{mLogsIndexNumber});\r\n\t\t\t\tif (ReplyParser.waitReply()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"int getMessagesCount();",
"int getMessagesCount();",
"int getMessagesCount();",
"@Override\n\tpublic HorizontalPanel getMessagePanel() {\n\t\treturn messagePanel;\n\t}",
"public int getMessagesCount() {\n return messages_.size();\n }",
"@Override\n\tpublic void onClientMessage(ClientThread client, String msg) {\n\t\ttry {\n\t\t\tlockClients.readLock().lock();\n\t\t\tLocalDateTime now = LocalDateTime.now();\n\t\t\tString toSend = \"[\"+dtf.format(now)+\"] \"+client.getClientName()+\" : \"+msg;\n\t\t\tfor (ClientThread ct : this.clients) {\n\t\t\t\tct.sendMessage(toSend);\n\t\t\t}\n\t\t\taddToHistory(toSend);\n\t\t} finally {\n\t\t\tlockClients.readLock().unlock();\n\t\t}\n\t}",
"public int getMessagesCount() {\n return messages_.size();\n }",
"public void incMessagesSent() {\n this.messagesSent++;\n }",
"private synchronized void broadcast(String message){\n //add dd-MM-yyyy HH:mm:ss to the message, each starting on a new line\n String messageLf = sdf.format(new Date()) + \" \" + message + \"\\n\";\n // display message in GUI\n displayMsg(messageLf);\n //loop in reverse order in case a client disconnects & needs to be removed\n for (int i = al.size(); --i >= 0;){\n ClientThread ct = al.get(i);\n // try to write to the client, if fail, remove client from the list\n if (!ct.writeMsg(messageLf)) {\n al.remove(i);\n displayEvent(\"Disconnected Client \" + ct.username +\n \" removed from list.\");\n }\n }\n }",
"private void clearMsg() {\n msg_ = emptyProtobufList();\n }",
"private void clearMsg() {\n msg_ = emptyProtobufList();\n }",
"private void back(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex==0) return;//if at start of message\r\n --iIndex;//move back one character\r\n \r\n }",
"public Integer maxMessages();",
"public Message receiveLogger() {\n\t\t\n\t\tsynchronized(recvQueue) {\n\t\t\tif(!recvQueue.isEmpty()) {\n\t\t\t\tMessage popMsg = recvQueue.remove();\n\t\t\t\t/* add ClockService */\n\t\t\t\tTimeStampedMessage msg = (TimeStampedMessage)popMsg;\n//System.out.println(\"new Debug sentence\");\n//msg.dumpMsg();\n//\t\t\t\tthis.clockSer.updateTS(msg.getMsgTS());\n//\t\t\t\tthis.clockSer.addTS(this.localName);\n\t\t\t\t/* */\n\n\t\t\t\treturn popMsg;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"@Override\n\tpublic void msgPartsLow() {\n\t\t\n\t}",
"private Messages() {\n\t}",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tif (msg.getData().get(\"max\") == null) {\n\n\t\t\t\t\t// Store the value received in Shared prefs sp file\n\t\t\t\t\t// and print it to the the logcat debug and the textView\n\t\t\t\t\tLong current;\n current = (Long) msg.obj;\n spedit.putLong(\"lastPrime\", current);\n\t\t\t\t\tspedit.commit();\n\t\t\t\t\ttv.setText(current + \" is the latest prime found\");\n\t\t\t\t\tLog.d(TAG, \"Storing \" + current + \" as the last prime\");\n\n\t\t\t\t\t// If the the bundle does contain a String with the key \"max\"\n\t\t\t\t\t// Clear the sp with the key \"lastPrime\", and inform the\n\t\t\t\t\t// user by Writing to the logcat file and the textview.\n\t\t\t\t} else {\n\t\t\t\t\tLog.d(TAG, \"Max reached, clearing shared prefs\");\n\t\t\t\t\tString message = msg.getData().getString(\"max\");\n\t\t\t\t\tspedit.remove(\"lastPrime\");\n\t\t\t\t\tspedit.commit();\n\t\t\t\t\ttv2.setText(message);\n\t\t\t\t\tLog.d(TAG, message);\n\t\t\t\t}\n\n\t\t\t}",
"public void addUnreadMessageNumber() {\n this.mUnreadMessageNum++;\n }",
"@Test\n public void getLastMessages() {\n IUser userOne = new MockUser(\"UserOne\", \"password\");\n IUser userTwo = new User(\"UserTwo\", \"password\");\n\n IMessage messageOne = new Message(userOne,new MessageContent(\"Hello my friends!\",MessageType.TEXT));\n IMessage messageTwo = new Message(userTwo,new MessageContent(\"Hi how are you?\",MessageType.TEXT));\n\n channel.join(userOne);\n channel.join(userTwo);\n channel.sendMessage(messageOne);\n channel.sendMessage(messageTwo);\n\n assertEquals(1,channel.getLastMessages(1).size());\n\n assertEquals(null,channel.getLastMessages(-1));\n\n\n }",
"private void setMessages(ArrayListLock messages) {\n this.messages = messages;\n }",
"@Override\n \t public void run() {\n \t while (true) {\n \t try {\n \t Thread.sleep(3000);\n \t mHandler.post(new Runnable() {\n\n \t @Override\n \t public void run() {\n \t // TODO Auto-generated method stub\n \t // Write your code here to update the UI.\n \t \tGetMessageUnreadFunc();\n \t }\n \t });\n \t } catch (Exception e) {\n \t // TODO: handle exception\n \t }\n \t }\n \t }"
] | [
"0.65880984",
"0.617201",
"0.61423296",
"0.60404146",
"0.59649634",
"0.57678473",
"0.5764888",
"0.5725078",
"0.56924284",
"0.5683256",
"0.56735945",
"0.5666019",
"0.5645528",
"0.5642446",
"0.5634659",
"0.5630443",
"0.56282294",
"0.5627082",
"0.5612544",
"0.5600778",
"0.55911344",
"0.5583746",
"0.55689037",
"0.5548868",
"0.55460995",
"0.5541036",
"0.5539192",
"0.55161315",
"0.5513694",
"0.54952115",
"0.54874647",
"0.5484024",
"0.5482803",
"0.54731214",
"0.5470007",
"0.5461986",
"0.54539686",
"0.54539",
"0.5450807",
"0.5446022",
"0.54375225",
"0.54347026",
"0.5410158",
"0.5384279",
"0.5384279",
"0.53806484",
"0.5373089",
"0.537203",
"0.53690004",
"0.5368236",
"0.5360819",
"0.5349078",
"0.53454804",
"0.53439116",
"0.5343805",
"0.5335705",
"0.5332331",
"0.53302795",
"0.5330134",
"0.53243375",
"0.53237176",
"0.53139335",
"0.53095454",
"0.5301996",
"0.5290864",
"0.5282216",
"0.5272857",
"0.52724886",
"0.5270595",
"0.5269787",
"0.5268628",
"0.526634",
"0.5263443",
"0.5258547",
"0.5257213",
"0.525712",
"0.5256571",
"0.5252296",
"0.52505624",
"0.5249553",
"0.5249553",
"0.5249553",
"0.52491",
"0.52462447",
"0.52448505",
"0.5239113",
"0.5234647",
"0.5233662",
"0.5231446",
"0.5231446",
"0.51977605",
"0.5196951",
"0.5194471",
"0.51883554",
"0.51864576",
"0.5185813",
"0.5184426",
"0.5177707",
"0.5176062",
"0.5175975"
] | 0.70025235 | 0 |
state to put in PipeLineResult when a PipeRunException occurs. | public String getErrorState(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic String pipeWithException(String... args) {\r\n\t\treturn pipeCaller(args);\r\n\t}",
"@Override\n public int getPipeType() { \n return 3;\n }",
"public interface PoolPipe { \n\n /**\n * Put a runnable in the queue for execution. The semantics\n * of the queue is dependent on the current implementation. If the\n * pipe is closed this method throws an pipe closed exception.\n */\n \n public void put(Runnable run) throws InterruptedException, PipeClosedException;\n \n}",
"protected void onError(I i, Exception e)\n/* */ throws Exception\n/* */ {\n/* 95 */ log.error(\"Error occurred while processing input on pipeline [{}]\", printableName(), e);\n/* */ }",
"protected void onUnrecoverableError(I i, Throwable t)\n/* */ {\n/* 105 */ log.error(\"Unrecoverable error occurred while processing input on pipeline [{}]\", printableName(), t);\n/* */ }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}",
"public void \n close() \n throws PipeException \n {\n in = -1;\n closedByReader = true;\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public void put(Runnable run) throws InterruptedException, PipeClosedException;",
"void recordExecutionError() {\n hadExecutionError = true;\n }",
"@Test(timeout = 4000)\n public void test24() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StringBuilder stringBuilder0 = new StringBuilder(6);\n StringBuilder stringBuilder1 = SQLUtil.addRequiredCondition(\"select(\", stringBuilder0);\n StringBuilder stringBuilder2 = stringBuilder1.insert(6, (Object) pipedReader0);\n StringBuilder stringBuilder3 = stringBuilder2.insert(6, 'N');\n CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) stringBuilder3);\n try { \n pipedReader0.read(charBuffer0);\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // Pipe not connected\n //\n verifyException(\"java.io.PipedReader\", e);\n }\n }",
"public ExecutionError(Error cause) {\n/* 58 */ super(cause);\n/* */ }",
"protected void finalizeSystemErr() {}",
"public void execute()\n/* */ throws Pausable, Exception\n/* */ {\n/* 378 */ errNotWoven(this);\n/* */ }",
"@Override\n protected void processRun() {\n try {\n if (helpOnly) helpOnly();\n else {\n if (hasPipedInput()) pipeVersion();\n else stdinVersion();\n }\n } catch (IOException e) {\n return; // Killed process\n }\n }",
"public void processBlockwiseResponseTransferFailed() {\n //to be overridden by extending classes\n }",
"@Override\n protected boolean continueOnWriteError() {\n return true;\n }",
"public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }",
"protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }",
"public void compile(String pipe)\n throws ComponentError\n , ServlexException\n {\n compile(pipe, null);\n }",
"@Override\n public void onProcessError(Object item, Exception e) {\n logger.error(\"onProcessError\");\n }",
"public interface Pipeline {\r\n /**\r\n * cancel the current execution\r\n */\r\n public void cancel();\r\n\r\n /**\r\n * @return true if the rendering was canceled the output is not valid if true\r\n */\r\n public boolean isCancel();\r\n\r\n /**\r\n * The pipline uses this stage to setup buffers it needs\r\n * @param state\r\n */\r\n public void initBuffers(VrState state);\r\n\r\n /**\r\n * This stage does needed transformations on the triangles to screen space\r\n * @param state\r\n */\r\n public void setupTriangles(VrState state);\r\n\r\n /**\r\n * This stage converts triangles into buffers used in the raycast\r\n * @param state\r\n */\r\n public void rasterizeTriangles(VrState state);\r\n\r\n /**\r\n * This stage generates the final image\r\n * @param state\r\n */\r\n public void raycast(VrState state);\r\n}",
"public PipelineJobError error() {\n return this.innerProperties() == null ? null : this.innerProperties().error();\n }",
"public final boolean isNeedParseeErrorMsg() {\r\n return getCommand() == 10;\r\n }",
"WorkflowProcessingState getGenericErrorState();",
"public ChannelProgressivePromise setFailure(Throwable cause)\r\n/* 57: */ {\r\n/* 58: 89 */ super.setFailure(cause);\r\n/* 59: 90 */ return this;\r\n/* 60: */ }",
"public void pipeCheck(int x, int y, Building pipe) {\t\r\n\t\tif(pipe.getInputItem(0)!=null) {\r\n\r\n\r\n\t\t\t//make variable for item in pipe\r\n\t\t\tItem pipeItem=pipe.getInputItem(0);\r\n\r\n\t\t\t//If the pipes output is upwards\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"left\")) {\r\n\r\n\t\t\t\t//error check\r\n\t\t\t\tif(x-1>=0) {\r\n\t\t\t\t\t//Check if it can send items up and if its a pipe\r\n\t\t\t\t\tif((tileMap[x-1][y].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x-1][y].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is down\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"right\")) {\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x-1][y].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x-1][y].getBuilding()!=null) && (tileMap[x-1][y].getBuilding().getInputInventorySize()>0)) {\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x-1][y].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x-1][y].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x][y+1].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x-1][y].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\r\n\t\t\t//If the pipes output is downwards\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"right\")) {\r\n\r\n\t\t\t\tif(x+1<201){\r\n\t\t\t\t\t//Check if it can send items down and if its a pipe\r\n\t\t\t\t\tif((tileMap[x+1][y].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x+1][y].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is up\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"left\")) {\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x+1][y].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x+1][y].getBuilding()!=null) && (tileMap[x+1][y].getBuilding().getInputInventorySize()>0)) {\r\n\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x+1][y].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x+1][y].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x+1][y].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x+1][y].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\r\n\r\n\t\t\t//If the pipes output is left\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"up\")) {\r\n\r\n\r\n\t\t\t\tif (y-1>=0){\r\n\t\t\t\t\t//Check if it can send items down and if its a pipe\r\n\t\t\t\t\tif((tileMap[x][y-1].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x][y-1].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is down\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"down\")) {\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x][y-1].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x][y-1].getBuilding()!=null) && (tileMap[x][y-1].getBuilding().getInputInventorySize()>0)) {\r\n\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x][y-1].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x][y-1].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x][y-1].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x][y-1].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\r\n\t\t\t//If the pipes output is downwards\r\n\t\t\tif(((Pipe) pipe).getOutput().equals(\"down\")) {\r\n\r\n\r\n\t\t\t\tif(y+1<201){\r\n\t\t\t\t\t//Check if it can send items down and if its a pipe\r\n\t\t\t\t\tif((tileMap[x][y+1].getBuilding() instanceof Pipe)) {\r\n\r\n\t\t\t\t\t\tBuilding m=tileMap[x][y+1].getBuilding();\r\n\t\t\t\t\t\t//Only go into the other pipe if its input is down\r\n\t\t\t\t\t\tif(((Pipe) m).getInput().equals(\"up\")) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"ffound pipe\");\r\n\r\n\t\t\t\t\t\t\t//Only add item if there is space or item is already in the pipe\r\n\t\t\t\t\t\t\tif(m.getInputItem(0)==null || (m.getInputItem(0).getClass().equals(pipe.getInputItem(0).getClass()))) {\r\n\r\n\t\t\t\t\t\t\t\t//add the item to the building\r\n\t\t\t\t\t\t\t\ttileMap[x][y+1].getBuilding().addInputItem(pipe.getInputItem(0));\r\n\t\t\t\t\t\t\t\ttileMap[x][y].getBuilding().removeInputItem(0);\r\n\t\t\t\t\t\t\t} //end of if checking items\r\n\t\t\t\t\t\t} //end of if checking the pipes input\r\n\r\n\t\t\t\t\t\t//if the building isnt a pipe then try to put item into building\r\n\t\t\t\t\t}else if( (tileMap[x][y+1].getBuilding()!=null) && (tileMap[x][y+1].getBuilding().getInputInventorySize()>0)) {\r\n\r\n\t\t\t\t\t\tboolean check=false;\r\n\t\t\t\t\t\t//for loop to find a spot to put into building\r\n\t\t\t\t\t\tfor(int i=0;i<tileMap[x][y+1].getBuilding().getInputInventorySize();i++) {\r\n\r\n\t\t\t\t\t\t\t//if item wasnt added already only add if there is space or it exists in the building\r\n\t\t\t\t\t\t\tif( !(check) && ( (tileMap[x][y+1].getBuilding().getInputItem(i).getClass().equals(pipeItem.getClass())) || (tileMap[x][y+1].getBuilding().getInputItem(i)==null))) {\r\n\t\t\t\t\t\t\t\tcheck=true; //change to true so it doesnt add anymore items\r\n\t\t\t\t\t\t\t\ttileMap[x][y+1].getBuilding().addInputItem(pipeItem); //adds item to the building\r\n\t\t\t\t\t\t\t}\t//end of adding check if\r\n\t\t\t\t\t\t} //end of for loop \t\r\n\t\t\t\t\t}\t//end of building add if\r\n\t\t\t\t} //end of error check if\r\n\t\t\t} //end of pipe if\r\n\t\t}//end of null item if\r\n\t}",
"public InvalidProcessException(Throwable cause) {\n super(cause);\n }",
"@Override\n public boolean continuePastError() {\n return false;\n }",
"private ShellStatus getCmdOutput() {\n ShellStatus status = RUNNING;\n\n while (!stdOut.buffer.isEmpty()) {\n String line = stdOut.buffer.remove(0);\n LOG.trace(String.format(\"lockId=%s, shell line:=%s \", lockId, line));\n\n if (\"END_OF_SCRIPT\".equals(line)) {\n if (!hasErrors()) {\n status = SUCCESS;\n } else {\n status = PSSHELL_ERROR;\n }\n } else {\n command.addOutputLine(line);\n }\n }\n\n if (!stdErr.buffer.isEmpty()) {\n while (!stdErr.buffer.isEmpty()) {\n String errorLine = stdErr.buffer.remove(0);\n LOG.trace(\"CallerId: \" + lockId + \" error line: \" + errorLine);\n command.addErrorLine(errorLine);\n }\n status = PSSHELL_ERROR;\n }\n\n command.setReturnCode(status);\n return status;\n }",
"com.google.cloud.aiplatform.v1.Context getPipelineRunContext();",
"com.google.cloud.aiplatform.v1.ContextOrBuilder getPipelineRunContextOrBuilder();",
"@Override\n protected void run(Result result) throws Throwable {\n }",
"@Test(timeout = 4000)\n public void test067() throws Throwable {\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n JavaCharStream javaCharStream0 = new JavaCharStream(pipedInputStream0);\n try { \n javaCharStream0.ReadByte();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // Pipe not connected\n //\n verifyException(\"java.io.PipedInputStream\", e);\n }\n }",
"public synchronized boolean \n ready() \n throws PipeException \n {\n if (!connected) {\n throw new PipeException(\"Pipe not connected\");\n } else if (closedByReader) {\n throw new PipeException(\"Pipe closed\");\n } else if (writeSide != null && !writeSide.isAlive()\n\t && !closedByWriter && (in < 0)) {\n throw new PipeException(\"Write end dead\");\n }\n if (in < 0) {\n return false;\n } else {\n return true;\n }\n }",
"public String getPipelineExecutionStatus() {\n return this.pipelineExecutionStatus;\n }",
"private void resourceFailure(ReaderFailureMode mode) throws IOException {\n //Given - multiple resources\n PalisadeRecordReader<String> prr = new PalisadeRecordReader<>();\n //add more data which should succeed\n List<String> returnResources2 = Arrays.asList(\"s5\", \"s6\", \"s7\", \"s8\");\n DataRequestResponse response = new DataRequestResponse().token(\"test\")\n //set up some data which should return an error\n .resource(new StubResource(\"type_a\", \"id1\", \"format1\"),\n new StubConnectionDetail(\"con1\").setServiceToCreate(createMockDS(Collections.emptyList(), true)))\n .resource(new StubResource(\"type_b\", \"id2\", \"format2\"),\n new StubConnectionDetail(\"con2\").setServiceToCreate(createMockDS(returnResources2, false)));\n response.originalRequestId(new RequestId().id(\"test\"));\n //When\n PalisadeInputSplit split = new PalisadeInputSplit(response);\n PalisadeInputFormat.setResourceErrorBehaviour(con, mode);\n prr.initialize(split, con);\n //Then\n readValuesAndValidate(returnResources2.stream(), prr);\n verifyMocksCalled(response);\n }",
"Result(Exception e) {\n empty = false;\n this.e = e;\n status = 1;\n }",
"public synchronized void pipelineKilled(String aPipelineThreadName) {\n if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_pipeline_terminated__FINEST\",\n new Object[] { Thread.currentThread().getName(), aPipelineThreadName });\n }\n // Adjust the global counter\n activeProcessingUnits--;\n\n // Test if there are any processing pipelines left\n if (activeProcessingUnits <= 0) {\n // Change the global status of the CPM\n isRunning = false;\n // Check the work queue for any artifacts still unprocessed. This is a likely case, since the\n // Collection Reader is asynchronous. If there are artifacts still in the queue, this code\n // code needs to removed them and released them back to CAS pool. This needs to be done to\n // unblock those threads that are waiting for avaialble CAS instance. Most notably, Collection\n // Reader Thread.\n while (workQueue != null && workQueue.getCurrentSize() > 0) {\n // empty work queue\n try {\n Object anObject = workQueue.dequeue(1);\n if (anObject != null && anObject instanceof CAS[]) {\n // Notify listeners of the fact that the CPM is disposing the CAS\n notifyListeners(0, (CAS[]) anObject, procTr, new Exception(\n \"CPM Releases CAS before processing it due to premature CPM shutdown.\"));\n releaseCASes((CAS[]) anObject);\n }\n } catch (Exception e) {\n if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_exception_while_consuming_cases__SEVERE\",\n new Object[] { Thread.currentThread().getName(), e.getMessage() });\n }\n\n notifyListenersWithException(e);\n }\n }\n }\n }",
"protected void failed()\r\n {\r\n //overwrite\r\n }",
"@Override\n public void onFailure(Call call, IOException e) {\n emitter.onNext(e+\"\");\n }",
"interface Pump extends Runnable {\n /**\n * Get the exception caught during execution that terminated the pump, or\n * null if the pump terminated normally.\n * \n * @return The terminal exception.\n */\n public SpawnException getCaught();\n}",
"public synchronized final void process() throws FilterException {\n if (this.result == null)\n throw new FilterException(i18n.getString(\"outputNotSet\"));\n if (this.source == null)\n throw new FilterException(i18n.getString(\"inputNotSet\"));\n\n try {\n // Starts the input interpretation (transformation)\n this.transformer.transform(this.source, this.result);\n } catch (TransformerException e) {\n throw new FilterException(e);\n } finally {\n this.source = null;\n this.result = null;\n }\n }",
"public abstract boolean finishPipeline(int optArg);",
"@Override\n public int getExitCode() {\n if (e.getCode() == 0) {\n LOG.warn(\n \"Received an ExecutionEngineException with code 0. \"\n + \"Returning exit code -1 for this Execution.\");\n return -1;\n }\n return e.getCode();\n }",
"public interface RoutineException {}",
"public ExecutionError(String message, Error cause) {\n/* 51 */ super(message, cause);\n/* */ }",
"boolean processFailure(Throwable t);",
"private String pipeCaller(String... args) {\r\n\t\tByteArrayOutputStream stdout = new ByteArrayOutputStream();\r\n\t\tString result = \"\";\r\n\t\tString joinedStr = String.join(\" \", args);\r\n\t\tPipeCommand pipeCmd = new PipeCommand(joinedStr);\r\n\t\ttry {\r\n\t\t\tpipeCmd.parse();\r\n\t\t\tpipeCmd.evaluate(null, stdout);\r\n\t\t\tresult = stdout.toString(\"UTF-8\");\r\n\t\t} catch (AbstractApplicationException | ShellException | UnsupportedEncodingException e) {\r\n\t\t\tresult = e.getMessage();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public PreparationException() {\n\t\tsuper();\n\t}",
"@Override\n public void msrpTransferAborted() {\n }",
"public final void mPIPE() throws RecognitionException {\n try {\n int _type = PIPE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:21:6: ( '|' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:21:8: '|'\n {\n match('|'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"final static void pipe(Process p)\n {\n pipe(p.getInputStream(), System.out);\n pipe(p.getErrorStream(), System.err);\n }",
"public InvalidProcessException() {}",
"CommandExecutionException(String errorMessage) {\n super(errorMessage);\n }",
"public PreparationException(final Throwable cause) {\n\t\tsuper(cause);\n\t}",
"private static void enrichLostInputsException(\n Path primaryOutputPath,\n ActionLookupData actionLookupData,\n FileOutErr outErrBuffer,\n LostInputsActionExecutionException lostInputsException) {\n lostInputsException.setPrimaryAction(actionLookupData);\n lostInputsException.setPrimaryOutputPath(primaryOutputPath);\n lostInputsException.setFileOutErr(outErrBuffer);\n }",
"@Override\r\n\tpublic ChannelPipeline getPipeline() throws Exception\r\n\t{\n\t\tChannelPipeline pipeline = pipeline();\r\n\t\taddHandlers(pipeline);\r\n\t\treturn pipeline;\r\n\t}",
"public final void process(Void input)\n/* */ {\n/* 53 */ if (!this.processingThread.compareAndSet(null, Thread.currentThread())) {\n/* 54 */ String msg = \"Pipeline stage is already being processed by another thread\";\n/* 55 */ Thread otherThread = (Thread)this.processingThread.get();\n/* 56 */ if (otherThread != null) {\n/* 57 */ msg = msg + \" [\" + otherThread.getName() + \"]\";\n/* */ }\n/* 59 */ throw new ConcurrentModificationException(msg);\n/* */ }\n/* */ try\n/* */ {\n/* 63 */ while (!this.stop) {\n/* 64 */ I i = this.queue.take();\n/* */ try {\n/* 66 */ invokeNext(i);\n/* */ } catch (Exception e) {\n/* 68 */ onError(i, e);\n/* */ } catch (Throwable t) {\n/* 70 */ onUnrecoverableError(i, t);\n/* 71 */ throw t;\n/* */ }\n/* */ }\n/* */ } catch (InterruptedException e) {\n/* 75 */ Exceptions.rethrowAsRuntimeException(e);\n/* */ } catch (Exception e) {\n/* 77 */ Throwables.propagate(e);\n/* */ } finally {\n/* */ try {\n/* 80 */ this.stopWaitLatch.countDown();\n/* */ } finally {\n/* 82 */ this.processingThread.set(null);\n/* */ }\n/* */ }\n/* */ }",
"private static StackTraceElement[] stitch(Pipe pipe) {\n StackTraceElement remote = trace(pipe.remoteAddress());\n StackTraceElement local = trace(pipe.localAddress());\n\n if (remote == null) {\n if (local == null) {\n local = new StackTraceElement\n (\"...remote method invocation..\", \"\", \"no address\", -1);\n }\n return new StackTraceElement[] {local};\n } else if (local == null) {\n return new StackTraceElement[] {remote};\n } else {\n return new StackTraceElement[] {remote, local};\n }\n }",
"public StreamException(Throwable cause) {\n super(cause);\n }",
"public String ReadErrorLine() {\n\treturn childStderr.Readline();\n }",
"private void checkExecutionStatus() {\r\n\t\tif (detenido) {\r\n\t\t\tthrow new RejectedExecutionException(\"el procesador está detenido. no puede aceptar más tareas\");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic Node visitPipeSkel(PipeSkelContext ctx) {\n\t\treturn super.visitPipeSkel(ctx);\r\n\t}",
"protected abstract void parseExecResult(BufferedReader lines) throws IOException;",
"@Override\n public int getExitCode() {\n return 1;\n }",
"void markFailed(Execution execution, Throwable cause);",
"void redirectOutput() {\n Process process = _vm.process();\n _errThread = new StreamRedirectThread(\"error reader\", process.getErrorStream(), System.err);\n _outThread = new StreamRedirectThread(\"output reader\", process.getInputStream(), System.out);\n _errThread.start();\n _outThread.start();\n }",
"@Override\n public boolean onStepThrowable(FlowStep flowStep , Throwable throwable) {\n HadoopStepStats stats = (HadoopStepStats)flowStep.getFlowStepStats();\n String jobName = flowStep.getName();\n\n //get job node\n DAGNode<CascadingJob> node = dagNodeNameMap.get(jobName);\n if (node == null) {\n log.warn(\"Unrecognized jobId reported for succeeded job: \" + stats.getJobID());\n return false;\n }\n addCompletedJobStats(node.getJob(), stats);\n pushEvent(currentFlowId, new Event.JobFailedEvent(node));\n return false;\n }",
"@Override\r\n public FlowState call() {\r\n // TODO: We should not need? to pass the flowState because this flow is already known (reapplying same values???)\r\n FlowState flowState = getFlowState();\r\n if ( flowState == null ) {\r\n throw new FlowException(\"No flowState with id:\", getExistingFlowStateLookupKey());\r\n } else {\r\n return getFlowManagementWithCheck().continueFlowState(getExistingFlowStateLookupKey(), true, this.getInitialFlowState());\r\n }\r\n }",
"protected void handleProcessingException(Exception e) throws NbaBaseException {\n unLockItems();\n if (e instanceof NbaBaseException) {\n NbaBaseException eb = (NbaBaseException) e;\n if (eb.isFatal() || eb instanceof NbaLockedException) {\n throw eb;\n }\n }\n if (result == null) {\n setWork(getOrigWorkItem());\n addComment(e.getMessage());\n changeStatus(getHostErrorStatus());\n setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getHostErrorStatus(), getHostErrorStatus()));\n }\n try {\n doUpdateWorkItem();\n } catch (NbaBaseException e1) {\n e1.forceFatalExceptionType();\n throw e1;\n }\n }",
"public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}",
"@Override\n public OperationFailureException wrapSelf(String msg) {\n return new DatabasePreemptedException(msg, this);\n }",
"@Override\n public void run() {\n int instanceId = getContext().getInstanceId();\n if (!config.getTables().isEmpty() && !tableAssignments.containsKey(instanceId)) {\n LOG.warn(\"Instance {} was not assigned any tables when the pipeline was created and will be shut down.\",\n instanceId);\n return;\n }\n\n try {\n if (offset.get().isEmpty()) {\n deltaContext.setOK();\n }\n startFromLastCommit();\n } catch (RuntimeException e) {\n throw e;\n } catch (Exception e) {\n // if this fails at the start of the run, fail the entire run as it probably means there is something\n // wrong with the configuration or environment\n throw new RuntimeException(e.getMessage(), e);\n }\n\n AtomicReference<Throwable> error = new AtomicReference<>();\n // in most circumstances, the worker is stopped, which causes eventQueue.take() to be interrupted and break out\n // of the loop. However, it is also possible for the worker to be stopped before it gets here, in which case it\n // should just end immediately.\n while (!shouldStop.get()) {\n\n // create the retry policy for handling exceptions thrown from calls to applyEvent()\n // the worker will retry up to the configured maximum amount of time.\n // On each failed attempt, offset will be rolled back to the last commit, and any in-memory state\n // related to metrics and queued change events will be cleared away.\n RetryPolicy<Object> retryPolicy = new RetryPolicy<>()\n // max attempts defaults to 3 if it is not set. Set this to max value so that retries\n // are dictated by duration and not attempts\n .withMaxAttempts(Integer.MAX_VALUE)\n .withMaxDuration(Duration.of(maxRetrySeconds, ChronoUnit.SECONDS))\n .withDelay(retryDelaySeconds == 0 ? Duration.of(1, ChronoUnit.MILLIS) :\n Duration.of(retryDelaySeconds, ChronoUnit.SECONDS))\n // For some reason, Failsafe treats\n // .abortIf((result, throwable)\n // differently than\n // .abortIf(o -> shouldStop.get())\n // the latter Predicate gets turned into a BiPredicate that returns false whenever result is null,\n // which is always null in this code. In other words, it will never abort\n .abortIf((result, throwable) -> shouldStop.get())\n .onFailedAttempt(failureContext -> {\n Throwable failure = failureContext.getLastFailure();\n error.set(failure);\n if (failure instanceof DeltaFailureException) {\n LOG.warn(\"Encountered an error that cannot be retried. Failing the pipeline...\", failure);\n shouldStop.set(true);\n }\n\n // can be set if the failure is a DeltaFailure, or if the worker was stopped\n if (shouldStop.get()) {\n return;\n }\n\n LOG.warn(\"Encountered an error. Events will be replayed from the last successful commit.\", failure);\n // if there was an error applying the event, stop the current reader and consumer\n // and restart from the last commit. We cannot just retry applying the single event because that would force\n // targets to persist their changes before they can return from applyDML or applyDDL.\n // For example, a consumer may want to stream events to the file system as they get them, and periodically\n // load batches of 100 events into the target storage system. If there is an error writing to the file system\n // for event 50, there is no way for the consumer to rewind and write events 1-49 again.\n try {\n LOG.info(\"Stopping Event Reader...\");\n eventReader.stop();\n LOG.info(\"Stopped Event Reader.\");\n } catch (InterruptedException ex) {\n // if stopping is interrupted, it means the worker is shutting down.\n // in this scenario, we want to break out of the retry loop instead\n // of trying to reset the state and keep reading\n shouldStop.set(true);\n } catch (Exception ex) {\n // if we couldn't stop the reader, bail out.\n LOG.error(\"Unable to stop event reader. The replicator will be stopped.\", ex);\n shouldStop.set(true);\n }\n\n try {\n LOG.info(\"Stopping Event Consumer...\");\n eventConsumer.stop();\n LOG.info(\"Stopped Event Consumer.\");\n } catch (InterruptedException ex) {\n // if stopping is interrupted, it means the worker is shutting down.\n // in this scenario, we want to break out of the retry loop instead\n // of trying to reset the state and keep reading\n shouldStop.set(true);\n } catch (Exception ex) {\n // if we couldn't stop the consumer, bail out.\n LOG.error(\"Unable to stop event consumer. The replicator will be stopped.\", ex);\n shouldStop.set(true);\n }\n\n if (shouldStop.get()) {\n return;\n }\n\n // If startFromLastCommit fails here, it is likely a recoverable issue, since a successful call was\n // already performed. So in this scenario, retry for some time limit before failing.\n // this can fail, for example, if the offset store is unavailable due to a temporary outage.\n Failsafe.with(new RetryPolicy<>()\n .withBackoff(1, 120, ChronoUnit.SECONDS)\n .withMaxAttempts(Integer.MAX_VALUE)\n .withMaxDuration(Duration.of(60, ChronoUnit.MINUTES))\n .onFailedAttempt(e1 -> {\n // if it's the first failed attempt, or we have retried for longer than a minute,\n // log the fact that we are failing to start from the last commit\n if (e1.getAttemptCount() == 1 ||\n Duration.of(1, ChronoUnit.MINUTES).minus(e1.getElapsedTime()).isNegative()) {\n LOG.warn(\"Unable to reset state to the latest commit point.\", e1.getLastFailure());\n }\n }))\n .run(this::startFromLastCommit);\n })\n .onRetriesExceeded(failureContext -> {\n long secondsElapsed = failureContext.getElapsedTime().get(ChronoUnit.SECONDS);\n if (secondsElapsed < 60) {\n LOG.error(\"Failures have been ongoing for {} seconds. Failing the program.\", secondsElapsed);\n } else {\n LOG.error(\"Failures have been ongoing for {} minutes. Failing the program.\",\n failureContext.getElapsedTime().get(ChronoUnit.MINUTES));\n }\n });\n\n // take change events emitted by the source and tell the target to apply them, one by one.\n Failsafe.with(retryPolicy).run(() -> {\n Sequenced<? extends ChangeEvent> event;\n try {\n // set a 1 second limit on waiting for a new change event to allow the worker to\n // respond to a stop() call and break out of the run loop.\n event = eventQueue.poll(1, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n // happens if the worker is killed. Break out of the run loop and let it end.\n shouldStop.set(true);\n return;\n }\n\n try {\n deltaContext.throwFailureIfExists();\n } catch (Exception e) {\n throw e;\n } catch (Throwable throwable) {\n // if the failure wasn't an exception, fail right away since it should be some sort of\n // code issue and not something that can succeed on retry\n throw new DeltaFailureException(throwable.getMessage(), throwable);\n }\n\n // this is checked in case the worker was stopped in the middle of the eventQueue.poll() call\n if (shouldStop.get()) {\n return;\n }\n\n // this happens if the source hasn't emitted anything within the last second\n if (event == null) {\n return;\n }\n\n applyEvent(event);\n error.set(null);\n });\n }\n\n // if there was an error, throw it so that the program state goes to FAILED and not KILLED\n // to distinguish between pipelines that failed and pipelines that were stopped.\n if (error.get() != null) {\n throw new RuntimeException(error.get());\n }\n\n }",
"public ProcessingPipeline buildPipeline(Environment environment)\n throws Exception {\n\n \t\tthis.setupConcreteProcessor(environment);\n\n \t\treturn this.concreteProcessor.buildPipeline(environment);\n }",
"public final void mPIPE() throws RecognitionException {\n try {\n int _type = PIPE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2799:3: ( '|' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2800:3: '|'\n {\n match('|'); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"protected void afterRecipeCheckFailed() {\n cleanOrExplode();\n\n for (GT_MetaTileEntity_Hatch_OutputData data : eOutputData) {\n data.q = null;\n }\n\n mOutputItems = null;\n mOutputFluids = null;\n mEfficiency = 0;\n mEfficiencyIncrease = 0;\n mProgresstime = 0;\n mMaxProgresstime = 0;\n eAvailableData = 0;\n //getBaseMetaTileEntity().disableWorking(); //can add in override\n //hatchesStatusUpdate_EM(); //called always after recipe checks\n }",
"@Override\n \t\t\tpublic void initChannel(final Channel channel) throws Exception {\n \n \t\t\t\tfinal NettyPipe pipe = pipeManager().findPipe(\n \t\t\t\t\t\tnetPoint.getPipeline());\n \n \t\t\t\tif (pipe == null) {\n \t\t\t\t\tlog.error(\"missing pipeline\", new IllegalArgumentException(\n \t\t\t\t\t\t\tnetPoint.getPipeline()));\n \t\t\t\t} else {\n \t\t\t\t\tpipe.apply(channel, mode);\n \t\t\t\t}\n \n \t\t\t}",
"@Override\n public void resume() throws SyncProcessException {\n }",
"public void compileAborted(Exception e) { }",
"public boolean proceedOnErrors() {\n return false;\n }",
"public void testOneJob_ExceptionInProcess() {\n WARCBatchJob job = new TestWARCBatchJob() {\n public void processRecord(WARCRecord record, OutputStream os) {\n super.processRecord(record, new ByteArrayOutputStream());\n if (!((processed - 1) \n < RECORDS_PROCESSED_BEFORE_EXCEPTION)) {\n throw new ArgumentNotValid(\n \"testOneJob_ExceptionInProcess\");\n }\n }\n };\n job.processFile(WARC_FILE, new ByteArrayOutputStream());\n Exception[] es = job.getExceptionArray();\n assertEquals(\"Should have gotten through all records\",\n TOTAL_RECORDS, processed);\n final int numExceptions = TOTAL_RECORDS\n - RECORDS_PROCESSED_BEFORE_EXCEPTION;\n if (numExceptions != es.length) {\n printExceptions(es);\n }\n assertEquals(\"Exceptions list should have one entry per failing record\",\n numExceptions, es.length);\n for (int i = 0; i < numExceptions; i++) {\n assertTrue(\"Exception should be of type ArgumentNotValid\",\n es[i] instanceof ArgumentNotValid);\n }\n }",
"public CommandFailedByConfigException(Throwable ex) {\n super(ex);\n }",
"private void setTOStateFailed(TCSObjectReference<TransportOrder> ref) {\n requireNonNull(ref, \"ref\");\n\n TransportOrder failedOrder = kernel.getTCSObject(TransportOrder.class, ref);\n kernel.setTransportOrderState(ref, TransportOrder.State.FAILED);\n // A transport order has failed - check if it's part of an order\n // sequence that we need to take care of.\n if (failedOrder.getWrappingSequence() == null) {\n return;\n }\n OrderSequence sequence = kernel.getTCSObject(OrderSequence.class,\n failedOrder.getWrappingSequence());\n\n if (sequence.isFailureFatal()) {\n // Mark the sequence as complete to make sure no further orders are\n // added.\n kernel.setOrderSequenceComplete(sequence.getReference());\n // Mark all orders of the sequence that are not in a final state as\n // FAILED.\n sequence.getOrders().stream()\n .map(curRef -> kernel.getTCSObject(TransportOrder.class, curRef))\n .filter(o -> !o.getState().isFinalState())\n .forEach(o -> updateTransportOrderState(o.getReference(), TransportOrder.State.FAILED));\n // Move the finished index of the sequence to its end.\n kernel.setOrderSequenceFinishedIndex(sequence.getReference(),\n sequence.getOrders().size() - 1);\n }\n else {\n // Since failure of an order in the sequence is not fatal, increment the\n // finished index of the sequence by one to move to the next order.\n kernel.setOrderSequenceFinishedIndex(sequence.getReference(),\n sequence.getFinishedIndex() + 1);\n }\n // The sequence may have changed. Get an up-to-date copy.\n sequence = kernel.getTCSObject(OrderSequence.class, failedOrder.getWrappingSequence());\n // Mark the sequence as finished if there's nothing more to do in it.\n if (sequence.isComplete() && sequence.getNextUnfinishedOrder() == null) {\n kernel.setOrderSequenceFinished(sequence.getReference());\n // If the sequence was assigned to a vehicle, reset its back reference\n // on the sequence to make it available for orders again.\n if (sequence.getProcessingVehicle() != null) {\n kernel.setVehicleOrderSequence(sequence.getProcessingVehicle(), null);\n }\n }\n }",
"public ProgramInvocationException(Throwable cause) {\n\t\tsuper(cause);\n\t}",
"public CommandFailedByConfigException() {\n }",
"@Override\n\tpublic void processIOException(IOExceptionEvent exceptionEvent) {\n\t}",
"public NumberOfLineInputException(){\n\t\tthis.message=\"Error with the IN instruction : the input file has not enough line to complete all the IN instruction\";\n\t}",
"public void doPipeline(IPipeline pipeline) {\n if (pipeline != null && pipeline.getTaskList() != null && pipeline.getPipeItem() != null) {\n process(pipeline);\n } else {\n PipeLog.w(TAG, \"pipeline or tastList or pipeItem is null.\");\n }\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Test\n public void testRevertSuccessCommitFailed() throws Exception {\n Mockito.when(delegateCli.executeAndSwitchPrompt(Mockito.any(Command.class), Mockito.any(Predicate.class)))\n .thenReturn(CompletableFuture.completedFuture(\"\"));\n thrown.expect(WriterRegistry.Reverter.RevertSuccessException.class);\n this.unit.getPostFailedHook(this.context)\n .run(null);\n }",
"static void assignTrace(Pipe pipe, Throwable ex) {\n\n StackTraceElement[] trace = ex.getStackTrace();\n int traceLength = trace.length;\n\n // Prune the local trace for all calls that occur before (and including) the skeleton.\n String fileName = SkeletonMaker.class.getSimpleName();\n for (int i=trace.length; --i>=0; ) {\n StackTraceElement element = trace[i];\n if (fileName.equals(element.getFileName())) {\n traceLength = i;\n break;\n }\n }\n\n StackTraceElement[] stitch = stitch(pipe);\n\n StackTraceElement[] local = new Throwable().getStackTrace();\n int localStart = 0;\n\n // Prune the local trace for all calls that occur after the stub, or else just prune\n // this \"assignTrace\" method if no stub method is found.\n\n if (local.length != 0) {\n localStart = 1; // prune this method\n }\n\n fileName = StubMaker.class.getSimpleName();\n for (int i=0; i<local.length; i++) {\n StackTraceElement element = local[i];\n if (fileName.equals(element.getFileName())) {\n localStart = i;\n break;\n }\n }\n\n int localLength = local.length - localStart;\n\n var combined = new StackTraceElement[traceLength + stitch.length + localLength];\n System.arraycopy(trace, 0, combined, 0, traceLength);\n System.arraycopy(stitch, 0, combined, traceLength, stitch.length);\n System.arraycopy(local, localStart, combined, traceLength + stitch.length, localLength);\n\n ex.setStackTrace(combined);\n }",
"IOpipeExecution(boolean __cold)\n\t{\n\t\tthis.coldstart = __cold;\n\t}",
"public Throwable getReason() { return err; }",
"private void sendOldError(Exception e) {\n }",
"private static List<Pair> runErrorMapReduce(String[] passengerData) {\n\n logger.debug(\"Mapping errors\");\n Mapper errorMapper = new ErrorMapper();\n List<Pair> mappedErrors = errorMapper.execute(passengerData);\n\n logger.debug(\"Shuffling errors\");\n Shuffler errorShuffler = new Shuffler();\n List<Pair<String, List>> shuffledErrors = errorShuffler.execute(mappedErrors);\n\n logger.debug(\"Reducing errors\");\n Reducer errorReducer = new ErrorReducer();\n return errorReducer.execute(shuffledErrors);\n }",
"@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}",
"@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}",
"protected void doClose() throws Exception {\n/* */ try {\n/* 693 */ super.doClose();\n/* */ } finally {\n/* 695 */ safeClosePipe(this.pipeIn);\n/* 696 */ safeClosePipe(this.pipeOut);\n/* 697 */ clearSpliceQueue();\n/* */ } \n/* */ }",
"@Override\n boolean isFailed() {\n return false;\n }",
"protected abstract BuildFailureException newBuildFailureException(int errorCount);"
] | [
"0.5974799",
"0.5386003",
"0.53133285",
"0.525563",
"0.5226148",
"0.5198884",
"0.5154507",
"0.5153245",
"0.51258004",
"0.51189464",
"0.50926286",
"0.49992132",
"0.4931928",
"0.49316654",
"0.4922574",
"0.49185637",
"0.49184573",
"0.48938897",
"0.48932302",
"0.48620734",
"0.48145905",
"0.4789537",
"0.47538593",
"0.4753848",
"0.47067162",
"0.4706055",
"0.46771634",
"0.46700108",
"0.46632394",
"0.46615973",
"0.46497142",
"0.46446505",
"0.463194",
"0.46316627",
"0.4627677",
"0.46269083",
"0.46242985",
"0.46169817",
"0.4616915",
"0.46083114",
"0.45960122",
"0.4594659",
"0.45875356",
"0.45874393",
"0.4581031",
"0.45790437",
"0.4577705",
"0.45755965",
"0.4572732",
"0.45712712",
"0.45696855",
"0.456817",
"0.45650214",
"0.4564081",
"0.45640096",
"0.45607734",
"0.45605385",
"0.45416895",
"0.4540879",
"0.45403376",
"0.45359853",
"0.45305228",
"0.45252347",
"0.45249027",
"0.45161214",
"0.45150796",
"0.4508042",
"0.45052105",
"0.44893372",
"0.4487176",
"0.44853482",
"0.4481687",
"0.44796705",
"0.44787002",
"0.44775763",
"0.44771332",
"0.4470718",
"0.44704986",
"0.44668573",
"0.44658476",
"0.44631103",
"0.44388294",
"0.44385737",
"0.44363362",
"0.44361755",
"0.44280875",
"0.4422459",
"0.44200397",
"0.44131693",
"0.44110808",
"0.44106153",
"0.43915382",
"0.43844634",
"0.438322",
"0.43830198",
"0.43795225",
"0.43744165",
"0.43744165",
"0.4372186",
"0.4371561",
"0.43715456"
] | 0.0 | -1 |
return openConn("MySQL", "192.168.0.189", "3306", "BDIA?useUnicode=true&characterEncoding=gbk", "root", "123456"); | public static Connection getMySQLConnection() {
return openConn("MySQL", "192.168.0.189", "3306", "BDIA?useUnicode=true&characterEncoding=utf-8", "root", "123456");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connect() {\n try {\n Class.forName(\"com.mysql.jdbc.Connection\");\n //characterEncoding=latin1&\n //Class.forName(\"org.apache.derby.jdbc.EmbeddedDriver\");\n //Connection conn = new Connection();\n url += \"?characterEncoding=latin1&useConfigs=maxPerformance&useSSL=false\";\n conn = DriverManager.getConnection(url, userName, password);\n if (conn != null) {\n System.out.println(\"Established connection to \"+url+\" Database\");\n }\n }\n catch(SQLException e) {\n throw new IllegalStateException(\"Cannot connect the database \"+url, e);\n }\n catch(ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }",
"public static Connection getConexion() {\r\n Connection cn=null;\r\n try{\r\n /**\r\n * conexion a la Base de datos\r\n */\r\n \r\n cn=DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3307/stockcia\",\"root\",\"\");\r\n //cn=DriverManager.getConnection(\"jdbc:mysql://raspberry-tic41.zapto.org:3306/StockCia\", \"tic41\", \"tic41\");//conexion local \r\n }\r\n catch(Exception e){\r\n System.out.println(String.valueOf(e));}\r\n return cn;\r\n }",
"private static Connection getConnection()\n {\n Connection con = null;\n String url = \"jdbc:mysql://localhost/airlines?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\";\n String user = \"root\";\n String pw = \"npass\";\n try {\n con = DriverManager.getConnection(url, user, pw);\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return con;\n }",
"public static Connection obtener() \n {\n try\n {\n //sentencia de driver que se va a manejar\n Class.forName(\"com.mysql.jdbc.Driver\");\n \n String url = \"jdbc:mysql://127.0.0.1:3306/biblioteca?serverTimezone=\" + TimeZone.getDefault().getID();\n cnx = DriverManager.getConnection(url, \"root\", \"625387\");\n } \n catch (SQLException ex) {\n \n JOptionPane.showMessageDialog(null, \"Se presento error al conectar a la base de datos \"+ex.getMessage());\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"Se presento error al conectar a la base de datos \"+ex.getMessage());\n }\n return cnx;\n }",
"public static Connection getConnection(){\n \n Connection con = null;\n try{\n \n \n String host = \"jdbc:mysql://localhost:3306/spytter\";\n String uName = \"root\";\n con = DriverManager.getConnection(host, uName, \"\");\n \n \n }\n \n catch(SQLException err ){\n System.out.println(err.getMessage());\n }\n return con;\n \n }",
"public static Connection getConnect(){\r\n\t\tString url = \"jdbc:mysql://120.24.220.176:3306/second_mysql_test\";\r\n\t\tConnection connecter = null;\r\n\t\ttry { \r\n Class.forName(\"com.mysql.jdbc.Driver\"); // java反射,固定写法 \r\n connecter = (Connection) DriverManager.getConnection(url, \"root\", \"581825\"); \r\n } catch (ClassNotFoundException e) { \r\n e.printStackTrace(); \r\n } catch (SQLException e) { \r\n System.out.println(\"SQLException: \" + e.getMessage()); \r\n System.out.println(\"SQLState: \" + e.getSQLState()); \r\n System.out.println(\"VendorError: \" + e.getErrorCode()); \r\n } \r\n return connecter; \r\n\t\t\r\n\t}",
"public void conectar() {\n try {\n //Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n Class.forName(\"org.mariadb.jdbc.Driver\"); \n\n //con = DriverManager.getConnection(\"jdbc:mariadb://192.168.194.131:3306/arquitectura\", \"root\", \"duocadmin\"); \n con = DriverManager.getConnection(\"jdbc:mariadb://192.168.194.131:3306/arquitectura\", \"root\", \"duocadmin\");\n state = con.createStatement();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public static Connection connectarMySQL(){\n Connection conn = null;\n\n try {\n Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n } catch (Exception e) {\n System.out.println(\"Error paquete\");\n System.out.println(e.getMessage());\n }\n try{\n conn = DriverManager.getConnection(getConnectionDB(), user, password);\n\n } catch(SQLException e){\n System.out.println(\"SQLException\"+ e.getMessage());\n System.out.println(\"SQLState\"+ e.getSQLState());\n System.out.println(\"VendorError\"+ e.getErrorCode());\n }\n return conn;\n }",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"private static Connection getConnection() throws SQLException, IOException {\n Properties properties = new Properties();\n properties.setProperty(\"user\", \"root\");\n properties.setProperty(\"password\", \"bulgariavarna\");\n\n return DriverManager.getConnection(CONNECTION_STRING + \"minions_db\", properties);\n }",
"public Connection conectar(){//Con com.mysql.dbc\r\n try { \r\n Class.forName(\"com.mysql.jdbc.Driver\"); //Seleccionamos los packetes de la libreria que se cargo\r\n conect= DriverManager.getConnection(\"jdbc:mysql://localhost/viaje\",\"root\",\"\"); //Si en la vida real va la ip de servidor\r\n //JOptionPane.showMessageDialog(null, \"Se conectó correctamente\");\r\n } catch (Exception ex) {// Recoge todas las exepcipnes\r\n JOptionPane.showMessageDialog(null, \"Sin conexión\");\r\n }\r\n return conect;\r\n }",
"public Connection connect(){\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n System.out.println(\"Berhasil koneksi ke JDBC Driver MySQL\");\n }catch(ClassNotFoundException ex){\n System.out.println(\"Tidak Berhasil Koneksi ke JDBC Driver MySQL\");\n }\n //koneksi ke data base\n try{\n String url=\"jdbc:mysql://localhost:3306/enginemounting\";\n koneksi=DriverManager.getConnection(url,\"root\",\"\");\n System.out.println(\"Berhasil koneksi ke Database\");\n }catch(SQLException e){\n System.out.println(\"Tidak Berhasil Koneksi ke Database\");\n }\n return koneksi;\n}",
"private Connection connect(){\n Connection connection = null;\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n }\n catch (Exception e){\n System.out.print(e);\n }\n return connection;\n }",
"private Connection connect()\n\t{\n\t\tConnection con = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t//Provide the correct details: DBServer/DBName, username, password\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3306/project? useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", \"root\", \"\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n \n\t\treturn con;\n \n\t}",
"public static Connection getConnection() throws Exception{\r\n\t\t\tConnection dbConn = null;\r\n\t try{\r\n\t\tString url = \"jdbc:mysql://localhost:3307/durgadb\";\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tdbConn = DriverManager.getConnection(url, \"root\", \"root\");\r\n\t\t}\r\n\t catch (SQLException sqle) {\r\n\t\t sqle.printStackTrace();\r\n\t\t throw sqle;\r\n\t\t}\r\n catch(Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t throw e;\r\n\t\t}\r\n\treturn dbConn;\r\n\t}",
"public static Connection getConnection() {\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstm = null;\n\n\t\tString url = \"jdbc:mariadb://localhost:3306/test\";\n\t\tString id = \"root\";\n\t\tString pw = \"maria\";\n\t\ttry {\n\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\n\t\t\ttry {\n\t\t\t\tcon = DriverManager.getConnection(url, id, pw);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn con;\n\t}",
"public Connection conexion(){\n try {\r\n Class.forName(\"org.gjt.mm.mysql.Driver\");\r\n conectar=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/poo\",\"root\",\"19931017\");\r\n \r\n } catch (ClassNotFoundException | SQLException e) {\r\n System.out.println(\"Error ┐\"+e);\r\n }\r\n return conectar; \r\n }",
"private static void dbConnect() {\r\n\t\tif (conn == null)\r\n\t\t\ttry {\r\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost/sims?user=root&password=12345&useSSL=true\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}",
"public void openConn()\r\n {\r\n try\r\n {\r\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/voteandordersystem\",\"root\",\"hello\");\r\n \r\n \r\n }\r\n catch (ClassNotFoundException | SQLException e)\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + e + \")\");\r\n }\r\n }",
"public void openConnection(){\r\n try {\r\n Driver dr = new FabricMySQLDriver();\r\n DriverManager.registerDriver(dr);\r\n log.info(\"registrable driver\");\r\n } catch (SQLException e) {\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n try {\r\n connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n log.info(\"get connection\");\r\n } catch (SQLException e) {\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"private Connection getConnction() {\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tString url = \"jdbc:mysql://192.168.201.120:3306/erp_purchase?zeroDateTimeBeHavior=convertToNull\";\r\n\t\t\tString user = \"xuduo\";\r\n\t\t\tString passwor = \"000000\";\r\n\t\t\tconnection = DriverManager.getConnection(url, user, passwor);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(JdbcExample.class.getName()).log(Level.SEVERE, null, e);\r\n\t\t}\r\n\t\t\r\n\t\treturn connection;\r\n\t}",
"public Connection getConnection(){\n Connection conn = null;\n System.out.println(\"connection called\");\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn=(Connection)DriverManager.getConnection(\"jdbc:mysql://localhost/online_bidding_system\",\"root\",\"\");\n } catch(ClassNotFoundException | SQLException e){\n e.printStackTrace();\n }\n \n return conn;\n }",
"public static Connection connect(){\n\t\tConnection connection=null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\t\tconnection=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/weather\",\"root\",\"Dhanya@123\");\r\n\t\t System.out.println(\"Connected\");\r\n\t}catch (ClassNotFoundException classNotFoundException) {\r\n\t\tclassNotfoundException.printStackTrace();\t\r\n\t}catch (SQLException sqlException) {\r\n\t\tsqlException.printStackTrace();\r\n\t}\r\n\t\treturn connection;\r\n\t\t\r\n\t}",
"public static Connection con(){\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n con=(Connection)DriverManager.getConnection(\"jdbc:mysql://localhost:3306/nsbm?\",\"root\",\"\");\n // our SQL SELECT query. \n // if you only need a few columns, specify them by name instead of using \"*\"\n \n }catch(ClassNotFoundException | SQLException e){\n }\n return con;\n }",
"public Connection connect()\r\n\t\t {\r\n\t\t Connection con = null;\r\n\t\t try\r\n\t\t {\r\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\r\n\t\t //Provide the correct details: DBServer/DBName, username, password\r\n\t\t con = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3308/paf\", \"root\", \"\");\r\n\t\t \r\n\t\t//For testing\r\n\t\t System.out.print(\"Successfully connected\"); \r\n\t\t \r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t {e.printStackTrace();}\r\n\t\t return con;\r\n\t\t }",
"public final DBI getConnect() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n // String dbc = System.getenv(\"DB_CONNECTION\");\n // if (dbc == null || dbc.equals(\"\")) {\n // dbc = \"localhost:3306\";\n // }\n // DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n DBI dbi = new DBI(\"jdbc:mysql://localhost:3306/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n\n //DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?useSSL=false\", \"MLPXX\", \"MLPXX\");\n // dbi.setSQLLog(new PrintStreamLog());\n return dbi;\n } catch (ClassNotFoundException e) {\n //return null;\n throw new RuntimeException(e);\n }\n }",
"public static Connection getInstance (){\n\tString url =\"jdbc:informix-sqli://192.168.10.18:4526/teun0020:informixserver=aix2;DB_LOCALE=zh_tw.utf8;CLIENT_LOCALE=zh_tw.utf8;GL_USEGLU=1\";\r\n\tString username = \"srismapp\";\r\n\tString password =\"ris31123\";\r\n\tString driver = \"com.informix.jdbc.IfxDriver\";\t\r\n\tConnection conn=null;\r\n\ttry {\r\n\t Class.forName(driver);\r\n\t conn = DriverManager.getConnection(url, username, password);\r\n\t} catch (SQLException e) {\r\n\t e.printStackTrace();\r\n\t} catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn conn;\r\n }",
"private void createDBConnection() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con = DriverManager.getConnection(\n \"jdbc:mysql://10.27.8.144:3306/databasename5\", \"user5\", \"p4ssw0rd\");\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(\"select * from emp\");\n while (rs.next())\n System.out.println(rs.getInt(1) + \" \" + rs.getString(2) + \" \" + rs.getString(3));\n con.close();\n } catch (Exception e) {\n System.out.println(e);\n }\n }",
"public Connection connectdb(){\n Connection con = null;\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n con = DriverManager.getConnection(url, user, pass);\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(ILocker.class.getName()).log(Level.SEVERE, null, ex);\n }\n return con;\n }",
"private void openConnection() {\n try {\n dbConnection\n = DriverManager.getConnection(url, user, password);\n } catch (SQLException ex) {\n System.err.println(\"Exception in connecting to mysql database\");\n System.err.println(ex.getMessage());\n }\n }",
"public Connection getConnection()\r\n {\r\n this.cn = null;\r\n \r\n try\r\n {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n this.cn = DriverManager.getConnection(\"jdbc:mysql://localhost/surtiplas\", \"root\", \"12345\");\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return cn; \r\n }",
"public Connection makeConnection() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n // setup the connection with the DB.\n return DriverManager\n .getConnection(\"\"\n + \"jdbc:mysql://\"\n //+ \"itmd544.cbpipzbeulcc.us-west-2.rds.amazonaws.com/itmd544?\"\n //+\"localhost/itmd544\"\n +\"64.131.111.24/itmd544?\"\n + \"user=root&password=root\"\n //+\"root\"\n );\n \n \n } catch (Exception e) {\n //e.printStackTrace();\n System.out.println(\"Could not make connection\");\n System.exit(1);\n }\n \n return null;\n }",
"public static Connection connect() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\t\t\t\t\t\t\n\t\t\treturn DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:mysql://83.212.125.138:3306/st_database\", \"admin\", \"admin\");\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public void connectToDB(){\n\ttry {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tconnection=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/patient\",\"root\",\"7417899737\");\n\t} catch (ClassNotFoundException e) {\n\t\t\n\t\te.printStackTrace();\n\t} catch (SQLException e) {\n\t\t\n\t\te.printStackTrace();\n\t}\n\t\n}",
"private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }",
"void getConnectiondb() throws SQLException, ClassNotFoundException{\n // TODO code application logic here\n \n String user = \"root\";\n String pass = \"test\";\n\n myConn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/aud_jdbms\", user, pass);\n \n\n \n }",
"private static Connection connectToDB() {\n\t\t\tConnection con = null;\n\t\t\ttry {\n\t\t\t\t// Carichiamo un driver di tipo 1 (bridge jdbc-odbc).\n\t\t\t\t//String driver = \"sun.jdbc.odbc.JdbcOdbcDriver\";\n\t\t\t\tClass.forName(DRIVER);\n\t\t\t\t// Creiamo la stringa di connessione.\n\t\t\t\t// Otteniamo una connessione con username e password.\n\t\t\t\tcon = DriverManager.getConnection (URL, USER, PSW);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn con;\n\t\t}",
"private Connection connect() {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t// Provide the correct details: DBServer/DBName, username, password\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3306/paymentdb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", \"root\", \"\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn con;\n\t}",
"public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}",
"public static Connection getConnection() throws ClassNotFoundException, SQLException {\r\n\t\tString username=\"root\";\r\n\t\tString password=\"123\";\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tConnection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3308/bkdb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", username, password);\r\n\t\treturn connection;\r\n\t}",
"private void open_db() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\"); \n Con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/projectlaundry\",\"root\",\"\");\n stm = Con.createStatement();\n }\n catch (Exception e){\n JOptionPane.showMessageDialog(null,\"Koneksi gagal\");\n System.out.println(e.getMessage());\n }\n }",
"private Connection database() {\n Connection con = null;\n String db_url = \"jdbc:mysql://localhost:3306/hospitalms\";\n String db_driver = \"com.mysql.jdbc.Driver\";\n String db_username = \"root\";\n String db_password = \"\";\n \n try {\n Class.forName(db_driver);\n con = DriverManager.getConnection(db_url,db_username,db_password);\n } \n catch (SQLException | ClassNotFoundException ex) { JOptionPane.showMessageDialog(null,ex); }\n return con;\n }",
"private static Connection connect() throws SQLException {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\t \r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"1234\");\r\n\t\t\treturn con;\r\n\t\t\r\n\t\t\t \r\n\t\t }\r\n\t catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\nreturn con;\r\n}",
"public static Connection fetchDBConnection() throws ClassNotFoundException,SQLException\n\t{\n\t//load type IV MySql supplies JDBC driver class, under method area(meta space)\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t//get the fix connection to DB\n\t\tString url=\"jdbc:mysql://localhost:3306/acts?useSSl=false\";\n\t\treturn DriverManager.getConnection(url, \"root\", \"manoj1997\");\n\t}",
"public Connection xcon(){\n Connection cn =null;\n try{\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n cn = DriverManager.getConnection(\"jdbc:sqlserver://10.60.41.30:1433;databaseName=Northwind;\",\"idat\",\"123456\");\n if(cn!=null){\n JOptionPane.showMessageDialog(null, \"Estás conectado\");\n }\n }catch(Exception error){\n JOptionPane.showMessageDialog(null, error);\n }\n \n return cn;\n }",
"private void conntest() {\n\t\tDatabaseDao ddao = null;\r\n\t\tString url;\r\n\r\n\t\tif (dbType.getValue().toString().toUpperCase()\r\n\t\t\t\t.equals((\"oracle\").toUpperCase())) {\r\n\t\t\turl = \"jdbc:oracle:thin:@\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tSystem.out.println(\"?\");\r\n\t\t\tddao = new OracleDaoImpl();\r\n\t\t} else {\r\n\t\t\turl = \"jdbc:mysql://\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tddao = new MysqlDaoImpl();\r\n\t\t}\r\n\t\tSystem.out.println(url);\r\n\t\tString result = ddao.connection(url, logTxtId.getText(),\r\n\t\t\t\tlogTxtPw.getText());\r\n\t\tString resultSet;\r\n\t\tif (result.indexOf(\"오류\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"오류\"));\r\n\t\telse if (result.indexOf(\"ORA\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"ORA\"));\r\n\t\telse {\r\n\t\t\tresultSet = \"접속 테스트 성공\";\r\n\t\t}\r\n\t\tlogLblLogin.setText(resultSet);\r\n\t}",
"private static void connect() {\n\t\ttry {\n\t\t\tif (connection == null) {\n\t\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\n\t\t\t\tconnection = DriverManager.getConnection(url, user, password);\n\t\t\t\tconnection.setAutoCommit(false);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}",
"public static Connection getConnection() {\r\n Connection con = null;\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //step-1: get a connection to the db\r\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/user\", \"root\", \"\");\r\n }catch(Exception e) {\r\n System.out.println(\"error\" + e);\r\n }\r\n return con;\r\n\r\n }",
"public static Connection getConnection() {\n Connection conn = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n //conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/bancodb\", \"sa\", \"\");\n conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/paciente2db\", \"sa\", \"\");\n } catch (SQLException e) {\n System.out.println(\"Problemas ao conectar no banco de dados\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"O driver não foi configurado corretamente\");\n }\n\n return conn;\n }",
"private void getRemoteConnection() {\n String databaseURL = \"jdbc:mysql://insulin-pump-db.ccywbop2kswa.ap-southeast-2.rds.amazonaws.com:3306/insulinpumpdb\";\n String user = \"master\";\n String password = \"Master1234\";\n try {\n conn = DriverManager.getConnection(databaseURL, user, password);\n if (conn != null) {\n java.lang.System.out.println(\"Connected to the database\");\n }\n } catch (SQLException ex) {\n java.lang.System.out.println(\"An error occurred. Maybe user/password is invalid\");\n ex.printStackTrace();\n }\n }",
"public abstract Connection getConnection(String user, String password) throws SQLException;",
"public void openDB() {\n\n\t\t// Connect to the database\n\t\tString url = \"jdbc:mysql://localhost:2000/X__367_2020?user=X__367&password=X__367\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"using url:\"+url);\n\t\t\tSystem.out.println(\"problem connecting to MariaDB: \"+ e.getMessage());\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t}",
"public static Connection getConnection() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n\n String url = \"jdbc:mysql://localhost:3306/test_log?useTimezone=true&serverTimezone=UTC\";\n String username = \"root\";\n String password = \"toor\";\n\n return DriverManager.getConnection(url, username, password);\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException();\n }\n }",
"public Connection connectToDb() throws Exception\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tString url= \"jdbc:mysql://83.212.122.254:3306/travlos\";\r\n\t\t\tString username=\"travlos\";\r\n\t\t\tString password=\"travlos\";\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"found\");\r\n\t\t\t\r\n\t\t\t\r\n\t\tConnection con=null;\t\r\n\t\t\tcon=DriverManager.getConnection(url, username, password);\r\n\t\t\tStatement statement= con.createStatement();\r\n\t\t\t\r\n\t System.out.println(\"egine syndesh!\");\r\n\t return con;\r\n\t\t\r\n\t\t}\r\n\t\tcatch (SQLException ee)\r\n\t\t{\r\n\t\t\tthrow new RuntimeException(\"cannot connect the database!\", ee);\r\n\t\t}\r\n\t\r\n\t\r\n\t}",
"public void initConnection(){\n \t String HOST = \"jdbc:mysql://10.20.63.22:3306/cloud\";\n String USERNAME = \"root\";\n String PASSWORD = \"test\";\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n }\n \n try {\n conn = DriverManager.getConnection(HOST, USERNAME, PASSWORD);\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public void connect(){\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (ClassNotFoundException ex) {\n System.out.println(\"ClassNotFoundException in connect()\");\n }\n try {\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/pmt\", \"root\", \"\");\n } catch (SQLException ex) {\n System.out.println(\"SQLException in connect()\");\n }\n \n }",
"public Connection getConnection(PrintWriter out) throws SQLException, ClassNotFoundException {\n Connection toReturn = null;\n Class.forName(\"org.mariadb.jdbc.Driver\");\n try {\n toReturn = (connection != null)\n ? connection\n : DriverManager.getConnection(\n \"jdbc:mariadb://172.17.0.1:3308/AMV\",\n \"root\",\n \"12345\");\n } catch (SQLException e) {\n e.printStackTrace();\n out.println(\"SQL Exception \" + e);\n }\n return toReturn;\n }",
"public Connection getConnection() throws SQLException, ClassNotFoundException{\n\t\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t System.out.println(\"MySQL JDBC Driver Registered\");\n\t\t\t return connection = DriverManager.getConnection(\"jdbc:mysql://www.papademas.net:3306/510labs?\", \"db510\",\"510\");\n\t}",
"public static Connection CrearConexion(){\n String clave=\"inacap\";\r\n String usuario=\"inacap\";\r\n String url=\"jdbc:derby://localhost:1527/aereopuerto\";\r\n \r\n //crear conexion a la Base de datos\r\n \r\n try{\r\n Connection conn=DriverManager.getConnection(url,usuario,clave);\r\n return conn;\r\n }\r\n catch(SQLException e){\r\n System.out.println(\"Excepcion de sql:\"+e);\r\n return null;\r\n }\r\n \r\n \r\n }",
"private void alternateconnection() {\n\t\t\t final String url = \"jdbc:mysql://localhost:3306/\";\n\t\t\t final String username = \"root\";\n\t\t final String password = \"bordoloa\";\n\t\t System.out.println(\"Connecting with classified at local host\");\n\t\t\ttry {\n\t\t\t\tconnection=DriverManager.getConnection(url, username, password);\n\t\t\t\t\n\t\t\t\tString msg=\"Hosting the client in local database port 3306 server \"\n\t\t\t\t\t\t+url;\n\t\t\t\tSystem.out.println(msg);\n\t\t\t\tDbLog.logger().logging(msg);\n\t\t\t\treturn;\n\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t DbLog.logger().logging(e.getMessage()+\"Error is Mysql local database connection\");\n\t\t\t System.out.println(\"Unable to establish connection with localhost port 3306. Please check log files for more details at:\"\n\t\t\t \t\t\t+ \" C:\\\\Users\\\\Public\\\\IntraClassifieldsLogs\\\\Database_login.txt\");\n\t\t\t System.exit(0); /// exiting the program\n\t\t\t }\n\t\t}",
"public static void createConnection() {\n\n try{\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/mydb\", \"tobymac208\", \"Sparta_!3712\");\n // Database how now been successfully connected.\n System.err.println(\"Database was successfully connected.\");\n }catch (ClassNotFoundException e) {\n System.err.println(\"Class not found.\");\n }catch (SQLException e) {\n System.err.println(\"SQL exception thrown.\");\n }\n }",
"private Connection conexion(String database, String user, String pass) {\n Connection con = null;\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n String cadenaConexion = \"jdbc:mysql://localhost/\" + database + \"?user=\" + user + \"&password=\" + pass + \"&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\";\n con = DriverManager.getConnection(cadenaConexion);\n return con;\n\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n System.err.println(\"Clase no encontrada\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return con;\n }",
"public static void openConnection() {\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t\tconexion = DriverManager.getConnection(\"jdbc:mysql://192.168.1.51:9090?useTimeone=true&serverTimezone=UTC\",\n\t\t\t\t\t\"remote\", \"Password123\");// credenciales temporales\n\t\t\tSystem.out.print(\"Server Connected\");\n\n\t\t} catch (SQLException | ClassNotFoundException ex) {\n\t\t\tSystem.out.print(\"No se ha podido conectar con mi base de datos\");\n\t\t\tSystem.out.println(ex.getMessage());\n\n\t\t}\n\n\t}",
"private Connection createConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + db, user, password);\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public Connection OpenConnection() {\n try {\n //obtenemos el driver para SQLSERVER\n Class.forName(driver);\n //obtenemos la conexion\n con = DriverManager.getConnection(url, user, pass);\n if (con != null) {\n System.out.println(\"OK base de datos \" + bd + \" listo\");\n }\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n }\n return con;\n }",
"public void createConnection()\n\t{\n\t\ttry\n {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n // Get a connection\n conn = DriverManager.getConnection(dbURL, \"root\", \"root\"); \n System.out.println(\"Connected...\");\n }\n catch (Exception except)\n {\n except.printStackTrace();\n }\n\t}",
"public static void connect() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n DataBaseConnect.connect = DriverManager\n .getConnection(\"jdbc:mysql://localhost/magazyn?\"\n + \"user=root&password=\");\n } catch (SQLException e1) {\n e1.printStackTrace();\n } catch (ClassNotFoundException e1) {\n e1.printStackTrace();\n }\n }",
"public Connection getConnecion()\r\n\t\t{\r\n\t\r\n\t\t \r\n\t\t\r\n\t try {\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\" );\r\n\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/curd_db\", \"root\", \"1254\" );\r\n\t\tif(con!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"connection estabilshed successfully\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Connection could not connect\");\r\n\t\t}\r\n\t }\r\n\t catch (ClassNotFoundException e) \r\n\t {\r\n\r\n\t\te.printStackTrace();\r\n\t}\r\n\t catch(SQLException e)\r\n\t {\r\n\t\te.printStackTrace(); \r\n\t }\r\n\treturn con;\r\n\t\t\r\n\t\t}",
"public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }",
"public String getConnection();",
"public Connection getConnection(String username, String password) {\n\n Scanner scan = new Scanner(System.in);\n\n //System.out.print(\"Username: \");\n //this.username = scan.nextLine();\n //System.out.print(\"Password: \");\n //this.password = scan.nextLine();\n\n // Registering the JDBC Driver\n try { Class.forName(driver); }\n catch (ClassNotFoundException e) { e.printStackTrace(); }\n\n // Opening a connection to the database:\n Connection connection = null;\n try { connection = DriverManager.getConnection (jdbc_url, username, password); }\n catch (SQLException e) { e.printStackTrace(); }\n\n return connection;\n }",
"public Connection connectionclass(String user, String password, String database, String server) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n Connection connection = null;\n String ConnectionURL = null;\n\n try {\n Class.forName(\"org.mariadb.jdbc.Driver\");\n ConnectionURL = \"jdbc:mariadb://\" + server + \"/\" + database;\n connection = DriverManager.getConnection(ConnectionURL, user, password);\n } catch (SQLException se) {\n Log.e(\"error here 1 : \", se.getMessage());\n } catch (ClassNotFoundException e) {\n Log.e(\"error here 2 : \", e.getMessage());\n } catch (Exception e) {\n Log.e(\"error here 3 : \", e.getMessage());\n }\n return connection;\n }",
"private static Connection connectieMaken() {\n //declaratie anders kunnen we niks returnen\n Connection connection = null;\n try {\n connection = DriverManager.getConnection(DB_URL, USER, PASS);\n } catch (SQLException ex) {\n Logger.getLogger(JDBC.class.getName()).log(Level.SEVERE, null, ex);\n }\n return connection;\n }",
"public void makeConnection(){\n\t\t\n\t\t\n\t\t\n\t\ttry{\n\t\t\tmySqlConn=new MySqlConnection(server,databaseName,userName,passWord);\n\t\t\tst=mySqlConn.conn.createStatement();\n\t\t }\n\t\tcatch(SQLException s){\n\t\t\tSystem.out.println(\"SQL not able to execute\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void connect() {\n\n\t\ttry {\n\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException ex) {\n\t\t\tSystem.err.println(\"Unable to load MySQL Driver\");\n\t\t\t\n\t\t}\n\n\t\tString jdbcUrl = \"jdbc:mysql://localhost:3306/userinfo?useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false\";\n\t\ttry {\n\t\t\t// DriverManager.registerDriver(new com.mysql.jdbc.Driver());\n\t\t\tConnection con = DriverManager.getConnection(jdbcUrl, \"root\", \"smmk143143\");\n\t\t\tconn = con;\n\t\t\t// Set auto commit as false.\n\t\t\tconn.setAutoCommit(false);\n\t\t\tSystem.out.println(\"接続済み/Connected\");\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Error Occured\");\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\t}",
"private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}",
"public void iniciar(String user, String pass, String db_name) {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n Conexion = DriverManager.getConnection(\"jdbc:mysql://\" + serverMySQL + \":3306/\" + db_name, user, pass);\n conectado = true;\n printLog(\"Conexion establecida con el sevidor de MySQL en \" + serverMySQL);\n //JOptionPane.showMessageDialog(null, \"Bien\");\n } catch (ClassNotFoundException ex) {\n Logy.me(ex.getMessage());\n } catch (SQLException ex) {\n Logy.me(ex.getMessage());\n }\n }",
"Connection createConnection();",
"@SuppressLint(\"NewApi\")\n public Connection CONN()\n {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n Connection conn=null;\n String ConnURL=null;\n try{\n Class.forName(clazz);\n conn= DriverManager.getConnection(url,dbusername,dbpassword);\n //conn=DriverManager.getConnection(ConnURL);\n }\n catch (SQLException se) {\n Log.e(\"ERRO\", se.getMessage());\n } catch (ClassNotFoundException e) {\n Log.e(\"ERRO\", e.getMessage());\n } catch (Exception e) {\n Log.e(\"ERRO\", e.getMessage());\n }\n return conn;\n }",
"public static Connection getConnection(String db) {\n try {\n String dbURL = \"jdbc:mysql://\" + HOST + \":3306/\" + db ;\n Class.forName(DRIVER);\n Connection connection = DriverManager.getConnection(dbURL, USERNAME, PASSWORD);\n return connection;\n } catch (Exception e) {\n System.out.println(\"Error in Database.getConnection: \" + e.getMessage());\n return null;\n }\n }",
"private static void getConnection() throws ClassNotFoundException, SQLException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/yuechu\", \"root\", \"1\");\n\t}",
"public Connection DbConnection() throws Exception {\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n // Creating a new connection\n // String myDB = \"jdbc:sqlite:C:\\\\Users\\\\kapersky\\\\Documents\\\\NetBeansProjects\\\\Library Management System\\\\src\\\\librarydb.db\";\n String myDB = \"jdbc:mysql://localhost:3306/librarydb\";\n con = DriverManager.getConnection(myDB, \"root\", \"\");\n return con;\n\n }",
"private String createMySqlConnString(String[] paramArray)\n\t\t\tthrows AFTException {\n\n\t\tLOGGER.debug(\"User passed MySql DB type\");\n\n\t\tString connString = null;\n\n\t\tString[] connPropertyNames = new String[] { \"host\", \"port\", \"database\",\n\t\t\t\t\"uid\", \"pwd\" };\n\n\t\tString paramList = Arrays.asList(paramArray).toString();\n\n\t\t// if user has not provide name of a database on sql server\n\t\tif (!paramList.toLowerCase().contains(\"database\")) {\n\t\t\terrorMessage = \"Parameters does not include database name. \"\n\t\t\t\t\t+ \"Please refer to wiki FAQ on how to create connection string for MySql database\";\n\t\t\tLOGGER.error(errorMessage);\n\t\t\tthrow new AFTException(errorMessage);\n\t\t}\n\n\t\tMap<String, String> connPropertyValues = new HashMap<String, String>();\n\n\t\tconnPropertyValues = extractPropertyValues(paramArray,\n\t\t\t\tconnPropertyNames);\n\n\t\tconnString = \"jdbc:mysql:\" + \"//\";\n\n\t\tif (connPropertyValues.containsKey(\"host\")) {\n\t\t\tconnString = connString + connPropertyValues.get(\"host\");\n\t\t} else {\n\t\t\tconnString = connString + \"localhost\";\n\t\t}\n\n\t\tif (connPropertyValues.containsKey(\"port\")) {\n\t\t\tconnString = connString + \":\" + connPropertyValues.get(\"port\")\n\t\t\t\t\t+ \"/\";\n\t\t} else {\n\t\t\tconnString = connString + \"/\";\n\t\t}\n\n\t\tif (connPropertyValues.containsKey(\"database\")) {\n\t\t\tconnString = connString + connPropertyValues.get(\"database\");\n\t\t}\n\n\t\tif (connPropertyValues.containsKey(\"uid\")) {\n\t\t\tconnString = connString + \"?\" + \"user=\"\n\t\t\t\t\t+ connPropertyValues.get(\"uid\");\n\t\t}\n\n\t\tif (connPropertyValues.containsKey(\"pwd\")) {\n\t\t\tconnString = connString + \"&\" + \"password=\"\n\t\t\t\t\t+ connPropertyValues.get(\"pwd\");\n\t\t}\n\n\t\tconnPropertyValues.clear();\n\n\t\treturn connString;\n\t}",
"public Connection openDBConnection() {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.OracleDriver\");\n\t\t\tConnection myConnection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" + \"csci.cscioraclesrv.ad.csbsju.edu\",\n\t\t\t\t\t\"team1\", \"Boh3P\");\n\t\t\treturn myConnection;\n\t\t} catch (Exception E) {\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public Connection getConn() {\n\ttry {\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tcn=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521/pocdb\",\"PL\",\"PL\");\n\t\t\n\t}\n\tcatch(ClassNotFoundException ce)\n\t{\n\t\tce.printStackTrace();\n\t\t\n\t}\n\tcatch(SQLException se)\n\t{\n\t\tse.printStackTrace();\n\t\t\n\t}\n\t\n\t\n\treturn cn;\n\t\n\n}",
"private static void setConnection(){\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/novel_rental\",\"root\",\"\");\n } catch (Exception e) {\n Logger.getLogger(NovelRepository.class.getName()).log(Level.SEVERE, null, e);\n System.out.println(e.getMessage());\n }\n }",
"public static Connection getMyConnection(String hostName , String dbName, String userName, String passWord) \r\n\tthrows SQLException, ClassNotFoundException {\n\t\tString connectionURL =\"jdbc:mysql://\"+ hostName + \":3306/\"+ dbName;\r\n\t\tConnection conn = DriverManager.getConnection(connectionURL, userName, passWord);\r\n\t\treturn conn;\r\n\t}",
"public static Connection getConection() {\n\n Connection conex = null;\n try {\n\n Class.forName(\"com.mysql.jdbc.Driver\");\n conex = (Connection) DriverManager.getConnection(URL, USERNAME, PASSWORD);\n JOptionPane.showMessageDialog(null, \"Conexión Exitosa!\");\n } catch (Exception ex) {\n\n System.out.println(\"Error\" + ex);\n }\n return conex;\n }",
"public Connection getConnection(){\r\n try{\r\n conn=DriverManager.getConnection(host,user,pass);\r\n //JOptionPane.showMessageDialog(null,\"connection Successive\" );\r\n return conn;\r\n }\r\n catch(SQLException ex){\r\n JOptionPane.showMessageDialog(null, \"\"+ex.getMessage());\r\n return null;\r\n }\r\n }",
"public static Connection getConn(){\n\t\tConnection con=null;\n\t\ttry {\n\t\t\t//loading the driver class.\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\t\n\t\t\t// Created the connection \n\t\t\tcon = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:oracle:thin:@192.168.1.20:1521:xe\",\n\t\t\t\t\t\"nivesh\",\"nivesh\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"***********Connection --- ERROR:\"+e.toString());\n\t\t}\n\t\treturn con;\n\t}",
"public void openConnection(){\n\n\t\tString dbIP = getConfig().getString(\"mysql.ip\");\n\t\tString dbDB = getConfig().getString(\"mysql.databaseName\");\n\t\tString dbUN = getConfig().getString(\"mysql.username\");\n\t\tString dbPW = getConfig().getString(\"mysql.password\");\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://\" + dbIP + \"/\" + dbDB, dbUN, dbPW);\n\t\t\tgetLogger().info(\"Connected to databse!\");\n\t\t} catch (SQLException ex) {\n\t\t\t// handle any errors\n\t\t\tgetLogger().info(\"SQLException: \" + ex.getMessage());\n\t\t\tgetLogger().info(\"SQLState: \" + ex.getSQLState());\n\t\t\tgetLogger().info(\"VendorError: \" + ex.getErrorCode());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tgetLogger().info(\"Gabe, you done goof'd!\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public Connection connectDB (){\n try{\n Class.forName(\"org.sqlite.JDBC\");\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:awesomexDB.db\");\n //System.out.println(\"connection estd...\");\n return conn;\n } catch(Exception e){\n System.out.println(\"unable to connect\");\n return null;\n }\n }",
"public ConnexioBD() {\n try {\n Class.forName(driver);\n connection = DriverManager.getConnection(url, user, password);\n\n\n } catch (ClassNotFoundException | SQLException e) {\n System.out.println(\"Error al connectar amb la base de dades:\" + e);\n }\n }",
"public static Connection getConnection() {\n try {\n String dbURL = \"jdbc:mysql://\" + HOST + \":3306/soccer\" ;\n Class.forName(DRIVER);\n Connection connection = DriverManager.getConnection(dbURL, USERNAME, PASSWORD);\n return connection;\n } catch (Exception e) {\n System.out.println(\"Error in Database.getConnection: \" + e.getMessage());\n return null;\n }\n }",
"private Connection openConnection() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new oracle.jdbc.OracleDriver());\n\n String host = \"localhost\";\n String port = \"1521\";\n String dbName = \"xe\"; //\"coen280\";\n String userName = \"temp\";\n String password = \"temp\";\n\n // Construct the JDBC URL \n String dbURL = \"jdbc:oracle:thin:@\" + host + \":\" + port + \":\" + dbName;\n return DriverManager.getConnection(dbURL, userName, password);\n }",
"private Connection getConnection() throws SQLException, Exception {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\r\n\t\t\t\r\n\t\t\tString sURL = URL + DB_NAME;\r\n\t\t\tcon = DriverManager.getConnection(sURL, USUARIO, PASSWORD);\r\n\t\t\t\r\n\t\t\treturn con;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public static Connection getConnection() throws SQLException {\n if (connection == null) {\n try {\n final String url = \"jdbc:mysql://localhost:3306\";\n final String user = \"root\";\n final String pass = \"guevara88\";\n // DriverManager.registerDriver(); // Legacy: needed before ver.4\n connection = DriverManager.getConnection(url, user, pass);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n return connection;\n }"
] | [
"0.7208701",
"0.6892503",
"0.6816078",
"0.6718644",
"0.66929525",
"0.6659893",
"0.66250557",
"0.6618051",
"0.65995353",
"0.65995353",
"0.65995353",
"0.65995353",
"0.65518695",
"0.65415573",
"0.65367734",
"0.65207887",
"0.6518735",
"0.65180314",
"0.65118057",
"0.64615804",
"0.6460267",
"0.6458893",
"0.6456488",
"0.6451957",
"0.64405626",
"0.6438093",
"0.6436366",
"0.6433492",
"0.64330065",
"0.64039946",
"0.63922703",
"0.63748395",
"0.6359679",
"0.63533574",
"0.634721",
"0.63427466",
"0.6339779",
"0.6322117",
"0.6286681",
"0.6286362",
"0.6285984",
"0.6280133",
"0.6248724",
"0.62468696",
"0.6237752",
"0.6236946",
"0.62363684",
"0.62166005",
"0.61960655",
"0.61959225",
"0.61844623",
"0.6178628",
"0.6173489",
"0.6173163",
"0.6149703",
"0.61410594",
"0.6140485",
"0.61382824",
"0.6113044",
"0.6097371",
"0.6095376",
"0.60719126",
"0.6068791",
"0.6036527",
"0.6031662",
"0.6022864",
"0.6017418",
"0.59968656",
"0.59923965",
"0.5982843",
"0.59755486",
"0.5975524",
"0.5973708",
"0.5951659",
"0.59411925",
"0.59309983",
"0.59279275",
"0.5924904",
"0.5924623",
"0.59218484",
"0.59212196",
"0.5919195",
"0.5911109",
"0.59067893",
"0.5906448",
"0.5899081",
"0.58827966",
"0.58804405",
"0.587513",
"0.58711135",
"0.58696765",
"0.5867417",
"0.5864661",
"0.58626205",
"0.5858338",
"0.5858322",
"0.5852771",
"0.5852401",
"0.5850486",
"0.5841129"
] | 0.78670794 | 0 |
Creates a new CryptFile object. | public CryptFile(File file, CryptFile parentFile) {
this.file = file;
this.parentFile = parentFile;
users = new Properties();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static PicoFile create(String filename, byte[] key) throws IOException {\n if (filename == null) {\n throw new NullPointerException(\"The filename is null.\");\n }\n if (key == null) {\n throw new NullPointerException(\"The key is null.\");\n }\n if (key.length == 0) {\n throw new IllegalArgumentException(\"Encryption key is empty.\");\n }\n return new PicoFile(new RandomAccessFile(filename, \"rw\"), key);\n }",
"public static PicoFile create(File file, byte[] key) throws IOException {\n if (file == null) {\n throw new NullPointerException(\"The file is null.\");\n }\n if (key == null) {\n throw new NullPointerException(\"The key is null.\");\n }\n if (key.length == 0) {\n throw new IllegalArgumentException(\"Encryption key is empty.\");\n }\n\n return new PicoFile(new RandomAccessFile(file, \"rw\"), key);\n }",
"public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}",
"public static PicoFile create(String filename) throws IOException {\n if (filename == null) {\n throw new NullPointerException(\"The filename is null.\");\n }\n return create(filename, KeyUtils.makeKey());\n }",
"public File() {\n }",
"public FileObject() {\n\t}",
"public static PicoFile create(File file) throws IOException {\n if (file == null) {\n throw new NullPointerException(\"The file is null.\");\n }\n return create(file, KeyUtils.makeKey());\n }",
"public File() {\n\t\tthis.name = \"\";\n\t\tthis.data = \"\";\n\t\tthis.creationTime = 0;\n\t}",
"private static void crypting(boolean encrypt, String filename, String cryptedFilename) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Please provide password as hex-encoded text (16 bytes, i.e. 32 hex-digits): \");\n\t\tSystem.out.print(\">\");\n\t\tString keyText = sc.nextLine();\n\n\t\tSystem.out.println(\"Please provide initialization vector as hex-encoded text (32 hex-digits): \");\n\t\tSystem.out.print(\">\");\n\t\tString ivText = sc.nextLine();\n\t\tsc.close();\n\n\t\tSecretKeySpec keySpec = new SecretKeySpec(Util.hextobyte(keyText), \"AES\");\n\t\tAlgorithmParameterSpec paramSpec = new IvParameterSpec(Util.hextobyte(ivText));\n\t\tCipher cipher = null;\n\n\t\ttry {\n\t\t\tcipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\tcipher.init(encrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, keySpec, paramSpec);\n\n\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException exc) {\n\t\t\tSystem.out.println(\"Transformation is in invalid format or contains padding scheme that is unavailable. \");\n\t\t\tSystem.exit(1);\n\t\t} catch (InvalidKeyException | InvalidAlgorithmParameterException exc) {\n\t\t\tSystem.out.println(\"Given key or algorithm is invalid for this cipher.\");\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\ttry (InputStream inputStream = new BufferedInputStream(new FileInputStream(filename));\n\t\t\t\tOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(cryptedFilename))) {\n\n\t\t\tint nRead;\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tbyte[] inputfile = null;\n\n\t\t\twhile ((nRead = inputStream.read(buffer, 0, buffer.length)) != -1) {\n\t\t\t\tinputfile = cipher.update(buffer, 0, nRead);\n\t\t\t\toutputStream.write(inputfile);\n\t\t\t}\n\n\t\t\tinputfile = cipher.doFinal();\n\t\t\toutputStream.write(inputfile);\n\n\t\t} catch (FileNotFoundException exc) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"File does not exist, is a directory rather than a regular file, or cannot be opened for reading because of some other reason. \");\n\t\t\tSystem.exit(1);\n\n\t\t} catch (IOException exc) {\n\t\t\tSystem.out.println(\"Input stream couldn't be initialized.\");\n\t\t\tSystem.exit(1);\n\n\t\t} catch (IllegalBlockSizeException | BadPaddingException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Encryption algorithm is unable to process the input data provided or the decrypted data is not bounded by the appropriate padding bytes. \");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tif (encrypt) {\n\t\t\tSystem.out.printf(\"Encryption completed. Generated file %s based on file %s.\\n\", cryptedFilename, filename);\n\t\t} else {\n\t\t\tSystem.out.printf(\"Decryption completed. Generated file %s based on file %s.\\n\", cryptedFilename, filename);\n\t\t}\n\n\t}",
"public DiskEncryptionInfo() {\n }",
"WithCreate withEncryption(Encryption encryption);",
"public LdifFile()\n {\n }",
"XmlFileVault(final char[] password, final byte[] salt, final int iterations,\n final int keyLength, final Path path) throws VaultInitializationException {\n super(password, salt, iterations, keyLength, path);\n }",
"public Cryptor(int xcryptMode){\n this(AUTO_DETECT_ALGORITHM,xcryptMode);\n }",
"public CryptoThread(File file,SecretKeySpec skeySpec) {\r\n\t\tthis.simmetricKey = skeySpec;\r\n\t\tthis.fileToEncrypt = file;\r\n\t\tif (fileToEncrypt!= null) {\r\n\t\t\tthis.start();\r\n\t\t}\r\n\t}",
"private FileUtility() {\r\n\t}",
"protected File(SleuthkitCase db, long objId, long fsObjId, \n\t\t\tTSK_FS_ATTR_TYPE_ENUM attrType, short attrId, String name, long metaAddr, \n\t\t\tTSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, \n\t\t\tTSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, \n\t\t\tlong size, long ctime, long crtime, long atime, long mtime, \n\t\t\tshort modes, int uid, int gid, String md5Hash, FileKnown knownState, String parentPath) {\n\t\tsuper(db, objId, fsObjId, attrType, attrId, name, metaAddr, dirType, metaType, dirFlag, metaFlags, size, ctime, crtime, atime, mtime, modes, uid, gid, md5Hash, knownState, parentPath);\n\t}",
"public String dcryptFile(String filename) {\n\t\tEncryption encryptFile = new Encryption();\r\n\t\tencryptFile\r\n\t\t\t\t.decrypt(directoryPath + filename, directoryPath2 + filename);\r\n\t\tdcryptedFilePath = directoryPath2 + filename;\r\n\t\t\r\n\t\tFileService service=new FileService();\r\n\t\tservice.delete(directoryPath+filename);//deleting old encrypted file from server.\r\n\t\t\r\n\t\treturn dcryptedFilePath;\r\n\t}",
"private static java.io.File a(java.io.File r8, java.lang.String r9, java.lang.String r10) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = r8.getName();\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r3 = \".decrypt\";\n r4 = r8.getParentFile();\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r2 = java.io.File.createTempFile(r2, r3, r4);\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r3 = new javax.crypto.spec.IvParameterSpec;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"UTF-8\";\n r10 = r10.getBytes(r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r3.<init>(r10);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10 = new javax.crypto.spec.SecretKeySpec;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"UTF-8\";\n r9 = r9.getBytes(r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"AES\";\n r10.<init>(r9, r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r9 = \"AES/CBC/PKCS7PADDING\";\n r9 = javax.crypto.Cipher.getInstance(r9);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = 2;\n r9.init(r4, r10, r3);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10.<init>(r8);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r3 = new javax.crypto.CipherInputStream;\t Catch:{ Exception -> 0x005e, all -> 0x005a }\n r3.<init>(r10, r9);\t Catch:{ Exception -> 0x005e, all -> 0x005a }\n r9 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x0057, all -> 0x0054 }\n r9.<init>(r2);\t Catch:{ Exception -> 0x0057, all -> 0x0054 }\n r4 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r4 = new byte[r4];\t Catch:{ Exception -> 0x0052 }\n L_0x0045:\n r5 = r3.read(r4);\t Catch:{ Exception -> 0x0052 }\n r6 = -1;\n if (r5 == r6) goto L_0x0050;\n L_0x004c:\n r9.write(r4, r0, r5);\t Catch:{ Exception -> 0x0052 }\n goto L_0x0045;\n L_0x0050:\n r0 = 1;\n goto L_0x007e;\n L_0x0052:\n r4 = move-exception;\n goto L_0x0070;\n L_0x0054:\n r8 = move-exception;\n r9 = r1;\n goto L_0x008f;\n L_0x0057:\n r4 = move-exception;\n r9 = r1;\n goto L_0x0070;\n L_0x005a:\n r8 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x008f;\n L_0x005e:\n r4 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x0070;\n L_0x0062:\n r4 = move-exception;\n r9 = r1;\n r10 = r9;\n r3 = r10;\n goto L_0x0070;\n L_0x0067:\n r8 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x0090;\n L_0x006b:\n r4 = move-exception;\n r9 = r1;\n r10 = r9;\n r2 = r10;\n r3 = r2;\n L_0x0070:\n r5 = \"DecryptUtils\";\n r6 = \"decryptByPair decrypt hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x008e }\n com.taobao.sophix.e.d.a(r5, r6, r4, r7);\t Catch:{ all -> 0x008e }\n if (r2 == 0) goto L_0x007e;\n L_0x007b:\n r2.delete();\t Catch:{ all -> 0x008e }\n L_0x007e:\n com.taobao.sophix.e.b.a(r10);\n com.taobao.sophix.e.b.a(r3);\n com.taobao.sophix.e.b.a(r9);\n if (r0 == 0) goto L_0x008d;\n L_0x0089:\n r8.delete();\n return r2;\n L_0x008d:\n return r1;\n L_0x008e:\n r8 = move-exception;\n L_0x008f:\n r1 = r10;\n L_0x0090:\n com.taobao.sophix.e.b.a(r1);\n com.taobao.sophix.e.b.a(r3);\n com.taobao.sophix.e.b.a(r9);\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.a(java.io.File, java.lang.String, java.lang.String):java.io.File\");\n }",
"public void CreateCipher() {\n String key = \"IWantToPassTAP12\"; // 128 bit key\n aesKey = new javax.crypto.spec.SecretKeySpec(key.getBytes(), \"AES\");\n try {\n this.cipher = Cipher.getInstance(\"AES\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public SecKeyRing(File file) throws IOException, PGPException {\r\n\r\n\t\tload(file);\r\n\t}",
"public abstract T create(T file, boolean doPersist) throws IOException;",
"FileInfo create(FileInfo fileInfo);",
"public Cipher()\n {\n CodecInterface base64UriCodec = new Base64UriCodec();\n AsymmetricBlockCipher rsaCipher = new OAEPEncoding(\n new RSAEngine(),\n new SHA1Digest()\n );\n BufferedBlockCipher aesCipher = new PaddedBufferedBlockCipher(\n new CBCBlockCipher(new AESEngine()),\n new PKCS7Padding()\n );\n Digest sha1Digest = new SHA1Digest();\n SecureRandom random = new SecureRandom();\n\n this.encryptionCipher = new EncryptionCipher(\n base64UriCodec,\n rsaCipher,\n aesCipher,\n sha1Digest,\n random\n );\n this.decryptionCipher = new DecryptionCipher(\n base64UriCodec,\n rsaCipher,\n aesCipher,\n sha1Digest\n );\n }",
"String encode(File message, File key,File crypted);",
"public FileObjectFactory() {\n }",
"public interface IFileCrypter\n{\n\tpublic void encrypt( int pPartNumber , byte[] pData , int pOffset , int pLength );\n\t\n\tpublic void decrypt( int pPartNumber , byte[] pData , int pOffset , int pLength );\n}",
"private CryptoSunJCE() {\n\t}",
"public TarFile(File file) {\n this.file = file;\n }",
"public interface CryptoService {\n /**\n * Read encrypted password file.\n *\n * @param file Encrypted file instance.\n * @param password Password to decrypt file.\n *\n * @return file content.\n *\n * */\n String readFile(File file, String password);\n\n /**\n * Write and encrypt content to file.\n *\n * @param file encrypted file location.\n * @param password password which will be used to encrypt file.\n * @param cnt file content.\n * */\n void writeFile(File file, String password, String cnt);\n\n /**\n * Encrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToEncrypt text which will be encrypted\n * @return encrypted content\n * */\n String encrypt(String password, String textToEncrypt);\n\n /**\n * Decrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToDecrypt text which will be decrypted\n * @return decrypted content\n * */\n String decrypt(String password, String textToDecrypt);\n\n /**\n * Write and encrypt the password database.\n *\n * @param passwordDatabase passwords database which will be saved to encrypted file.\n * */\n void writeFile(PasswordDatabase passwordDatabase) throws JsonConversionException;\n}",
"private static SecretKey createSymmetricKey()\n\t{\n\t\tSecretKey secretKey = null;\n\n\t\ttry\n\t\t{\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(inputAlgorithmForFileEncryption);\n\t\t\tkeyGen.init(128);\n\t\t\tsecretKey = keyGen.generateKey();\n\t\t} catch (NoSuchAlgorithmException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn secretKey;\n\t}",
"XmlFileVault(final String password, final String salt, final int iterations,\n final int keyLength, final Path path) throws VaultInitializationException {\n super(password, salt, iterations, keyLength, path);\n }",
"OutputFile encryptingOutputFile();",
"public HeapFile(File f, TupleDesc td) {\n // some code goes here\n this.f = f;\n this.td = td;\n }",
"private EncryptionKey() {\n }",
"public HeapFile(File f, TupleDesc td) {\n // some code goes here\n \tm_f = f;\n \tm_td = td;\n }",
"public FileUtility()\n {\n }",
"protected PicoFile(RandomAccessFile backing, byte[] key) throws IOException {\n assert backing != null : \"Backing is null.\";\n assert key != null : \"Key is null.\";\n assert key.length > 0 : \"Key is missing.\";\n _backing = backing;\n _open = true;\n _resetDigest();\n // We are creating a new file, so truncate any existing file and\n // generate a new header.\n _backing.setLength(0L);\n _head = new PicoHeader();\n _head.setKey(key);\n\n // Now the Header size is fixed since we have the key and know the size\n // of the hash\n // we will write later.\n\n // This actually positions us to _head.offset + 0\n position(0L);\n }",
"public PersistFile() {\n\n }",
"public static Crypto getInstance() throws UnsupportedEncodingException, NoSuchAlgorithmException{\n\t\tsynchronized(lock){\n\t\t\tif(instance==null){\n\t\t\t\tinstance = new Crypto();\n\t\t\t}\n\t\t\treturn instance;\n\t\t}\n\t}",
"public SourceFile(File file) throws Exception {\r\n\t\t// this.file = file;\r\n\t\tthis.zipFile = new ZipFile(file, \"UTF-8\");\r\n\t}",
"public FileOnDisk(String name, File file) throws StyxException\n {\n this(name, file, 0666, true);\n }",
"public FileCreator() {\r\n initComponents();\r\n }",
"private FileUtil() {}",
"public FileOnDisk(File file) throws StyxException\n {\n this(file.getName(), file);\n }",
"private static Cipher getEncryptionCipher(byte[] salt, byte[] iv)\n throws GeneralSecurityException, IOException {\n\n // key is a static password + random salt, iv is random\n byte[] password = InputOperations\n .cryptPassword(Constants.CIPHER_PASSWORD + new String(salt, Constants.FILE_ENCODING));\n SecretKey secretKey = new SecretKeySpec(password, Constants.CIPHER);\n\n Cipher cipher = Cipher.getInstance(Constants.CIPHER_PADDING);\n if (iv == null) {\n cipher.init(Cipher.ENCRYPT_MODE, secretKey);\n } else {\n cipher.init(Cipher.DECRYPT_MODE, secretKey, new IvParameterSpec(iv));\n }\n return cipher;\n }",
"private static void createKeyFiles(String pass, String publicKeyFilename, String privateKeyFilename) throws Exception {\n\t\tString password = null;\n\t\tif (pass.isEmpty()) {\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.print(\"Password to encrypt the private key: \");\n\t\t\tpassword = in.readLine();\n\t\t\tSystem.out.println(\"Generating an RSA keypair...\");\n\t\t} else {\n\t\t\tpassword = pass;\n\t\t}\n\t\t\n\t\t// Create an RSA key\n\t\tKeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyPairGenerator.initialize(1024);\n\t\tKeyPair keyPair = keyPairGenerator.genKeyPair();\n\n\t\tSystem.out.println(\"Done generating the keypair.\\n\");\n\n\t\t// Now we need to write the public key out to a file\n\t\tSystem.out.print(\"Public key filename: \");\n\n\t\t// Get the encoded form of the public key so we can\n\t\t// use it again in the future. This is X.509 by default.\n\t\tbyte[] publicKeyBytes = keyPair.getPublic().getEncoded();\n\n\t\t// Write the encoded public key out to the filesystem\n\t\tFileOutputStream fos = new FileOutputStream(publicKeyFilename);\n\t\tfos.write(publicKeyBytes);\n\t\tfos.close();\n\n\t\t// Now we need to do the same thing with the private key,\n\t\t// but we need to password encrypt it as well.\n\t\tSystem.out.print(\"Private key filename: \");\n \n\t\t// Get the encoded form. This is PKCS#8 by default.\n\t\tbyte[] privateKeyBytes = keyPair.getPrivate().getEncoded();\n\n\t\t// Here we actually encrypt the private key\n\t\tbyte[] encryptedPrivateKeyBytes = passwordEncrypt(password.toCharArray(), privateKeyBytes);\n\n\t\tfos = new FileOutputStream(privateKeyFilename);\n\t\tfos.write(encryptedPrivateKeyBytes);\n\t\tfos.close();\n\t}",
"protected FileMessage(MessageWireType wireId) {\n super(wireId);\n }",
"public WfsFile(WfsFile other) {\n if (other.isSetName()) {\n this.name = other.name;\n }\n if (other.isSetFileBody()) {\n this.fileBody = org.apache.thrift.TBaseHelper.copyBinary(other.fileBody);\n }\n if (other.isSetFileType()) {\n this.fileType = other.fileType;\n }\n }",
"private FileUtil() {\n \t\tsuper();\n \t}",
"public LogFileV2(File file) {\n try {\n if(!file.getParentFile().exists()){\n file.getParentFile().mkdirs();\n }\n this.file = file;\n this.randomAccessFile = new RandomAccessFile(file,\"rw\");\n this.fileChannel = randomAccessFile.getChannel();\n this.readMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n this.writeMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void createDerivedKey() throws NoSuchAlgorithmException, InvalidKeySpecException, IOException {\n byte[] salt = null;\n int numIterations;\n derivedKey = null;\n \n // read salt + numIterations from file if available\n File derivParamFile = configuration.getKeyDerivationParametersFile();\n if (derivParamFile.exists()) {\n DataInputStream inputStream = null;\n try {\n inputStream = new DataInputStream(new FileInputStream(derivParamFile));\n salt = new byte[FileEncryptionConstants.SALT_LENGTH];\n inputStream.read(salt);\n numIterations = inputStream.readInt();\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, numIterations);\n derivedKey = new DerivedKey(salt, numIterations, key);\n }\n finally {\n if (inputStream != null)\n inputStream.close();\n }\n }\n \n // if necessary, create a new salt and key and write the derivation parameters to the cache file\n if (derivedKey==null || derivedKey.numIterations!=NUM_ITERATIONS) {\n I2PAppContext appContext = I2PAppContext.getGlobalContext();\n salt = new byte[SALT_LENGTH];\n appContext.random().nextBytes(salt);\n \n DataOutputStream outputStream = null;\n try {\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, NUM_ITERATIONS);\n derivedKey = new DerivedKey(salt, NUM_ITERATIONS, key);\n outputStream = new DataOutputStream(new FileOutputStream(derivParamFile));\n outputStream.write(salt);\n outputStream.writeInt(NUM_ITERATIONS);\n }\n finally {\n if (outputStream != null)\n outputStream.close();\n }\n }\n }",
"public InMemoryDictionary(File dictFile) {\n\t\t// TODO: Implement constructor\n\t}",
"Object create(File file) throws IOException, SAXException, ParserConfigurationException;",
"public KeyEncryptionKeyInfo() {\n }",
"public GenEncryptionParams() {\n }",
"public DecryptingState(NTLMCrypt crypt) {\n this.crypt = crypt;\n }",
"public CurrencyPair(String filename, String currency1, String currency2) throws Exception {\r\n super(filename, currency1, currency2);\r\n }",
"public FileTest() {\n }",
"public File createFile(final String path) {\n return new com.good.gd.file.File(path);\n }",
"private File createNewRotationFile(String clearName, String extension, Path parent){\n\n Path newPath = getPathRotationFile(clearName, lastCountRotation+1, extension, parent);\n try{\n File ret = Files.createFile(newPath).toFile();\n return ret;\n } catch (IOException ex){\n System.out.println(\"Ошибка в создании файла: \"+ex.getMessage());\n }\n System.out.println(\"Ошибка в создании файла: \"+newPath);\n return file;\n }",
"public MEKeyTool(File meKeystoreFile)\n throws FileNotFoundException, IOException {\n\n FileInputStream input;\n\n input = new FileInputStream(meKeystoreFile);\n\n try {\n keystore = new PublicKeyStoreBuilderBase(input);\n } finally {\n input.close();\n }\n }",
"public AES(String filePath, boolean isShred)\r\n throws UnsupportedEncodingException, NoSuchAlgorithmException, Exception\r\n {\r\n AES.filePath = filePath;\r\n AES.isShred = isShred;\r\n SecureRandom rand = new SecureRandom(SecureRandom.getSeed((int)System.currentTimeMillis()));\r\n key = keyGen(hash(String.valueOf(rand.nextLong())));\r\n }",
"private static void crypto(String filePath1, String filePath2) {\n\n\t\t// Retrieve the cipher\n\t\tCipher cipher;\n\t\ttry {\n\t\t\tcipher = obtainCipher();\n\n\t\t} catch (InvalidKeyException | InvalidAlgorithmParameterException | NoSuchAlgorithmException\n\t\t\t\t| NoSuchPaddingException e) {\n\t\t\tSystem.out.println(\"Exception while obtaining cypher: \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n\n\t\tPath p = Paths.get(filePath1);\n\t\tPath p2 = Paths.get(filePath2);\n\n\t\t// Open the file input and output stream\n\t\ttry (InputStream is = Files.newInputStream(p); OutputStream os = Files.newOutputStream(p2)) {\n\t\t\tbyte[] buff = new byte[4096];\n\n\t\t\twhile (true) {\n\t\t\t\tint r = is.read(buff);\n\n\t\t\t\tif (r == -1) {\n\t\t\t\t\t// Finishing the cipher\n\t\t\t\t\ttry {\n\t\t\t\t\t\tos.write(cipher.doFinal());\n\t\t\t\t\t} catch (IllegalBlockSizeException | BadPaddingException e) {\n\t\t\t\t\t\tSystem.out.println(\"Exception while finalizaing cipher: \" + e.getMessage());\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Update cipher and write into new file\n\t\t\t\tos.write(cipher.update(buff, 0, r));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception while opening the file: \" + e.getMessage());\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\tSystem.out.println((encrypt ? \"Encryption\" : \"Decryption\") + \" completed. Generated file \" + filePath2\n\t\t\t\t+ \" based on file \" + filePath1 + \".\");\n\n\t}",
"private void initializeFileSystem() \r\n \t /*@ requires identityFile |-> _ &*& identityFileSignature |-> _ &*& addressFile |-> _ &*& addressFileSignature |-> _\r\n\t\t\t &*& caRoleIDFile |-> _ &*& preferencesFile |-> _ &*& idDirectory |-> _\r\n\t\t\t &*& certificateDirectoryFile |-> _ &*& privateKeyDirectoryFile |-> _ &*& authenticationObjectDirectoryFile |-> _ &*& objectDirectoryFile |-> _\r\n\t\t\t &*& tokenInfo |-> _ &*& belpicDirectory |-> _ &*& dirFile |-> _\r\n\t\t\t &*& masterFile |-> _ &*& selectedFile |-> _;\r\n\t @*/\r\n \t/*@ ensures dirFile |-> ?theDirFile &*& theDirFile.ElementaryFile(_, _, ?dirFileData, _, _, _) &*& theDirFile != null \r\n \t &*& dirFileData != null &*& dirFileData.length == 0x25\r\n\t &*& belpicDirectory |-> ?theBelpicDirectory &*& theBelpicDirectory.DedicatedFile(_, _, _, ?belpic_siblings, _) &*& theBelpicDirectory != null\r\n\t &*& tokenInfo |-> ?theTokenInfo &*& theTokenInfo.ElementaryFile(_, _, ?tokenInfoData, _, _, _) &*& theTokenInfo != null\r\n\t &*& tokenInfoData != null &*& tokenInfoData.length == 0x30\r\n\t &*& objectDirectoryFile |-> ?theObjectDirectoryFile &*& theObjectDirectoryFile.ElementaryFile(_, _, ?objectDirectoryFileData, _, _, _) &*& theObjectDirectoryFile != null\r\n\t &*& objectDirectoryFileData != null &*& objectDirectoryFileData.length == 40\r\n\t &*& authenticationObjectDirectoryFile |-> ?theAuthenticationObjectDirectoryFile &*& theAuthenticationObjectDirectoryFile.ElementaryFile(_, _, ?authenticationObjectDirectoryFileData, _, _, _) &*& theAuthenticationObjectDirectoryFile != null\r\n\t &*& authenticationObjectDirectoryFileData != null &*& authenticationObjectDirectoryFileData.length == 0x40\r\n\t &*& privateKeyDirectoryFile |-> ?thePrivateKeyDirectoryFile &*& thePrivateKeyDirectoryFile.ElementaryFile(_, _, ?privateKeyDirectoryFileData, _, _, _) &*& thePrivateKeyDirectoryFile != null\r\n\t &*& privateKeyDirectoryFileData != null &*& privateKeyDirectoryFileData.length == 0xB0\r\n\t &*& certificateDirectoryFile |-> ?theCertificateDirectoryFile &*& theCertificateDirectoryFile.ElementaryFile(_, _, ?certificateDirectoryFileData, _, _, _) &*& theCertificateDirectoryFile != null\r\n\t &*& certificateDirectoryFileData != null &*& certificateDirectoryFileData.length == 0xB0\r\n\t &*& idDirectory |-> ?theIdDirectory &*& theIdDirectory.DedicatedFile(_, _, _, ?idDirectory_siblings, _) &*& theIdDirectory != null\r\n\t &*& identityFile |-> ?theIdentityFile &*& theIdentityFile.ElementaryFile(_, _, ?identityData, _, _, _) &*& theIdentityFile != null\r\n\t &*& identityData != null &*& identityData.length == 0xD0\r\n\t &*& identityFileSignature |-> ?theIdentityFileSignature &*& theIdentityFileSignature.ElementaryFile(_, _, ?identitySignatureData, _, _, _) &*& theIdentityFileSignature != null\r\n\t &*& identitySignatureData != null &*& identitySignatureData.length == 0x80\r\n\t &*& addressFile |-> ?theAddressFile &*& theAddressFile.ElementaryFile(_, _, ?addressFileData, _, _, _) &*& theAddressFile != null\r\n\t &*& addressFileData != null &*& addressFileData.length == 117\r\n\t &*& addressFileSignature |-> ?theAddressFileSignature &*& theAddressFileSignature.ElementaryFile(_, _, ?addressFileSignatureData, _, _, _) &*& theAddressFileSignature != null\r\n\t &*& addressFileSignatureData != null &*& addressFileSignatureData.length == 128\r\n\t &*& caRoleIDFile |-> ?theCaRoleIDFile &*& theCaRoleIDFile.ElementaryFile(_, _, ?caRoldIDFileData, _, _, _) &*& theCaRoleIDFile != null\r\n\t &*& caRoldIDFileData != null &*& caRoldIDFileData.length == 0x20\r\n\t &*& preferencesFile |-> ?thePreferencesFile &*& thePreferencesFile.ElementaryFile(_, _, ?preferencesFileData, _, _, _) &*& thePreferencesFile != null\r\n\t &*& preferencesFileData != null &*& preferencesFileData.length == 100\r\n\t &*& masterFile |-> ?theMasterFile &*& theMasterFile.MasterFile(0x3F00, null, _, ?master_siblings, _) &*& theMasterFile != null\r\n\t &*& master_siblings == cons<File>(theDirFile, cons(theBelpicDirectory, cons(theIdDirectory, nil)))\r\n\t &*& belpic_siblings == cons<File>(theTokenInfo, cons(theObjectDirectoryFile, cons(theAuthenticationObjectDirectoryFile, cons(thePrivateKeyDirectoryFile, cons(theCertificateDirectoryFile,nil)))))\r\n\t &*& idDirectory_siblings == cons<File>(theIdentityFile, cons(theIdentityFileSignature, cons(theAddressFile, cons(theAddressFileSignature, cons(theCaRoleIDFile, cons(thePreferencesFile, nil))))))\r\n\t &*& selectedFile |-> theMasterFile &*& theBelpicDirectory.getClass() == DedicatedFile.class &*& theIdDirectory.getClass() == DedicatedFile.class;\r\n\t @*/\r\n\t{\r\n\t\tmasterFile = new MasterFile();\r\n\t\t/*\r\n\t\t * initialize PKCS#15 data structures see\r\n\t\t * \"5. PKCS#15 information details\" for more info\r\n\t\t */\r\n\t\t\r\n\t\t//@ masterFile.castMasterToDedicated();\r\n\t\t\r\n\t\tdirFile = new ElementaryFile(EF_DIR, masterFile, (short) 0x25);\r\n\t\tbelpicDirectory = new DedicatedFile(DF_BELPIC, masterFile);\r\n\t\ttokenInfo = new ElementaryFile(TOKENINFO, belpicDirectory, (short) 0x30);\r\n\t\tobjectDirectoryFile = new ElementaryFile(ODF, belpicDirectory, (short) 40);\r\n\t\tauthenticationObjectDirectoryFile = new ElementaryFile(AODF, belpicDirectory, (short) 0x40);\r\n\t\tprivateKeyDirectoryFile = new ElementaryFile(PRKDF, belpicDirectory, (short) 0xB0);\r\n\t\tcertificateDirectoryFile = new ElementaryFile(CDF, belpicDirectory, (short) 0xB0);\r\n\t\tidDirectory = new DedicatedFile(DF_ID, masterFile);\r\n\t\t/*\r\n\t\t * initialize all citizen data stored on the eID card copied from sample\r\n\t\t * eID card 000-0000861-85\r\n\t\t */\r\n\t\t// initialize ID#RN EF\r\n\t\tidentityFile = new ElementaryFile(IDENTITY, idDirectory, (short) 0xD0);\r\n\t\t// initialize SGN#RN EF\r\n\t\tidentityFileSignature = new ElementaryFile(SGN_IDENTITY, idDirectory, (short) 0x80);\r\n\t\t// initialize ID#Address EF\r\n\t\t// address is 117 bytes, and should be padded with zeros\r\n\t\taddressFile = new ElementaryFile(ADDRESS, idDirectory, (short) 117);\r\n\t\t// initialize SGN#Address EF\r\n\t\taddressFileSignature = new ElementaryFile(SGN_ADDRESS, idDirectory, (short) 128);\r\n\t\t// initialize PuK#7 ID (CA Role ID) EF\r\n\t\tcaRoleIDFile = new ElementaryFile(CA_ROLE_ID, idDirectory, (short) 0x20);\r\n\t\t// initialize Preferences EF to 100 zero bytes\r\n\t\tpreferencesFile = new ElementaryFile(PREFERENCES, idDirectory, (short) 100);\r\n\t\t\r\n\t\tselectedFile = masterFile;\r\n\t\t//@ masterFile.castDedicatedToMaster();\r\n\t}",
"private PasskeyContract() {}",
"public void init() {\n File file = new File(FILE);\n if (!file.exists()) {\n File file2 = new File(file.getParent());\n if (!file2.exists()) {\n file2.mkdirs();\n }\n }\n if (this.accessFile == null) {\n try {\n this.accessFile = new RandomAccessFile(FILE, \"rw\");\n } catch (FileNotFoundException unused) {\n }\n }\n }",
"private static AlgorithmParameters fileEncryption(File fileToEncrypt, SecretKey symmetricKey, File fileAfterEncrypt)\n\t{\n\t\tCipherOutputStream cipherOutputStream = null;\n\t\tAlgorithmParameters algoParams = null;\n\t\tCipher cipher;\n\n\t\ttry\n\t\t{\n\t\t\tif (inputProviderForFile.equals(\"non\"))\n\t\t\t{\n\t\t\t\tcipher = Cipher.getInstance(inputAlgorithmForFileEncryption + \"/\" + inputAlgorithmMode + \"/\" + inputAlgorithmPadding);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcipher = Cipher.getInstance(inputAlgorithmForFileEncryption + \"/\" + inputAlgorithmMode + \"/\" + inputAlgorithmPadding, inputProviderForFile);\n\t\t\t}\n\t\t\tif (cipher != null && symmetricKey != null)\n\t\t\t{\n\t\t\t\tcipher.init(Cipher.ENCRYPT_MODE, symmetricKey);\n\t\t\t\tcipherOutputStream = new CipherOutputStream(new FileOutputStream(fileAfterEncrypt), cipher);\n\t\t\t\tPath path = Paths.get(fileToEncrypt.getPath());\n\t\t\t\tbyte[] dataFromFile = Files.readAllBytes(path);\n\t\t\t\tcipherOutputStream.write(dataFromFile);\n\t\t\t\talgoParams = cipher.getParameters();\n\t\t\t}\n\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IOException | NoSuchProviderException e2)\n\t\t{\n\t\t\te2.printStackTrace();\n\t\t} finally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (cipherOutputStream != null)\n\t\t\t\t{\n\t\t\t\t\tcipherOutputStream.flush();\n\t\t\t\t\tcipherOutputStream.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn algoParams;\n\t}",
"private AES() {\n }",
"public GridFSInputFile createFile(File f) throws IOException {\n\treturn createFile(new FileInputStream(f), f.getName(), true);\n }",
"public void constructWith(LzzFileInfo pro) {\n\t\tthis.id = pro.getId ();\n\n\t\tthis.fname = pro.getFname ();\n\n\t\tthis.ftype = pro.getFtype ();\n\n\t\tthis.fsavepath = pro.getFsavepath ();\n\n\t\tthis.furlpath = pro.getFurlpath ();\n\n\t\tthis.createTime = pro.getCreateTime ();\n\n\t\tthis.modifyTime = pro.getModifyTime ();\n\n\t\tthis.def1 = pro.getDef1 ();\n\n\t\tthis.def2 = pro.getDef2 ();\n\n\t\tthis.def3 = pro.getDef3 ();\n\n\t\tthis.def4 = pro.getDef4 ();\n\n\t\tthis.def5 = pro.getDef5 ();\n\n\t\tthis.def6 = pro.getDef6 ();\n\n\t\tthis.def7 = pro.getDef7 ();\n\n\t\tthis.def8 = pro.getDef8 ();\n\n\t\tthis.def9 = pro.getDef9 ();\n\n\t\tthis.def10 = pro.getDef10 ();\n\n\t\tthis.dr = pro.getDr ();\n\n\t}",
"FileReference createFile(String fileName, String toolId);",
"private FileUtils() {\n }",
"private FileUtils() {\n }",
"public FileInfo()\r\n {\r\n hash = new HashInfo();\r\n }",
"public NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenParams params)\n throws IOException {\n\n // Access the database context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Check if the database is online\n \n if ( dbCtx.getDBInterface().isOnline() == false)\n throw new DiskOfflineException( \"Database is offline\");\n \n // Set the session in the file open parameters\n \n params.setSession( sess);\n \n // Get, or create, a file state for the new file\n \n FileState fstate = getFileState(params.getPath(), dbCtx, true);\n if ( fstate.fileExists()) {\n \n // Check if the file creation is a new stream\n \n if ( params.isStream() == false)\n throw new FileExistsException(\"File exists, \" + params.getPath());\n \n // Create a new stream associated with the existing file\n \n return createStream(params, fstate, dbCtx);\n }\n \n // Split the path string and find the directory id to attach the file to\n \n int dirId = findParentDirectoryId(dbCtx,params.getPath(),true);\n if ( dirId == -1)\n throw new IOException(\"Cannot find parent directory\");\n\n // Check if the allocation size for the new file is greater than the maximum allowed file size\n \n if ( dbCtx.hasMaximumFileSize() && params.getAllocationSize() > dbCtx.getMaximumFileSize())\n throw new DiskFullException( \"Required allocation greater than maximum file size\");\n \n // Create a new file\n \n DBNetworkFile file = null;\n\n try {\n\n // Get the file name\n \n String[] paths = FileName.splitPath(params.getPath());\n String fname = paths[1];\n \n // Check if the file name is too long\n \n if ( fname != null && fname.length() > MaxFileNameLen)\n throw new FileNameException(\"File name too long, \" + fname);\n \n // If retention is enabled check if the file is a temporary file\n \n boolean retain = true;\n \n if ( dbCtx.hasRetentionPeriod()) {\n \n // Check if the file is marked delete on close\n \n if ( params.isDeleteOnClose())\n retain = false;\n }\n \n // Set the default NFS file mode, if not set\n \n if ( params.hasMode() == false)\n params.setMode(DefaultNFSFileMode);\n \n // Create a new file record\n \n int fid = dbCtx.getDBInterface().createFileRecord(fname, dirId, params, retain);\n\n // Indicate that the file exists\n \n fstate.setFileStatus( FileStatus.FileExists);\n\n // Save the file id\n \n fstate.setFileId(fid);\n\n // If retention is enabled get the expiry date/time\n \n if ( dbCtx.hasRetentionPeriod() && retain == true) {\n RetentionDetails retDetails = dbCtx.getDBInterface().getFileRetentionDetails(dirId, fid);\n if ( retDetails != null)\n fstate.setRetentionExpiryDateTime(retDetails.getEndTime());\n }\n \n // Create a network file to hold details of the new file entry\n\n file = (DBNetworkFile) dbCtx.getFileLoader().openFile(params, fid, 0, dirId, true, false);\n file.setFullName(params.getPath());\n file.setDirectoryId(dirId);\n file.setAttributes(params.getAttributes());\n file.setFileState(fstate);\n \n // Open the file\n \n file.openFile(true);\n }\n catch (DBException ex) {\n \n // Remove the file state for the new file\n \n dbCtx.getStateCache().removeFileState( fstate.getPath());\n \n // DEBUG\n \n Debug.println(\"Create file error: \" + ex.toString());\n// Debug.println(ex);\n }\n\n // Return the new file details\n\n if (file == null)\n throw new IOException( \"Failed to create file \" + params.getPath());\n else {\n \n // Update the file state\n \n fstate.incrementOpenCount();\n }\n\n // Return the network file\n \n return file;\n }",
"public CloudServiceVaultCertificate() {\n }",
"private FileManager() {}",
"@Inject\n public Crypto(NinjaProperties ninjaProperties) {\n this.applicationSecret = ninjaProperties\n .getOrDie(NinjaConstant.applicationSecret);\n\n }",
"public AncFile() {\n }",
"public FileMessageFactory(Session session, String filename) throws MessageFactoryException\n {\n try\n {\n _filename = filename;\n _payload = FileUtils.readFileAsString(filename);\n _session = session;\n }\n catch (Exception e)\n {\n MessageFactoryException mfe = new MessageFactoryException(e.toString(), e);\n throw mfe;\n }\n }",
"public DecryptionOutput () { }",
"private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }",
"public static TransferFile createFileToTransfer(String Path)\n {\n \tif(Path.isEmpty())\n \t\treturn null;\n TransferFile msg=new TransferFile(Path);\n try {\n \tFile newFile = new File(Path);\n \tif(!newFile.exists())\n \t\treturn null;\n \tbyte[] mybytearray = new byte [(int)newFile.length()];\n\t\t FileInputStream fis = new FileInputStream(newFile);\n\t\t BufferedInputStream bis = new BufferedInputStream(fis);\n\t\t msg.initArray(mybytearray.length);\n\t\t msg.setSize(mybytearray.length);\n\t\t bis.read(msg.getMybytearray(),0,mybytearray.length);\n\t\t \n }\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Error send (Files)msg) to Server\");\n\t\t}\n return msg;\n }",
"private AES() {\r\n\r\n }",
"public ZipFile mo305b() throws IOException {\n return new ZipFile(this.f340a);\n }",
"public ECKey() {\n this(secureRandom);\n }",
"protected FileDepositorImpl() {\n\t}",
"public Module(TruffleFile file) {\n this.file = file;\n }",
"public PDEncryptionDictionary()\n {\n encryptionDictionary = new COSDictionary();\n }",
"public NewCipher(byte[] blowfishKey)\r\n\t{\r\n\t\t_blowfishKey = blowfishKey;\r\n\t\t_crypt = new BlowfishEngine();\r\n\t\t_crypt.init(true, getBlowfishKey());\r\n\t\t_decrypt = new BlowfishEngine();\r\n\t\t_decrypt.init(false, getBlowfishKey());\r\n\t}",
"public SplitFile() {\n\t}",
"public PsiFile createFile(FileViewProvider viewProvider) {\n return new BytemanFileImpl(viewProvider);\n }",
"@Override\n\tpublic CreditrepayplanFile getFileLogInstance() {\n\t\treturn new CreditrepayplanFile();\n\t}",
"public Cryptor(int algorithm, int xcryptMode) {\n //Checks if the algorithm supplied is valid\n ALGORITHM = algorithm;\n MODE = xcryptMode;\n if (algorithm != DES_ALGORITHM && algorithm != T3DES_ALGORITHM & algorithm != AUTO_DETECT_ALGORITHM) {\n throw new RuntimeException(\"Invalid Algorithm Mode Supplied\");\n }\n if (xcryptMode != ENCRYPT_MODE && xcryptMode != DECRYPT_MODE) {\n throw new RuntimeException(\"Invalid Cipher Mode Supplied\");\n }\n\n }",
"protected PersistenceEnvironment<ReadBuffer> createPersistenceEnv(File fileActive, File fileSnapshot,\n File fileTrash)\n throws IOException\n {\n return new BerkeleyDBEnvironment(fileActive, fileSnapshot, fileTrash);\n }",
"public static FileData createEntity() {\n FileData fileData = Reflections.createObj(FileData.class, Lists.newArrayList(\n\t\t FileData.F_NAME\n\t\t,FileData.F_PATH\n\t\t,FileData.F_SIZE\n\t\t,FileData.F_TYPE\n\t\t,FileData.F_DESCRIPTION\n ),\n\n\t\t DEFAULT_NAME\n\n\t\t,DEFAULT_PATH\n\n\t\t,DEFAULT_SIZE\n\n\t\t,DEFAULT_TYPE\n\n\n\n\n\n\n\t\t,DEFAULT_DESCRIPTION\n\n\t);\n return fileData;\n }",
"private BlobFromFile() {\n }",
"void setCryptAlgorithmClass(org.openxmlformats.schemas.presentationml.x2006.main.STAlgClass.Enum cryptAlgorithmClass);",
"protected PicoFile(RandomAccessFile backing, String mode) throws PicoException, IOException {\n assert backing != null : \"Backing is null.\";\n _backing = backing;\n _open = true;\n _resetDigest();\n _readHeader();\n this.mode = mode;\n position(0L);\n }"
] | [
"0.6039879",
"0.57998514",
"0.57131565",
"0.5583892",
"0.5511923",
"0.5312367",
"0.530882",
"0.5307578",
"0.52918994",
"0.52806455",
"0.52599007",
"0.52113724",
"0.52090627",
"0.5187801",
"0.5158652",
"0.5150973",
"0.51482403",
"0.5102252",
"0.5088004",
"0.5086804",
"0.50831515",
"0.50761807",
"0.50667983",
"0.50319666",
"0.5031141",
"0.5016658",
"0.49954313",
"0.4984801",
"0.49817398",
"0.4976846",
"0.4972258",
"0.4970986",
"0.49623024",
"0.49550736",
"0.49394673",
"0.49337316",
"0.49280033",
"0.48892248",
"0.4888346",
"0.487179",
"0.48453945",
"0.48325348",
"0.48210096",
"0.48191085",
"0.4812895",
"0.480818",
"0.48038697",
"0.47830188",
"0.47630054",
"0.47558597",
"0.47543034",
"0.4751712",
"0.47509402",
"0.47501686",
"0.47485763",
"0.47449005",
"0.47433472",
"0.47196728",
"0.4715538",
"0.47085285",
"0.47077176",
"0.47021294",
"0.46870568",
"0.4683266",
"0.46705675",
"0.4663059",
"0.4660174",
"0.46504134",
"0.46372247",
"0.4635196",
"0.462556",
"0.46129918",
"0.46051416",
"0.46051416",
"0.45898682",
"0.45707443",
"0.457039",
"0.45669284",
"0.4554528",
"0.4553255",
"0.45509425",
"0.45474824",
"0.454589",
"0.45408952",
"0.45258757",
"0.45245793",
"0.4521014",
"0.451675",
"0.45164028",
"0.45124424",
"0.45096433",
"0.45081794",
"0.45067573",
"0.4492925",
"0.448095",
"0.44735882",
"0.44727457",
"0.44723722",
"0.44688722",
"0.44683504"
] | 0.67706454 | 0 |
Gets the worldspace direction for the specified side relative to the specified entity. | public static Direction toGlobal(final Entity entity, @Nullable final RobotOperationSide side) {
Direction direction = side == null
? RobotOperationSide.FRONT.direction
: side.direction;
if (direction.getAxis().isHorizontal()) {
final int horizontalIndex = entity.getDirection().get2DDataValue();
for (int i = 0; i < horizontalIndex; i++) {
direction = direction.getClockWise();
}
}
return direction;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vector getDirection(){\n\t\treturn new Vector(_direction);\n\t}",
"public Direction right() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"public static Direction randomSideDirection(Direction direction) {\n Random rand = new Random();\n int side = rand.nextInt(2);\n if (direction.isHorizontal())\n return (side == 0)? NORTH:SOUTH;\n if (direction.isVertical())\n return (side == 0)? WEST:EAST;\n return null;\n }",
"default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }",
"public Direction getDirect() {\n \tif(xMoving && yMoving){\n \t\tif(right && down)\n \t\t\tdir = Direction.SOUTHEAST;\n \t\telse if(right && !down)\n \t\t\tdir = Direction.NORTHEAST;\n \t\telse if(!right && down)\n \t\t\tdir = Direction.SOUTHWEST;\n \t\telse\n \t\t\tdir = Direction.NORTHWEST;\n \t}\n \telse if(xMoving){\n \t\tdir = right ? Direction.EAST : Direction.WEST;\n \t}\n \telse if(yMoving){\n \t\tdir = down ? Direction.SOUTH : Direction.NORTH;\n \t}\n \treturn dir;\n }",
"public Vector3d getDirection() { return mDirection; }",
"protected final Direction getDirection() {\n\t\treturn tile.getDirection();\n\t}",
"public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}",
"public Vector3f getDirection() {\r\n\t\treturn new Vector3f(mDirection);\r\n\t}",
"public abstract Vector3 directionFrom(Point3 point);",
"public Direction direction()\n {\n return myDir;\n }",
"public Direction toRight()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 4));\n }",
"public final Vector3f getDirection() {\r\n return direction;\r\n }",
"public final Vector3d getRight()\n {\n return myDir.cross(myUp).getNormalized();\n }",
"public ForgeDirection toForgeDirection()\n {\n for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)\n {\n if (this.x == direction.offsetX && this.y == direction.offsetY && this.z == direction.offsetZ)\n {\n return direction;\n }\n }\n\n return ForgeDirection.UNKNOWN;\n }",
"public Direction sideSymm(Direction dir) {\n return new Direction(-1 * dir.xDist(), dir.yDist(), dir.length());\n }",
"public static short getAdversarySide(short side) {\r\n\treturn (short) Math.abs(side - 1);\r\n }",
"public Location getRight(char dirFacing)\n\t{\n\t\tswitch (dirFacing) {\n\t\t\tcase 'l':\n\t\t\t\treturn getAdjacentLocation('u');\n\t\t\tcase 'r':\n\t\t\t\treturn getAdjacentLocation('d');\n\t\t\tcase 'u':\n\t\t\t\treturn getAdjacentLocation('r');\n\t\t\tcase 'd':\n\t\t\tdefault:\n\t\t\t\treturn getAdjacentLocation('l');\n\t\t}\n\t}",
"public Direction getDirection()\n {\n return dir;\n }",
"public static Direction getDirection(Point start, Point end)\n \t{\n \t\tif( start.x - end.x > 0) //left\n \t\t{\n \t\t\tif (start.y - end.y < 0) //up\n \t\t\t\treturn Board.Direction.topleft;\n \t\t\telse if (start.y - end.y > 0) //down\n \t\t\t\treturn Board.Direction.botleft;\n \t\t\telse //same .y\n \t\t\t\treturn Board.Direction.left;\n \t\t}\n \t\telse if ( start.x - end.x < 0) //right\n \t\t{\n \t\t\tif (start.y - end.y < 0) //up\n \t\t\t\treturn Board.Direction.topright;\n \t\t\telse if (start.y - end.y > 0) //down\n \t\t\t\treturn Board.Direction.botright;\n \t\t\telse //same .y\n \t\t\t\treturn Board.Direction.right;\n \t\t}\n \t\telse // no x movement (only up or down)\n \t\t{\n \t\t\tif(start.y - end.y < 0)\n \t\t\t\treturn Board.Direction.up;\n \t\t\tif(start.y - end.y > 0)\n \t\t\t\treturn Board.Direction.down;\n \t\t\telse\n \t\t\t\treturn Board.Direction.none; //no movement\n \t\t}\n \t}",
"public float getDirection();",
"public double direction(){\n return Math.atan2(this.y, this.x);\n }",
"int getDirection();",
"private DominoInKingdom.DirectionKind getDirection(String dir) {\n switch (dir) {\n case \"up\":\n return DominoInKingdom.DirectionKind.Up;\n case \"down\":\n return DominoInKingdom.DirectionKind.Down;\n case \"left\":\n return DominoInKingdom.DirectionKind.Left;\n case \"right\":\n return DominoInKingdom.DirectionKind.Right;\n default:\n throw new java.lang.IllegalArgumentException(\"Invalid direction: \" + dir);\n }\n }",
"public Entity getShoulderEntityRight ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityRight ( ) );\n\t}",
"public Direction moveRight() {\n switch(this){\n case EAST :\n return SOUTH;\n case SOUTH :\n return WEST;\n case WEST :\n return NORTH;\n case NORTH :\n return EAST;\n }\n return this;\n }",
"String getDirection();",
"public Direction getDirection() {\n return currentDirection;\n }",
"public Direction getDirection()\n\t{\n\t\treturn this.direction;\n\t}",
"public MoveDirection getDirection() {\n\t\treturn direction;\n\t}",
"public Direction getDirection() {\r\n\t\treturn direction;\r\n\t}",
"public Enums.Direction getDirection() {\n return direction;\n }",
"public Direction getDirection() {\n return direction;\n }",
"public Direction getDirection() {\n return direction;\n }",
"public Direction getDirection() {\n return direction;\n }",
"public int getDirection();",
"public Direction getDirection() {\n\t\treturn direction;\n\t}",
"public static Direction direction(Point p1, Point p2, Point p3)\n {\n Direction result = Direction.COLLINEAR;\n double cp = crossProduct(p2, p3, p1);\n if (cp < 0.0) {\n result = Direction.RIGHT;\n } else if (cp > 0.0) {\n result = Direction.LEFT;\n }\n return result;\n }",
"@Generated\n @Selector(\"direction\")\n @ByValue\n public native CGVector direction();",
"public DirectionEnum getDirection() {\n return direction;\n }",
"public float getDirection()\r\n {\r\n return direction;\r\n }",
"public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"@Basic\r\n\tpublic Direction getDirection()\r\n\t{\r\n\t\treturn this.direction;\r\n\t}",
"com.cantor.drop.aggregator.model.CFTrade.Side getSide();",
"public abstract int getDirection();",
"public Direction right() {\n\t\treturn right;\n\t}",
"public com.cantor.drop.aggregator.model.CFTrade.Side getSide() {\n com.cantor.drop.aggregator.model.CFTrade.Side result = com.cantor.drop.aggregator.model.CFTrade.Side.valueOf(side_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.Side.BUY : result;\n }",
"public void getDirection (float xDir, float yDir){\n this.xDir = xDir;\n this.yDir = yDir;\n }",
"public DoorDirection getDoorDirection() {\n\t\treturn this.doorDirection; \n\t}",
"public com.cantor.drop.aggregator.model.CFTrade.Side getSide() {\n com.cantor.drop.aggregator.model.CFTrade.Side result = com.cantor.drop.aggregator.model.CFTrade.Side.valueOf(side_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.Side.BUY : result;\n }",
"public Location getNeighbor(int direction)\n\t{\n\t\tint\tnewX = mX;\n\t\tint newY = mY;\n\t\t\n\t\tswitch (direction)\n\t\t{\n\t\t\tcase NORTH: newY--; break;\n\t\t\tcase NORTHEAST: newX++; newY--; break;\n\t\t\tcase EAST: newX++; break;\n\t\t\tcase SOUTHEAST: newX++; newY++; break;\n\t\t\tcase SOUTH: newY++; break;\n\t\t\tcase SOUTHWEST: newX--; newY++; break;\n\t\t\tcase WEST: newX--; break;\n\t\t\tcase NORTHWEST: newX--; newY--; break;\n\t\t\tdefault: throw new IllegalArgumentException(\"No such direction\");\n\t\t}\n\t\t\n\t\treturn new Location(newX, newY);\n\t}",
"Optional<Direction> getDirection();",
"public int getDirection()\r\n\t{\r\n\t\treturn direction;\r\n\t}",
"public Direction getDirection(float x1, float y1, float x2, float y2){\n double angle = getAngle(x1, y1, x2, y2);\n return Direction.fromAngle(angle);\n }",
"public Side getSide() {\r\n\t\treturn side;\r\n\t}",
"public int getDirection() {\n return direction_;\n }",
"public Direction toLeft()\n {\n return new Direction(dirInDegrees - (FULL_CIRCLE / 4));\n }",
"public boolean move(Entity entity, Direction dir) {\r\n\t\tif (entity == null || entity.room() == null || dir == null)\r\n\t\t\treturn false;\r\n\t\tif (!entity.room().equals(this))\r\n\t\t\treturn false;\r\n\t\tint changeX = 0;\r\n\t\tint changeY = 0;\r\n\t\tif (dir.isRelative()) {\r\n\t\t\t// handling for forward, back, left, right\r\n\t\t\tDirection facing = entity.facing();\r\n\t\t\t// first get the change values sorted for when facing North\r\n\t\t\tswitch (dir) {\r\n\t\t\tcase FORWARD:\r\n\t\t\t\tchangeY = -1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase BACK:\r\n\t\t\t\tchangeY = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase LEFT:\r\n\t\t\t\tchangeX = -1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase RIGHT:\r\n\t\t\t\tchangeX = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t// then, adjust them to fit the Direction that the Entity is facing\r\n\t\t\tswitch (facing) {\r\n\t\t\tcase NORTH: // everything fine\r\n\t\t\t\tbreak;\r\n\t\t\tcase EAST: // rotate 90 degrees right\r\n\t\t\t\tint tempY = changeY;\r\n\t\t\t\tchangeY = changeX;\r\n\t\t\t\tchangeX = -tempY;\r\n\t\t\t\tbreak;\r\n\t\t\tcase SOUTH: // opposite of North, so invert\r\n\t\t\t\tchangeX = -changeX;\r\n\t\t\t\tchangeY = -changeY;\r\n\t\t\t\tbreak;\r\n\t\t\tcase WEST: // rotate 90 degrees left\r\n\t\t\t\tint tempX = changeX;\r\n\t\t\t\tchangeX = changeY;\r\n\t\t\t\tchangeY = -tempX;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// handling for North, East, South, West\r\n\t\t\tswitch (dir) {\r\n\t\t\tcase NORTH:\r\n\t\t\t\tchangeY = -1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase EAST:\r\n\t\t\t\tchangeX = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase SOUTH:\r\n\t\t\t\tchangeY = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tcase WEST:\r\n\t\t\t\tchangeX = -1;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tint targetX = entity.xPos() + changeX;\r\n\t\tint targetY = entity.yPos() + changeY;\r\n\t\t// movement between rooms\r\n\t\tif (targetX < 0) {\r\n\t\t\tif (targetY == this.depth / 2) {\r\n\t\t\t\tRoom targetRoom = this.neighbours.get(Direction.WEST);\r\n\r\n\t\t\t\tif (targetRoom != null) {\r\n\t\t\t\t\tif (targetRoom.entities[targetY][targetRoom.width - 1] == null) {\r\n\t\t\t\t\t\ttargetRoom.entities[targetY][targetRoom.width - 1] = entity;\r\n\t\t\t\t\t\tthis.entities[entity.yPos()][entity.xPos()] = null;\r\n\t\t\t\t\t\tentity.setRoom(targetRoom);\r\n\t\t\t\t\t\tentity.setXPos(targetRoom.width - 1);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} else if (targetX >= this.width) {\r\n\t\t\tif (targetY == this.depth / 2) {\r\n\t\t\t\tRoom targetRoom = this.neighbours.get(Direction.EAST);\r\n\r\n\t\t\t\tif (targetRoom != null) {\r\n\t\t\t\t\tif (targetRoom.entities[targetY][0] == null) {\r\n\t\t\t\t\t\ttargetRoom.entities[targetY][0] = entity;\r\n\t\t\t\t\t\tthis.entities[entity.yPos()][entity.xPos()] = null;\r\n\t\t\t\t\t\tentity.setRoom(targetRoom);\r\n\t\t\t\t\t\tentity.setXPos(0);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} else if (targetY < 0) {\r\n\t\t\tif (targetX == this.width / 2) {\r\n\r\n\t\t\t\tRoom targetRoom = this.neighbours.get(Direction.NORTH);\r\n\r\n\t\t\t\tif (targetRoom != null) {\r\n\t\t\t\t\tif (targetRoom.entities[targetRoom.depth - 1][targetX] == null) {\r\n\t\t\t\t\t\ttargetRoom.entities[targetRoom.depth - 1][targetX] = entity;\r\n\t\t\t\t\t\tthis.entities[entity.yPos()][entity.xPos()] = null;\r\n\t\t\t\t\t\tentity.setRoom(targetRoom);\r\n\t\t\t\t\t\tentity.setYPos(targetRoom.depth - 1);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} else if (targetY >= this.depth) {\r\n\t\t\tif (targetX == this.width / 2) {\r\n\r\n\t\t\t\tRoom targetRoom = this.neighbours.get(Direction.SOUTH);\r\n\r\n\t\t\t\tif (targetRoom != null) {\r\n\t\t\t\t\tif (targetRoom.entities[0][targetX] == null) {\r\n\t\t\t\t\t\ttargetRoom.entities[0][targetX] = entity;\r\n\t\t\t\t\t\tthis.entities[entity.yPos()][entity.xPos()] = null;\r\n\t\t\t\t\t\tentity.setRoom(targetRoom);\r\n\t\t\t\t\t\tentity.setYPos(0);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (this.entities[targetY][targetX] == null) {\r\n\t\t\t// target location is free, so can move there\r\n\t\t\tthis.entities[targetY][targetX] = entity;\r\n\t\t\tthis.entities[entity.yPos()][entity.xPos()] = null;\r\n\t\t\tentity.setXPos(targetX);\r\n\t\t\tentity.setYPos(targetY);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public double getSide()\n\t{\n\t\treturn this.side;\n\t}",
"public double getDirectionMove();",
"EChannelDirection direction();",
"public int getDirection() {\n return direction;\n }",
"public int getDirection() {\n return direction;\n }",
"public int getDirectionToward(Location anotherLocation)\n\t{\n\t\tdouble\tdeltaX = anotherLocation.getX() - mX;\n\t\tdouble\tdeltaY = anotherLocation.getY() - mY;\n\t\tdouble\tdegrees = (360.0 / (2 * Math.PI)) * Math.atan(deltaY / deltaX);\n\t\t\n\t\tif (Math.abs(degrees) > 67.5) // either north or south\n\t\t{\n\t\t\treturn deltaY > 0 ? SOUTH : NORTH;\n\t\t}\n\t\telse if (Math.abs(degrees) > 22.5) // one of the four diagonals\n\t\t{\n\t\t\tif (deltaY < 0)\n\t\t\t{\n\t\t\t\treturn deltaX > 0 ? NORTHEAST : NORTHWEST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn deltaX > 0 ? SOUTHEAST : SOUTHWEST;\n\t\t\t}\n\t\t}\n\t\telse // either east or west\n\t\t{\n\t\t\treturn deltaX > 0 ? EAST : WEST;\n\t\t}\n\t}",
"public int getDirection() {\n return direction;\n }",
"public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"public int getDirection() {\n return direction_;\n }",
"public String getDirection() {\n\t\treturn this.direction;\n\t}",
"public synchronized Vector2f getTurtleDirection(int x, int y) {\n\t\tTurtleBody body = this.grid.getTurtle(x, y);\n\t\tif (body != null) {\n\t\t\treturn body.getHeadingVector();\n\t\t}\n\t\treturn null;\n\t}",
"public int getDirection() {\r\n\t\treturn direction;\r\n\t}",
"Side getSide();",
"public String getDirection() {\n return this.direction;\n }",
"public byte getDirection() {\n return this.direction;\n }",
"public byte getDirection() {\n return this.direction;\n }",
"public Direction reverse()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 2));\n }",
"Enumerator getDirection();",
"public Vector3fc dir(float x, float y, Vector3f dir) {\n float y1x = nxnyX + (nxpyX - nxnyX) * y;\n float y1y = nxnyY + (nxpyY - nxnyY) * y;\n float y1z = nxnyZ + (nxpyZ - nxnyZ) * y;\n float y2x = pxnyX + (pxpyX - pxnyX) * y;\n float y2y = pxnyY + (pxpyY - pxnyY) * y;\n float y2z = pxnyZ + (pxpyZ - pxnyZ) * y;\n float dx = y1x + (y2x - y1x) * x;\n float dy = y1y + (y2y - y1y) * x;\n float dz = y1z + (y2z - y1z) * x;\n // normalize the vector\n float invLen = Math.invsqrt(dx * dx + dy * dy + dz * dz);\n dir.x = dx * invLen;\n dir.y = dy * invLen;\n dir.z = dz * invLen;\n return dir;\n }",
"public int[] direction(Node from, Node to) {\n int dx = to.getX() - from.getX();\n int dy = to.getY() - from.getY();\n int[] direction = {0, 0};\n \n if (dx != 0) {\n direction[0] = dx/Math.abs(dx);\n }\n \n if (dy != 0) {\n direction[1] = dy/Math.abs(dy);\n }\n \n return direction;\n }",
"public byte getDirection() {\n\t\treturn direction;\n\t}",
"public String getDirection() {\n return direction;\n }",
"public Direction getCurrentDirection() {\n synchronized (f_lock) {\n return f_currentDirection;\n }\n }",
"@Override\n\tpublic String calculateRightTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}",
"public Vector3D getTrackingDirection(Point3D point, int pdIndex, boolean direction) {\n\n\tint i = (int)( (point.x / xVoxelDim) );\n\tint j = (int)( (point.y / yVoxelDim) );\n\tint k = (int)( (point.z / zVoxelDim) );\n\n\tVector3D[] pds = image.getPDs(i,j,k);\n\n\tif (direction) {\n\t return getTrackingDirection(point, pds[pdIndex]);\n\t}\n\telse {\n\t return getTrackingDirection(point, pds[pdIndex].negated());\n\t}\n\n }",
"public String getDirection() {\r\n return direction;\r\n }",
"public Transaction.DirectionType getDirection() {\n\t\treturn direction;\n\t}",
"public static Direction randomDirection()\n {\n Random randNumGen = RandNumGenerator.getInstance();\n return new Direction(randNumGen.nextInt(FULL_CIRCLE));\n }",
"public Direction getOpposite() {\n if (equals(Direction.NORTH)) return Direction.SOUTH;\n else if (equals(Direction.EAST)) return Direction.WEST;\n else if (equals(Direction.SOUTH)) return Direction.NORTH;\n else if (equals(Direction.WEST)) return Direction.EAST;\n else return null;\n }",
"public MC_Location getLocationAtDirection(MC_DirectionNESWUD dir)\n\t {\n\t\t MC_Location loc = new MC_Location(this);\n\t\t\t\n\t\t\tif(dir == MC_DirectionNESWUD.NORTH) loc.z--; \n\t\t\tif(dir == MC_DirectionNESWUD.SOUTH) loc.z++;\n\t\t\tif(dir == MC_DirectionNESWUD.WEST) loc.x--;\n\t\t\tif(dir == MC_DirectionNESWUD.EAST) loc.x++;\n\t\t\tif(dir == MC_DirectionNESWUD.UP) loc.y++; \n\t\t\tif(dir == MC_DirectionNESWUD.DOWN) loc.y--;\n\n\t\t\treturn loc;\n\t\t}",
"public Movement getDir() {\n\t\treturn dir;\n\t}",
"public Vec4 expectDirection() {\n if(isPoint()) throw new IllegalArgumentException(\"expected direction: \" + this);\n return this;\n }",
"public Direction getCorrectRobotDirection();",
"public Location getAdjacentLocation(char direction)\n\t{\n\t\tswitch (direction) {\n\t\t\tcase 'l': // location to left of current\n\t\t\t\treturn new Location(x - 1, y, Block.EMPTY);\n\t\t\tcase 'r': // location to the right of current\n\t\t\t\treturn new Location(x + 1, y, Block.EMPTY);\n\t\t\tcase 'u': // location above current\n\t\t\t\treturn new Location(x, y - 1, Block.EMPTY);\n\t\t\tcase 'd': // location below current, only option left\n\t\t\tdefault:\n\t\t\t\treturn new Location(x, y + 1, Block.EMPTY);\n\t\t}\n\t}",
"double direction (IPoint other);",
"private static Position getRightBottomNeighbor(Position curr, int side) {\n int newX = curr.getX() + getNumElement(0, side) + getNumSpacePerSide(0, side) + 1;\n int newY = curr.getY() - side;\n return new Position(newX, newY);\n }",
"public static Direction opposite(Direction other) {\r\n\t\t\tif (other == Direction.UP) return Direction.DOWN;\r\n\t\t\telse if (other == Direction.DOWN) return Direction.UP;\r\n\t\t\telse if (other == Direction.LEFT) return Direction.RIGHT;\r\n\t\t\telse return Direction.LEFT;\t// RIGHT\r\n\t\t}",
"public Direction toRight(int deg)\n {\n return new Direction(dirInDegrees + deg);\n }",
"public double getDistanceBetweenEdge(Entity entity) throws IllegalArgumentException{\n \tif(this == entity) throw new IllegalArgumentException(\"this == entity @ getDistanceBetweenEdge\");\n \treturn getDistanceBetweenCenter(entity) - this.getRadius() - entity.getRadius();\n \t\n }",
"public Room goSouth() {\n return goDir(Side.SOUTH);\n }",
"public static Direction getOppositeDirection ( Direction direction ) \r\n\t{\r\n\t\tswitch ( direction )\r\n\t\t{\r\n\t\t\tcase UP: return Direction.DOWN; \r\n\t\t\tcase DOWN: return Direction.UP; \r\n\t\t\tcase LEFT: return Direction.RIGHT; \r\n\t\t\tcase RIGHT: return Direction.LEFT; \r\n\t\t}\r\n\t\treturn Direction.NONE;\r\n\t}",
"public String getSide() {\r\n return side;\r\n }"
] | [
"0.5993839",
"0.59481895",
"0.5938546",
"0.5789631",
"0.573445",
"0.57256037",
"0.57029736",
"0.56948566",
"0.5675382",
"0.56609154",
"0.56599605",
"0.5624653",
"0.5615822",
"0.56102556",
"0.55922794",
"0.55821383",
"0.5529905",
"0.552799",
"0.55245477",
"0.5519573",
"0.5517479",
"0.5488256",
"0.54202205",
"0.54007906",
"0.5390246",
"0.5378238",
"0.5372731",
"0.5366469",
"0.5358745",
"0.5348387",
"0.5321347",
"0.5303922",
"0.52947915",
"0.52947915",
"0.52947915",
"0.5275698",
"0.52755713",
"0.52371335",
"0.52218676",
"0.52144504",
"0.5211725",
"0.5205968",
"0.5175948",
"0.5174929",
"0.5169203",
"0.51173645",
"0.5116255",
"0.51159567",
"0.51051164",
"0.51028675",
"0.510006",
"0.5081422",
"0.5073487",
"0.5069439",
"0.50677943",
"0.5050113",
"0.50434613",
"0.50393194",
"0.50368756",
"0.5035794",
"0.50314534",
"0.50296944",
"0.50296944",
"0.50283027",
"0.5021278",
"0.50051737",
"0.50043035",
"0.5003445",
"0.50006354",
"0.49981546",
"0.49951968",
"0.49931726",
"0.49921829",
"0.49921829",
"0.49918354",
"0.49815175",
"0.49808893",
"0.496583",
"0.49646935",
"0.49640515",
"0.49560717",
"0.49509692",
"0.49413106",
"0.49356747",
"0.49265495",
"0.4910799",
"0.49067467",
"0.490113",
"0.48983037",
"0.48862866",
"0.48847663",
"0.4877823",
"0.48727533",
"0.48669106",
"0.4857725",
"0.4851253",
"0.48507234",
"0.48475942",
"0.4845039",
"0.48391107"
] | 0.7331426 | 0 |
/ JADX WARNING: Code restructure failed: missing block: B:10:0x002e, code lost: if (kotlin.jvm.internal.C8271i.m35384a((java.lang.Object) r2.avatar, (java.lang.Object) r3.avatar) != false) goto L_0x0033; | public boolean equals(java.lang.Object r3) {
/*
r2 = this;
if (r2 == r3) goto L_0x0033
boolean r0 = r3 instanceof com.jiayouya.travel.module.common.data.AliUserRsp
if (r0 == 0) goto L_0x0031
com.jiayouya.travel.module.common.data.AliUserRsp r3 = (com.jiayouya.travel.module.common.data.AliUserRsp) r3
java.lang.String r0 = r2.uid
java.lang.String r1 = r3.uid
boolean r0 = kotlin.jvm.internal.C8271i.m35384a(r0, r1)
if (r0 == 0) goto L_0x0031
java.lang.String r0 = r2.nickname
java.lang.String r1 = r3.nickname
boolean r0 = kotlin.jvm.internal.C8271i.m35384a(r0, r1)
if (r0 == 0) goto L_0x0031
java.lang.String r0 = r2.city
java.lang.String r1 = r3.city
boolean r0 = kotlin.jvm.internal.C8271i.m35384a(r0, r1)
if (r0 == 0) goto L_0x0031
java.lang.String r0 = r2.avatar
java.lang.String r3 = r3.avatar
boolean r3 = kotlin.jvm.internal.C8271i.m35384a(r0, r3)
if (r3 == 0) goto L_0x0031
goto L_0x0033
L_0x0031:
r3 = 0
return r3
L_0x0033:
r3 = 1
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: com.jiayouya.travel.module.common.data.AliUserRsp.equals(java.lang.Object):boolean");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }",
"private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }",
"@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }",
"protected static android.graphics.Bitmap m6543a(int r1, int r2) {\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/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.graphics.Bitmap.Config.ARGB_8888;\t Catch:{ OutOfMemoryError -> 0x0007 }\n r0 = android.graphics.Bitmap.createBitmap(r1, r2, r0);\t Catch:{ OutOfMemoryError -> 0x0007 }\n return r0;\n L_0x0007:\n java.lang.System.gc();\n r0 = android.graphics.Bitmap.Config.ARGB_8888;\n r1 = android.graphics.Bitmap.createBitmap(r1, r2, r0);\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.a(int, int):android.graphics.Bitmap\");\n }",
"private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }",
"private android.graphics.Bitmap m6555f() {\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/79094208.run(Unknown Source)\n*/\n /*\n r5 = this;\n r0 = r5.getWidth();\n r1 = r5.getHeight();\n r2 = m6543a(r0, r1);\t Catch:{ OutOfMemoryError -> 0x000d }\n return r2;\n L_0x000d:\n r2 = \"ShimmerFrameLayout failed to create working bitmap\";\n r3 = new java.lang.StringBuilder;\n r3.<init>(r2);\n r2 = \" (width = \";\n r3.append(r2);\n r3.append(r0);\n r0 = \", height = \";\n r3.append(r0);\n r3.append(r1);\n r0 = \")\\n\\n\";\n r3.append(r0);\n r0 = java.lang.Thread.currentThread();\n r0 = r0.getStackTrace();\n r1 = r0.length;\n r2 = 0;\n L_0x0033:\n if (r2 >= r1) goto L_0x0046;\n L_0x0035:\n r4 = r0[r2];\n r4 = r4.toString();\n r3.append(r4);\n r4 = \"\\n\";\n r3.append(r4);\n r2 = r2 + 1;\n goto L_0x0033;\n L_0x0046:\n r0 = r3.toString();\n r1 = \"ShimmerFrameLayout\";\n android.util.Log.d(r1, r0);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.f():android.graphics.Bitmap\");\n }",
"private final void m110460au() {\n /*\n r6 = this;\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n if (r0 == 0) goto L_0x003e\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n java.lang.String r1 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.base.model.UrlModel r0 = r0.getAvatarMedium()\n if (r0 != 0) goto L_0x0024\n goto L_0x003e\n L_0x0024:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.profile.model.User r1 = r1.getAuthor()\n java.lang.String r2 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.base.model.UrlModel r1 = r1.getAvatarMedium()\n com.p280ss.android.ugc.aweme.base.C23323e.m76524b(r0, r1)\n goto L_0x004a\n L_0x003e:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n r1 = 2131232103(0x7f080567, float:1.8080306E38)\n com.ss.android.ugc.aweme.base.model.AppImageUri r1 = com.p280ss.android.ugc.aweme.base.model.AppImageUri.m76615a(r1)\n com.p280ss.android.ugc.aweme.base.C23323e.m76504a(r0, r1)\n L_0x004a:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25352e.m83221d(r0)\n if (r0 != 0) goto L_0x0053\n return\n L_0x0053:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n r1 = 3\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25300bx.m83125a(r0, r1)\n r1 = 0\n if (r0 == 0) goto L_0x00a2\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x007b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x007b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x007b\n java.lang.String r2 = r2.adTitle\n goto L_0x007c\n L_0x007b:\n r2 = r1\n L_0x007c:\n if (r2 != 0) goto L_0x0081\n java.lang.String r2 = \"\"\n goto L_0x009c\n L_0x0081:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x009b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x009b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x009b\n java.lang.String r2 = r2.adTitle\n goto L_0x009c\n L_0x009b:\n r2 = r1\n L_0x009c:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n goto L_0x00d0\n L_0x00a2:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n if (r2 != 0) goto L_0x00b8\n java.lang.String r2 = \"\"\n L_0x00b5:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n goto L_0x00cd\n L_0x00b8:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n java.lang.String r3 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getNickname()\n goto L_0x00b5\n L_0x00cd:\n r0.setText(r2)\n L_0x00d0:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x00e2\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x00e3\n L_0x00e2:\n r0 = r1\n L_0x00e3:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n r2 = 1082130432(0x40800000, float:4.0)\n r3 = 8\n if (r0 == 0) goto L_0x011b\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x00ff\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x00ff:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x011b\n android.widget.LinearLayout r0 = r6.f89217bk\n if (r0 == 0) goto L_0x0113\n r0.setVisibility(r3)\n L_0x0113:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x011b\n r4 = 2\n r0.setMaxLines(r4)\n L_0x011b:\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x013b\n com.ss.android.ugc.aweme.feed.model.Aweme r4 = r6.f77546j\n java.lang.String r5 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r4 = r4.getAwemeRawAd()\n if (r4 != 0) goto L_0x012f\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x012f:\n java.lang.String r5 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n float r4 = r4.getAppLike()\n r0.setRatingProgress(r4)\n L_0x013b:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x014b\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x014b:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x0166\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x015f\n r0.setVisibility(r3)\n L_0x015f:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x0166\n r0.setVisibility(r3)\n L_0x0166:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x0178\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x0179\n L_0x0178:\n r0 = r1\n L_0x0179:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 == 0) goto L_0x0190\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x0188\n r0.setVisibility(r3)\n L_0x0188:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x01ac\n r0.setVisibility(r3)\n goto L_0x01ac\n L_0x0190:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x01ac\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x01a6\n java.lang.String r2 = r2.getAppInstall()\n goto L_0x01a7\n L_0x01a6:\n r2 = r1\n L_0x01a7:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01ac:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n java.lang.String r0 = r0.getDesc()\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 != 0) goto L_0x0212\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x01d3\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getDesc()\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01d3:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x01e4\n java.lang.String r1 = r0.getAdMoreTextual()\n L_0x01e4:\n java.lang.CharSequence r1 = (java.lang.CharSequence) r1\n boolean r0 = android.text.TextUtils.isEmpty(r1)\n if (r0 != 0) goto L_0x021a\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x0211\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r1 = r1.getAwemeRawAd()\n if (r1 != 0) goto L_0x0200\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x0200:\n java.lang.String r2 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n java.lang.String r1 = r1.getAdMoreTextual()\n java.lang.String r2 = \"mAweme.awemeRawAd!!.adMoreTextual\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n r0.setMoreString(r1)\n L_0x0211:\n return\n L_0x0212:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x021a\n r0.setVisibility(r3)\n return\n L_0x021a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.newfollow.p1424vh.CommercialFlowFeedViewHolder.m110460au():void\");\n }",
"public void mo2485a() {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }",
"private void m14210a(java.io.IOException r4, java.io.IOException r5) {\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 r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }",
"public boolean mo3969a() {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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 r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }",
"public long mo915b() {\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.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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 r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }",
"public void run() {\n /*\n r8 = this;\n r1 = com.umeng.commonsdk.proguard.b.b;\t Catch:{ Throwable -> 0x00c9 }\n monitor-enter(r1);\t Catch:{ Throwable -> 0x00c9 }\n r0 = r8.a;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x0009:\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x000d:\n r0 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n if (r0 != 0) goto L_0x00c4;\n L_0x0013:\n r0 = 1;\n com.umeng.commonsdk.proguard.b.a = r0;\t Catch:{ all -> 0x00c6 }\n r0 = \"walle-crash\";\n r2 = 1;\n r2 = new java.lang.Object[r2];\t Catch:{ all -> 0x00c6 }\n r3 = 0;\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r4.<init>();\t Catch:{ all -> 0x00c6 }\n r5 = \"report thread is \";\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r5 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r4 = r4.toString();\t Catch:{ all -> 0x00c6 }\n r2[r3] = r4;\t Catch:{ all -> 0x00c6 }\n com.umeng.commonsdk.statistics.common.e.a(r0, r2);\t Catch:{ all -> 0x00c6 }\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n r0 = com.umeng.commonsdk.proguard.c.a(r0);\t Catch:{ all -> 0x00c6 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x00c6 }\n if (r2 != 0) goto L_0x00c4;\n L_0x0045:\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r3.getFilesDir();\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"stateless\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"umpx_internal\";\n r3 = r3.getBytes();\t Catch:{ all -> 0x00c6 }\n r4 = 0;\n r3 = android.util.Base64.encodeToString(r3, r4);\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r2 = r2.toString();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r4 = 10;\n com.umeng.commonsdk.stateless.f.a(r3, r2, r4);\t Catch:{ all -> 0x00c6 }\n r2 = new com.umeng.commonsdk.stateless.UMSLEnvelopeBuild;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r2.buildSLBaseHeader(r3);\t Catch:{ all -> 0x00c6 }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"content\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = \"ts\";\n r6 = java.lang.System.currentTimeMillis();\t Catch:{ JSONException -> 0x00cb }\n r4.put(r0, r6);\t Catch:{ JSONException -> 0x00cb }\n r0 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r0.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"crash\";\n r0.put(r5, r4);\t Catch:{ JSONException -> 0x00cb }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"tp\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = r8.a;\t Catch:{ JSONException -> 0x00cb }\n r5 = \"umpx_internal\";\n r0 = r2.buildSLEnvelope(r0, r3, r4, r5);\t Catch:{ JSONException -> 0x00cb }\n if (r0 == 0) goto L_0x00c4;\n L_0x00bc:\n r2 = \"exception\";\n r0 = r0.has(r2);\t Catch:{ JSONException -> 0x00cb }\n if (r0 != 0) goto L_0x00c4;\n L_0x00c4:\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n L_0x00c5:\n return;\n L_0x00c6:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n throw r0;\t Catch:{ Throwable -> 0x00c9 }\n L_0x00c9:\n r0 = move-exception;\n goto L_0x00c5;\n L_0x00cb:\n r0 = move-exception;\n goto L_0x00c4;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.umeng.commonsdk.proguard.bb.run():void\");\n }",
"static void m13383b() {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }",
"public void mo3613a() {\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.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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 r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }",
"@java.lang.Deprecated\n /* renamed from: a */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static synchronized void m13804a(android.content.Context r3, com.facebook.C6787r.C6788a r4) {\n /*\n java.lang.Class<com.facebook.r> r0 = com.facebook.C6787r.class\n monitor-enter(r0)\n java.lang.Boolean r1 = f12487s // Catch:{ all -> 0x0088 }\n boolean r1 = r1.booleanValue() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0012\n if (r4 == 0) goto L_0x0010\n r4.mo20141a() // Catch:{ all -> 0x0088 }\n L_0x0010:\n monitor-exit(r0)\n return\n L_0x0012:\n java.lang.String r1 = \"applicationContext\"\n com.facebook.internal.C6697T.m13461a(r3, r1) // Catch:{ all -> 0x0088 }\n r1 = 0\n com.facebook.internal.C6697T.m13460a(r3, r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6697T.m13466b(r3, r1) // Catch:{ all -> 0x0088 }\n android.content.Context r1 = r3.getApplicationContext() // Catch:{ all -> 0x0088 }\n f12481m = r1 // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n m13810b(r1) // Catch:{ all -> 0x0088 }\n java.lang.String r1 = f12472d // Catch:{ all -> 0x0088 }\n boolean r1 = com.facebook.internal.C6694S.m13436b(r1) // Catch:{ all -> 0x0088 }\n if (r1 != 0) goto L_0x0080\n r1 = 1\n java.lang.Boolean r1 = java.lang.Boolean.valueOf(r1) // Catch:{ all -> 0x0088 }\n f12487s = r1 // Catch:{ all -> 0x0088 }\n boolean r1 = m13817g() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0041\n m13812c() // Catch:{ all -> 0x0088 }\n L_0x0041:\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n boolean r1 = r1 instanceof android.app.Application // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n boolean r1 = com.facebook.C6557O.m12974e() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n android.app.Application r1 = (android.app.Application) r1 // Catch:{ all -> 0x0088 }\n java.lang.String r2 = f12472d // Catch:{ all -> 0x0088 }\n com.facebook.p127a.p130b.C6602h.m13083a(r1, r2) // Catch:{ all -> 0x0088 }\n L_0x0056:\n com.facebook.internal.C6670D.m13313f() // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6678J.m13355d() // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6712c.m13522a(r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.G r1 = new com.facebook.internal.G // Catch:{ all -> 0x0088 }\n com.facebook.o r2 = new com.facebook.o // Catch:{ all -> 0x0088 }\n r2.<init>() // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n f12480l = r1 // Catch:{ all -> 0x0088 }\n java.util.concurrent.FutureTask r1 = new java.util.concurrent.FutureTask // Catch:{ all -> 0x0088 }\n com.facebook.p r2 = new com.facebook.p // Catch:{ all -> 0x0088 }\n r2.<init>(r4, r3) // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n java.util.concurrent.Executor r2 = m13822l() // Catch:{ all -> 0x0088 }\n r2.execute(r1) // Catch:{ all -> 0x0088 }\n monitor-exit(r0)\n return\n L_0x0080:\n com.facebook.FacebookException r1 = new com.facebook.FacebookException // Catch:{ all -> 0x0088 }\n java.lang.String r2 = \"A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk.setApplicationId before initializing the sdk.\"\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n throw r1 // Catch:{ all -> 0x0088 }\n L_0x0088:\n r3 = move-exception\n monitor-exit(r0)\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.C6787r.m13804a(android.content.Context, com.facebook.r$a):void\");\n }",
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void m14047a(@javax.annotation.Nullable okhttp3.internal.p155a.C2918d.C2915a r1) {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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 = this;\n if (r1 == 0) goto L_0x0005;\n L_0x0002:\n r1.m14100c();\t Catch:{ IOException -> 0x0005 }\n L_0x0005:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.internal.a.d$a):void\");\n }",
"public static boolean m19464a(java.lang.String r3, int[] r4) {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }",
"private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }",
"private final com.google.wireless.android.finsky.dfe.p515h.p516a.ae m35733b(com.google.protobuf.nano.C7213a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.m33550a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 18: goto L_0x001f;\n case 26: goto L_0x002c;\n case 34: goto L_0x0039;\n case 42: goto L_0x004a;\n case 50: goto L_0x0057;\n case 56: goto L_0x0064;\n case 64: goto L_0x00a3;\n case 72: goto L_0x00b1;\n case 82: goto L_0x00bf;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r6.f38026c;\n if (r0 != 0) goto L_0x0019;\n L_0x0012:\n r0 = new com.google.android.finsky.cv.a.bd;\n r0.<init>();\n r6.f38026c = r0;\n L_0x0019:\n r0 = r6.f38026c;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x001f:\n r0 = r7.m33564f();\n r6.f38027d = r0;\n r0 = r6.f38025b;\n r0 = r0 | 1;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x002c:\n r0 = r7.m33564f();\n r6.f38028e = r0;\n r0 = r6.f38025b;\n r0 = r0 | 2;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0039:\n r0 = r6.f38029f;\n if (r0 != 0) goto L_0x0044;\n L_0x003d:\n r0 = new com.google.android.finsky.cv.a.ax;\n r0.<init>();\n r6.f38029f = r0;\n L_0x0044:\n r0 = r6.f38029f;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x004a:\n r0 = r7.m33564f();\n r6.f38030g = r0;\n r0 = r6.f38025b;\n r0 = r0 | 4;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0057:\n r0 = r7.m33564f();\n r6.f38031h = r0;\n r0 = r6.f38025b;\n r0 = r0 | 8;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0064:\n r1 = r6.f38025b;\n r1 = r1 | 16;\n r6.f38025b = r1;\n r1 = r7.m33573o();\n r2 = r7.m33567i();\t Catch:{ IllegalArgumentException -> 0x0090 }\n switch(r2) {\n case 0: goto L_0x0099;\n case 1: goto L_0x0099;\n case 2: goto L_0x0099;\n case 3: goto L_0x0099;\n case 4: goto L_0x0099;\n default: goto L_0x0075;\n };\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0075:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = 36;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = \" is not a valid enum Type\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0090 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0090:\n r2 = move-exception;\n r7.m33562e(r1);\n r6.a(r7, r0);\n goto L_0x0000;\n L_0x0099:\n r6.f38032i = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r6.f38025b;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2 | 16;\n r6.f38025b = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n goto L_0x0000;\n L_0x00a3:\n r0 = r7.m33563e();\n r6.f38033j = r0;\n r0 = r6.f38025b;\n r0 = r0 | 32;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00b1:\n r0 = r7.m33563e();\n r6.f38034k = r0;\n r0 = r6.f38025b;\n r0 = r0 | 64;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00bf:\n r0 = r6.f38035l;\n if (r0 != 0) goto L_0x00ca;\n L_0x00c3:\n r0 = new com.google.android.finsky.cv.a.cv;\n r0.<init>();\n r6.f38035l = r0;\n L_0x00ca:\n r0 = r6.f38035l;\n r7.m33552a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.h.a.ae.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.h.a.ae\");\n }",
"public void run() {\n /*\n r6 = this;\n com.android.camera.imageprocessor.FrameProcessor r0 = com.android.camera.imageprocessor.FrameProcessor.this\n java.lang.Object r0 = r0.mAllocationLock\n monitor-enter(r0)\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n boolean r1 = r1.mIsActive // Catch:{ all -> 0x0077 }\n if (r1 != 0) goto L_0x0011\n monitor-exit(r0) // Catch:{ all -> 0x0077 }\n return\n L_0x0011:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mInputAllocation // Catch:{ all -> 0x0077 }\n if (r1 != 0) goto L_0x0027\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n int r2 = r6.stride // Catch:{ all -> 0x0077 }\n int r3 = r6.height // Catch:{ all -> 0x0077 }\n int r4 = r6.stride // Catch:{ all -> 0x0077 }\n int r5 = r6.width // Catch:{ all -> 0x0077 }\n int r4 = r4 - r5\n r1.createAllocation(r2, r3, r4) // Catch:{ all -> 0x0077 }\n L_0x0027:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mInputAllocation // Catch:{ all -> 0x0077 }\n byte[] r2 = r6.yvuBytes // Catch:{ all -> 0x0077 }\n r1.copyFrom(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.ScriptC_rotator r1 = r1.mRsRotator // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r2 = r2.mInputAllocation // Catch:{ all -> 0x0077 }\n r1.forEach_rotate90andMerge(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.ScriptC_YuvToRgb r1 = r1.mRsYuvToRGB // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r2 = r2.mOutputAllocation // Catch:{ all -> 0x0077 }\n r1.forEach_nv21ToRgb(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mOutputAllocation // Catch:{ all -> 0x0077 }\n r1.ioSend() // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mVideoOutputAllocation // Catch:{ all -> 0x0077 }\n if (r1 == 0) goto L_0x0075\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mVideoOutputAllocation // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r2 = r2.mOutputAllocation // Catch:{ all -> 0x0077 }\n r1.copyFrom(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r6 = r6.mVideoOutputAllocation // Catch:{ all -> 0x0077 }\n r6.ioSend() // Catch:{ all -> 0x0077 }\n L_0x0075:\n monitor-exit(r0) // Catch:{ all -> 0x0077 }\n return\n L_0x0077:\n r6 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0077 }\n throw r6\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.camera.imageprocessor.FrameProcessor.ProcessingTask.run():void\");\n }",
"public final void mo56977b() {\n /*\n r2 = this;\n com.ss.android.ugc.aweme.common.e r0 = r2.f67572c\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.i r0 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28951i) r0\n if (r0 == 0) goto L_0x001a\n com.ss.android.ugc.aweme.common.a r1 = r2.f67571b\n com.ss.android.ugc.aweme.feed.ui.masklayer2.a.d r1 = (com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28944d) r1\n if (r1 == 0) goto L_0x0014\n java.lang.Object r1 = r1.getData()\n java.lang.String r1 = (java.lang.String) r1\n if (r1 != 0) goto L_0x0016\n L_0x0014:\n java.lang.String r1 = \"\"\n L_0x0016:\n r0.mo74240a(r1)\n return\n L_0x001a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.feed.p1238ui.masklayer2.p1239a.C28946e.mo56977b():void\");\n }",
"private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }",
"public final void run() {\n /*\n r10 = this;\n r8 = 2;\n r7 = 1;\n r6 = 0;\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n r1 = 0;\n r0 = r10.e;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r3 = r10.f;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r0 = com.uc.apollo.media.b.c.a(r0, r3);\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n if (r0 == 0) goto L_0x004b;\n L_0x0010:\n r2 = com.uc.apollo.media.impl.O.M3U8;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n r1 = r0.c();\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n if (r1 == 0) goto L_0x00db;\n L_0x0018:\n r1 = com.uc.apollo.media.impl.O.M3U8_LIVE;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n L_0x001a:\n r2 = r10.h;\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n if (r2 == 0) goto L_0x0022;\n L_0x001e:\n r2 = 1;\n r0.a(r2);\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n L_0x0022:\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r1 == r2) goto L_0x0030;\n L_0x0026:\n r2 = new java.lang.StringBuilder;\n r3 = \"content type is \";\n r2.<init>(r3);\n r2.append(r1);\n L_0x0030:\n r2 = r10.g;\n if (r2 == 0) goto L_0x004a;\n L_0x0034:\n r2 = c;\n r3 = r10.d;\n r4 = 3;\n r4 = new java.lang.Object[r4];\n r5 = r10.g;\n r4[r6] = r5;\n r4[r7] = r1;\n r4[r8] = r0;\n r0 = r2.obtainMessage(r8, r3, r6, r4);\n r0.sendToTarget();\n L_0x004a:\n return;\n L_0x004b:\n r0 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0051:\n r0 = move-exception;\n r9 = r0;\n r0 = r2;\n r2 = r9;\n L_0x0055:\n r3 = r2.a();\n if (r3 == 0) goto L_0x007e;\n L_0x005b:\n r4 = r3.length;\n r5 = 8;\n if (r4 < r5) goto L_0x007e;\n L_0x0060:\n r4 = 4;\n r4 = r3[r4];\n r5 = 102; // 0x66 float:1.43E-43 double:5.04E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0067:\n r4 = 5;\n r4 = r3[r4];\n r5 = 116; // 0x74 float:1.63E-43 double:5.73E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x006e:\n r4 = 6;\n r4 = r3[r4];\n r5 = 121; // 0x79 float:1.7E-43 double:6.0E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0075:\n r4 = 7;\n r3 = r3[r4];\n r4 = 112; // 0x70 float:1.57E-43 double:5.53E-322;\n if (r3 != r4) goto L_0x007e;\n L_0x007c:\n r0 = com.uc.apollo.media.impl.O.MP4;\n L_0x007e:\n r3 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r0 != r3) goto L_0x008c;\n L_0x0082:\n r3 = new java.lang.StringBuilder;\n r4 = \"parse failure, msg: \";\n r3.<init>(r4);\n r3.append(r2);\n L_0x008c:\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0090:\n r0 = move-exception;\n r1 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\n r1 = a;\n r2 = new java.lang.StringBuilder;\n r3 = \"parse failure: \";\n r2.<init>(r3);\n r2 = r2.append(r0);\n r2 = r2.toString();\n android.util.Log.w(r1, r2);\n r1 = r10.g;\n if (r1 == 0) goto L_0x004a;\n L_0x00ab:\n r1 = c;\n r2 = r10.d;\n r3 = new java.lang.Object[r8];\n r4 = r10.g;\n r3[r6] = r4;\n r4 = new java.lang.StringBuilder;\n r5 = \"parse failure: \";\n r4.<init>(r5);\n r0 = r4.append(r0);\n r0 = r0.toString();\n r3[r7] = r0;\n r0 = r1.obtainMessage(r7, r2, r6, r3);\n r0.sendToTarget();\n goto L_0x004a;\n L_0x00cf:\n r1 = move-exception;\n r9 = r1;\n r1 = r0;\n r0 = r2;\n r2 = r9;\n goto L_0x0055;\n L_0x00d5:\n r2 = move-exception;\n r9 = r0;\n r0 = r1;\n r1 = r9;\n goto L_0x0055;\n L_0x00db:\n r1 = r2;\n goto L_0x001a;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.uc.apollo.media.impl.f.run():void\");\n }",
"protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private final com.google.android.finsky.verifier.p259a.p260a.C4709m m21920b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x0015;\n case 26: goto L_0x0046;\n case 34: goto L_0x0053;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f24221c = r0;\n goto L_0x0000;\n L_0x0015:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r2) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0020;\n case 2: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = 44;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = \" is not a valid enum ResourceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x0043:\n r6.f24222d = r2;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0000;\n L_0x0046:\n r0 = r7.g();\n r6.f24223e = r0;\n r0 = r6.f24220b;\n r0 = r0 | 1;\n r6.f24220b = r0;\n goto L_0x0000;\n L_0x0053:\n r0 = r7.f();\n r6.f24224f = r0;\n r0 = r6.f24220b;\n r0 = r0 | 2;\n r6.f24220b = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.finsky.verifier.a.a.m.b(com.google.protobuf.nano.a):com.google.android.finsky.verifier.a.a.m\");\n }",
"private android.graphics.Bitmap m14713a(com.clevertap.android.sdk.C3072b1 r18, com.clevertap.android.sdk.C3072b1 r19) {\n /*\n r17 = this;\n r0 = r17\n r1 = r18\n r2 = r19\n int[] r10 = r0.f10958m\n r11 = 0\n if (r2 != 0) goto L_0x000e\n java.util.Arrays.fill(r10, r11)\n L_0x000e:\n r12 = 3\n r13 = 2\n r14 = 1\n if (r2 == 0) goto L_0x005e\n int r3 = r2.f10976g\n if (r3 <= 0) goto L_0x005e\n if (r3 != r13) goto L_0x0037\n boolean r3 = r1.f10975f\n if (r3 != 0) goto L_0x002c\n com.clevertap.android.sdk.c1 r3 = r0.f10961p\n int r4 = r3.f11004l\n int[] r5 = r1.f10980k\n if (r5 == 0) goto L_0x0033\n int r3 = r3.f11002j\n int r5 = r1.f10977h\n if (r3 != r5) goto L_0x0033\n goto L_0x0032\n L_0x002c:\n int r3 = r0.f10959n\n if (r3 != 0) goto L_0x0032\n r0.f10969x = r14\n L_0x0032:\n r4 = 0\n L_0x0033:\n r0.m14716a(r10, r2, r4)\n goto L_0x005e\n L_0x0037:\n if (r3 != r12) goto L_0x005e\n android.graphics.Bitmap r3 = r0.f10963r\n if (r3 != 0) goto L_0x0041\n r0.m14716a(r10, r2, r11)\n goto L_0x005e\n L_0x0041:\n int r4 = r2.f10973d\n int r5 = r0.f10966u\n int r9 = r4 / r5\n int r4 = r2.f10971b\n int r7 = r4 / r5\n int r4 = r2.f10972c\n int r8 = r4 / r5\n int r2 = r2.f10970a\n int r6 = r2 / r5\n int r5 = r0.f10968w\n int r2 = r7 * r5\n int r4 = r2 + r6\n r2 = r3\n r3 = r10\n r2.getPixels(r3, r4, r5, r6, r7, r8, r9)\n L_0x005e:\n r17.m14715a(r18)\n int r2 = r1.f10973d\n int r3 = r0.f10966u\n int r2 = r2 / r3\n int r4 = r1.f10971b\n int r4 = r4 / r3\n int r5 = r1.f10972c\n int r5 = r5 / r3\n int r6 = r1.f10970a\n int r6 = r6 / r3\n r3 = 8\n int r7 = r0.f10959n\n if (r7 != 0) goto L_0x0077\n r7 = 1\n goto L_0x0078\n L_0x0077:\n r7 = 0\n L_0x0078:\n r3 = 0\n r8 = 1\n r9 = 8\n L_0x007c:\n if (r11 >= r2) goto L_0x0100\n boolean r15 = r1.f10974e\n if (r15 == 0) goto L_0x0098\n r15 = 4\n if (r3 < r2) goto L_0x0095\n int r8 = r8 + 1\n if (r8 == r13) goto L_0x0094\n if (r8 == r12) goto L_0x0091\n if (r8 == r15) goto L_0x008e\n goto L_0x0095\n L_0x008e:\n r3 = 1\n r9 = 2\n goto L_0x0095\n L_0x0091:\n r3 = 2\n r9 = 4\n goto L_0x0095\n L_0x0094:\n r3 = 4\n L_0x0095:\n int r15 = r3 + r9\n goto L_0x009a\n L_0x0098:\n r15 = r3\n r3 = r11\n L_0x009a:\n int r3 = r3 + r4\n int r12 = r0.f10967v\n if (r3 >= r12) goto L_0x00f0\n int r12 = r0.f10968w\n int r3 = r3 * r12\n int r16 = r3 + r6\n int r13 = r16 + r5\n int r14 = r3 + r12\n if (r14 >= r13) goto L_0x00ad\n int r13 = r3 + r12\n L_0x00ad:\n int r3 = r0.f10966u\n int r12 = r11 * r3\n int r14 = r1.f10972c\n int r12 = r12 * r14\n int r14 = r13 - r16\n int r14 = r14 * r3\n int r14 = r14 + r12\n r3 = r16\n L_0x00bc:\n if (r3 >= r13) goto L_0x00f0\n r19 = r2\n int r2 = r0.f10966u\n r16 = r4\n r4 = 1\n if (r2 != r4) goto L_0x00d2\n byte[] r2 = r0.f10957l\n byte r2 = r2[r12]\n r2 = r2 & 255(0xff, float:3.57E-43)\n int[] r4 = r0.f10946a\n r2 = r4[r2]\n goto L_0x00d8\n L_0x00d2:\n int r2 = r1.f10972c\n int r2 = r0.m14712a(r12, r14, r2)\n L_0x00d8:\n if (r2 == 0) goto L_0x00dd\n r10[r3] = r2\n goto L_0x00e6\n L_0x00dd:\n boolean r2 = r0.f10969x\n if (r2 != 0) goto L_0x00e6\n if (r7 == 0) goto L_0x00e6\n r2 = 1\n r0.f10969x = r2\n L_0x00e6:\n int r2 = r0.f10966u\n int r12 = r12 + r2\n int r3 = r3 + 1\n r2 = r19\n r4 = r16\n goto L_0x00bc\n L_0x00f0:\n r19 = r2\n r16 = r4\n int r11 = r11 + 1\n r2 = r19\n r3 = r15\n r4 = r16\n r12 = 3\n r13 = 2\n r14 = 1\n goto L_0x007c\n L_0x0100:\n boolean r2 = r0.f10964s\n if (r2 == 0) goto L_0x0123\n int r1 = r1.f10976g\n if (r1 == 0) goto L_0x010b\n r2 = 1\n if (r1 != r2) goto L_0x0123\n L_0x010b:\n android.graphics.Bitmap r1 = r0.f10963r\n if (r1 != 0) goto L_0x0115\n android.graphics.Bitmap r1 = r17.m14718q()\n r0.f10963r = r1\n L_0x0115:\n android.graphics.Bitmap r1 = r0.f10963r\n r3 = 0\n int r7 = r0.f10968w\n r5 = 0\n r6 = 0\n int r8 = r0.f10967v\n r2 = r10\n r4 = r7\n r1.setPixels(r2, r3, r4, r5, r6, r7, r8)\n L_0x0123:\n android.graphics.Bitmap r9 = r17.m14718q()\n r3 = 0\n int r7 = r0.f10968w\n r5 = 0\n r6 = 0\n int r8 = r0.f10967v\n r1 = r9\n r2 = r10\n r4 = r7\n r1.setPixels(r2, r3, r4, r5, r6, r7, r8)\n return r9\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.clevertap.android.sdk.C3068a1.m14713a(com.clevertap.android.sdk.b1, com.clevertap.android.sdk.b1):android.graphics.Bitmap\");\n }",
"@android.support.annotation.RequiresApi(api = 23)\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final synchronized void b(boolean r11) {\n /*\n r10 = this;\n monitor-enter(r10)\n r8 = 1\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x004b }\n java.lang.Byte r2 = java.lang.Byte.valueOf(r11) // Catch:{ all -> 0x004b }\n r9 = 0\n r1[r9] = r2 // Catch:{ all -> 0x004b }\n com.meituan.robust.ChangeQuickRedirect r3 = f29525a // Catch:{ all -> 0x004b }\n r4 = 0\n r5 = 16804(0x41a4, float:2.3547E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x004b }\n java.lang.Class r2 = java.lang.Boolean.TYPE // Catch:{ all -> 0x004b }\n r6[r9] = r2 // Catch:{ all -> 0x004b }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x004b }\n r2 = r10\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x004b }\n if (r1 == 0) goto L_0x003a\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x004b }\n java.lang.Byte r0 = java.lang.Byte.valueOf(r11) // Catch:{ all -> 0x004b }\n r1[r9] = r0 // Catch:{ all -> 0x004b }\n com.meituan.robust.ChangeQuickRedirect r3 = f29525a // Catch:{ all -> 0x004b }\n r4 = 0\n r5 = 16804(0x41a4, float:2.3547E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x004b }\n java.lang.Class r0 = java.lang.Boolean.TYPE // Catch:{ all -> 0x004b }\n r6[r9] = r0 // Catch:{ all -> 0x004b }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x004b }\n r2 = r10\n com.meituan.robust.PatchProxy.accessDispatch(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x004b }\n monitor-exit(r10)\n return\n L_0x003a:\n com.ss.android.medialib.camera.IESCameraInterface r1 = r10.f29527c // Catch:{ all -> 0x004b }\n boolean r1 = r1 instanceof com.ss.android.medialib.camera.IESHwCamera // Catch:{ all -> 0x004b }\n if (r1 == 0) goto L_0x0049\n com.ss.android.medialib.camera.IESCameraInterface r1 = r10.f29527c // Catch:{ all -> 0x004b }\n com.ss.android.medialib.camera.IESHwCamera r1 = (com.ss.android.medialib.camera.IESHwCamera) r1 // Catch:{ all -> 0x004b }\n r1.c((boolean) r11) // Catch:{ all -> 0x004b }\n r10.n = r11 // Catch:{ all -> 0x004b }\n L_0x0049:\n monitor-exit(r10)\n return\n L_0x004b:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.medialib.camera.g.b(boolean):void\");\n }",
"public java.lang.Object mo13025a(boolean r18, kotlin.coroutines.Continuation<? super kotlin.Unit> r19) {\n /*\n r17 = this;\n r0 = r17\n r1 = r19\n boolean r2 = r1 instanceof p008c.p009a.p024e.p026b.C0963b.C0971h\n if (r2 == 0) goto L_0x0017\n r2 = r1\n c.a.e.b.b$h r2 = (p008c.p009a.p024e.p026b.C0963b.C0971h) r2\n int r3 = r2.f1092b\n r4 = -2147483648(0xffffffff80000000, float:-0.0)\n r5 = r3 & r4\n if (r5 == 0) goto L_0x0017\n int r3 = r3 - r4\n r2.f1092b = r3\n goto L_0x001c\n L_0x0017:\n c.a.e.b.b$h r2 = new c.a.e.b.b$h\n r2.<init>(r0, r1)\n L_0x001c:\n java.lang.Object r1 = r2.f1091a\n java.lang.Object r9 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r3 = r2.f1092b\n r10 = 4\n r11 = 3\n r4 = 1\n r5 = 2\n if (r3 == 0) goto L_0x00a4\n if (r3 == r4) goto L_0x0093\n if (r3 == r5) goto L_0x0072\n if (r3 == r11) goto L_0x0053\n if (r3 != r10) goto L_0x004b\n java.lang.Object r3 = r2.f1098h\n java.util.List r3 = (java.util.List) r3\n java.lang.Object r3 = r2.f1097g\n java.util.Map r3 = (java.util.Map) r3\n java.lang.Object r3 = r2.f1096f\n org.mobileid.requester.web_service.Response r3 = (org.mobileid.requester.web_service.Response) r3\n java.lang.Object r3 = r2.f1095e\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r2 = r2.f1094d\n c.a.e.b.b r2 = (p008c.p009a.p024e.p026b.C0963b) r2\n kotlin.ResultKt.throwOnFailure(r1)\n goto L_0x01c5\n L_0x004b:\n java.lang.IllegalStateException r1 = new java.lang.IllegalStateException\n java.lang.String r2 = \"call to 'resume' before 'invoke' with coroutine\"\n r1.<init>(r2)\n throw r1\n L_0x0053:\n java.lang.Object r3 = r2.f1098h\n java.util.List r3 = (java.util.List) r3\n java.lang.Object r4 = r2.f1097g\n java.util.Map r4 = (java.util.Map) r4\n java.lang.Object r5 = r2.f1096f\n org.mobileid.requester.web_service.Response r5 = (org.mobileid.requester.web_service.Response) r5\n java.lang.Object r6 = r2.f1095e\n java.lang.String r6 = (java.lang.String) r6\n boolean r7 = r2.f1099i\n java.lang.Object r8 = r2.f1094d\n c.a.e.b.b r8 = (p008c.p009a.p024e.p026b.C0963b) r8\n kotlin.ResultKt.throwOnFailure(r1)\n r13 = r5\n r14 = r6\n r6 = r3\n r3 = r8\n goto L_0x01ad\n L_0x0072:\n java.lang.Object r3 = r2.f1098h\n java.util.List r3 = (java.util.List) r3\n java.lang.Object r4 = r2.f1097g\n java.util.Map r4 = (java.util.Map) r4\n java.lang.Object r5 = r2.f1096f\n org.mobileid.requester.web_service.Response r5 = (org.mobileid.requester.web_service.Response) r5\n java.lang.Object r6 = r2.f1095e\n java.lang.String r6 = (java.lang.String) r6\n boolean r7 = r2.f1099i\n java.lang.Object r8 = r2.f1094d\n c.a.e.b.b r8 = (p008c.p009a.p024e.p026b.C0963b) r8\n kotlin.ResultKt.throwOnFailure(r1)\n r1 = r3\n r15 = r4\n r13 = r5\n r14 = r6\n r12 = r8\n r8 = r7\n goto L_0x018c\n L_0x0093:\n java.lang.Object r3 = r2.f1095e\n java.lang.String r3 = (java.lang.String) r3\n boolean r4 = r2.f1099i\n java.lang.Object r6 = r2.f1094d\n c.a.e.b.b r6 = (p008c.p009a.p024e.p026b.C0963b) r6\n kotlin.ResultKt.throwOnFailure(r1)\n r13 = r3\n r14 = r4\n r12 = r6\n goto L_0x00c5\n L_0x00a4:\n kotlin.ResultKt.throwOnFailure(r1)\n c.a.e.c.a r1 = r0.f1032c\n java.lang.String r3 = r1.mo13035a()\n if (r3 == 0) goto L_0x01cc\n org.mobileid.time_key.web_service.TimeKeyWebService r1 = r0.f1031b\n r2.f1094d = r0\n r6 = r18\n r2.f1099i = r6\n r2.f1095e = r3\n r2.f1092b = r4\n java.lang.Object r1 = r1.synchronizeKeys(r3, r2)\n if (r1 != r9) goto L_0x00c2\n return r9\n L_0x00c2:\n r12 = r0\n r13 = r3\n r14 = r6\n L_0x00c5:\n org.mobileid.requester.web_service.Response r1 = (org.mobileid.requester.web_service.Response) r1\n org.mobileid.requester.web_service.Error r3 = r1.getError()\n if (r3 == 0) goto L_0x00d0\n kotlin.Unit r1 = kotlin.Unit.INSTANCE\n return r1\n L_0x00d0:\n java.lang.Object r3 = r1.getResult()\n java.util.Map r3 = (java.util.Map) r3\n r4 = 0\n if (r12 == 0) goto L_0x01cb\n if (r3 == 0) goto L_0x010e\n java.util.LinkedHashMap r6 = new java.util.LinkedHashMap\n r6.<init>()\n java.util.Set r3 = r3.entrySet()\n java.util.Iterator r3 = r3.iterator()\n L_0x00e8:\n boolean r7 = r3.hasNext()\n if (r7 == 0) goto L_0x010f\n java.lang.Object r7 = r3.next()\n java.util.Map$Entry r7 = (java.util.Map.Entry) r7\n org.mobileid.access.key.TimeKey$Companion r8 = org.mobileid.access.key.TimeKey.Companion\n java.lang.Object r15 = r7.getKey()\n java.lang.String r15 = (java.lang.String) r15\n boolean r8 = r8.isTimeKeyPrefix(r15)\n if (r8 == 0) goto L_0x00e8\n java.lang.Object r8 = r7.getKey()\n java.lang.Object r7 = r7.getValue()\n r6.put(r8, r7)\n goto L_0x00e8\n L_0x010e:\n r6 = r4\n L_0x010f:\n boolean r3 = r6 instanceof java.util.Map\n if (r3 != 0) goto L_0x0115\n r15 = r4\n goto L_0x0116\n L_0x0115:\n r15 = r6\n L_0x0116:\n if (r15 == 0) goto L_0x01c8\n c.a.a.c$a r3 = p008c.p009a.p010a.C0837c.f761k\n android.content.Context r6 = r12.f1030a\n java.util.List r3 = p008c.p009a.p010a.C0837c.C0838a.m367a((p008c.p009a.p010a.C0837c.C0838a) r3, (android.content.Context) r6, (org.mobileid.access.key_sort.Sort) r4, (int) r5)\n java.util.ArrayList r4 = new java.util.ArrayList\n r4.<init>()\n java.util.Iterator r3 = r3.iterator()\n L_0x0129:\n boolean r6 = r3.hasNext()\n if (r6 == 0) goto L_0x0146\n java.lang.Object r6 = r3.next()\n r7 = r6\n org.mobileid.access.key.Key r7 = (org.mobileid.access.key.Key) r7\n org.mobileid.access.key.TimeKey$Companion r8 = org.mobileid.access.key.TimeKey.Companion\n java.lang.String r7 = r7.getName()\n boolean r7 = r8.isStorageTimeKeyId(r7)\n if (r7 == 0) goto L_0x0129\n r4.add(r6)\n goto L_0x0129\n L_0x0146:\n java.util.ArrayList r8 = new java.util.ArrayList\n r3 = 10\n int r3 = kotlin.collections.CollectionsKt.collectionSizeOrDefault(r4, r3)\n r8.<init>(r3)\n java.util.Iterator r3 = r4.iterator()\n L_0x0155:\n boolean r4 = r3.hasNext()\n if (r4 == 0) goto L_0x0169\n java.lang.Object r4 = r3.next()\n org.mobileid.access.key.Key r4 = (org.mobileid.access.key.Key) r4\n java.lang.String r4 = r4.getId()\n r8.add(r4)\n goto L_0x0155\n L_0x0169:\n r2.f1094d = r12\n r2.f1099i = r14\n r2.f1095e = r13\n r2.f1096f = r1\n r2.f1097g = r15\n r2.f1098h = r8\n r2.f1092b = r5\n java.lang.String r5 = \"DEACTIVATED\"\n r3 = r12\n r4 = r15\n r6 = r8\n r7 = r14\n r16 = r8\n r8 = r2\n java.lang.Object r3 = r3.mo13032b(r4, r5, r6, r7, r8)\n if (r3 != r9) goto L_0x0187\n return r9\n L_0x0187:\n r8 = r14\n r14 = r13\n r13 = r1\n r1 = r16\n L_0x018c:\n r2.f1094d = r12\n r2.f1099i = r8\n r2.f1095e = r14\n r2.f1096f = r13\n r2.f1097g = r15\n r2.f1098h = r1\n r2.f1092b = r11\n java.lang.String r5 = \"FROZEN\"\n r3 = r12\n r4 = r15\n r6 = r1\n r7 = r8\n r11 = r8\n r8 = r2\n java.lang.Object r3 = r3.mo13032b(r4, r5, r6, r7, r8)\n if (r3 != r9) goto L_0x01a9\n return r9\n L_0x01a9:\n r6 = r1\n r7 = r11\n r3 = r12\n r4 = r15\n L_0x01ad:\n r2.f1094d = r3\n r2.f1099i = r7\n r2.f1095e = r14\n r2.f1096f = r13\n r2.f1097g = r4\n r2.f1098h = r6\n r2.f1092b = r10\n java.lang.String r5 = \"FROZEN\"\n r8 = r2\n java.lang.Object r1 = r3.mo13028a(r4, r5, r6, r7, r8)\n if (r1 != r9) goto L_0x01c5\n return r9\n L_0x01c5:\n kotlin.Unit r1 = kotlin.Unit.INSTANCE\n return r1\n L_0x01c8:\n kotlin.Unit r1 = kotlin.Unit.INSTANCE\n return r1\n L_0x01cb:\n throw r4\n L_0x01cc:\n kotlin.Unit r1 = kotlin.Unit.INSTANCE\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p008c.p009a.p024e.p026b.C0963b.mo13025a(boolean, kotlin.coroutines.Continuation):java.lang.Object\");\n }",
"public void a() {\n block8 : {\n block9 : {\n var1_1 = this.f();\n var2_2 = false;\n if (var1_1) break block8;\n this.j.c();\n var6_3 = this.k;\n var7_4 = this.b;\n var8_5 = (l)var6_3;\n var9_6 = var8_5.a(var7_4);\n if (var9_6 != null) break block9;\n this.a(false);\n var2_2 = true;\n ** GOTO lbl30\n }\n if (var9_6 != n.b) ** GOTO lbl26\n this.a(this.g);\n var11_7 = this.k;\n var12_8 = this.b;\n var13_9 = (l)var11_7;\n try {\n block10 : {\n var2_2 = var13_9.a(var12_8).d();\n break block10;\nlbl26: // 1 sources:\n var10_10 = var9_6.d();\n var2_2 = false;\n if (!var10_10) {\n this.b();\n }\n }\n this.j.g();\n }\n finally {\n this.j.d();\n }\n }\n if ((var3_12 = this.c) == null) return;\n if (var2_2) {\n var4_13 = var3_12.iterator();\n while (var4_13.hasNext()) {\n ((d)var4_13.next()).a(this.b);\n }\n }\n e.a(this.h, this.j, this.c);\n }\n\n /*\n * Exception decompiling\n */\n public final void a(ListenableWorker.a var1_1) {\n // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.\n // org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 10[WHILELOOP]\n // org.benf.cfr.reader.b.a.a.j.a(Op04StructuredStatement.java:432)\n // org.benf.cfr.reader.b.a.a.j.d(Op04StructuredStatement.java:484)\n // org.benf.cfr.reader.b.a.a.i.a(Op03SimpleStatement.java:607)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:692)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127)\n // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96)\n // org.benf.cfr.reader.entities.g.p(Method.java:396)\n // org.benf.cfr.reader.entities.d.e(ClassFile.java:890)\n // org.benf.cfr.reader.entities.d.b(ClassFile.java:792)\n // org.benf.cfr.reader.b.a(Driver.java:128)\n // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130)\n // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108)\n // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118)\n // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n // java.lang.Thread.run(Thread.java:919)\n throw new IllegalStateException(\"Decompilation failed\");\n }\n\n public final void a(String string) {\n LinkedList linkedList = new LinkedList();\n linkedList.add((Object)string);\n while (!linkedList.isEmpty()) {\n String string2 = (String)linkedList.remove();\n if (((l)this.k).a(string2) != n.f) {\n k k2 = this.k;\n n n2 = n.d;\n String[] arrstring = new String[]{string2};\n ((l)k2).a(n2, arrstring);\n }\n linkedList.addAll((Collection)((a.i.r.p.c)this.l).a(string2));\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n public final void a(boolean bl) {\n this.j.c();\n k k2 = this.j.k();\n l l2 = (l)k2;\n List list = l2.a();\n ArrayList arrayList = (ArrayList)list;\n boolean bl2 = arrayList.isEmpty();\n if (bl2) {\n f.a(this.a, RescheduleReceiver.class, false);\n }\n this.j.g();\n this.p.c((Object)bl);\n return;\n finally {\n this.j.d();\n }\n }\n\n public final void b() {\n this.j.c();\n k k2 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l2 = (l)k2;\n l2.a(n2, arrstring);\n k k3 = this.k;\n String string = this.b;\n long l3 = System.currentTimeMillis();\n l l4 = (l)k3;\n l4.b(string, l3);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n try {\n l5.a(string2, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(true);\n }\n }\n\n public final void c() {\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n long l2 = System.currentTimeMillis();\n l l3 = (l)k2;\n l3.b(string, l2);\n k k3 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l4 = (l)k3;\n l4.a(n2, arrstring);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n l5.f(string2);\n k k5 = this.k;\n String string3 = this.b;\n l l6 = (l)k5;\n try {\n l6.a(string3, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final void d() {\n k k2 = this.k;\n String string = this.b;\n n n2 = ((l)k2).a(string);\n if (n2 == n.b) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[]{this.b};\n h2.a(string2, String.format((String)\"Status for %s is RUNNING;not doing any work and rescheduling for later execution\", (Object[])arrobject), new Throwable[0]);\n this.a(true);\n return;\n }\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[]{this.b, n2};\n h4.a(string3, String.format((String)\"Status for %s is %s; not doing any work\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n }\n\n public void e() {\n this.j.c();\n this.a(this.b);\n a.i.e e2 = ((ListenableWorker.a.a)this.g).a;\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n try {\n l2.a(string, e2);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final boolean f() {\n if (this.r) {\n h h2 = h.a();\n String string = s;\n Object[] arrobject = new Object[]{this.o};\n h2.a(string, String.format((String)\"Work interrupted for %s\", (Object[])arrobject), new Throwable[0]);\n k k2 = this.k;\n String string2 = this.b;\n n n2 = ((l)k2).a(string2);\n if (n2 == null) {\n this.a(false);\n return true;\n }\n this.a(true ^ n2.d());\n return true;\n }\n return false;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public void run() {\n int n2;\n block42 : {\n block41 : {\n i i2;\n Cursor cursor;\n block48 : {\n block46 : {\n ListenableWorker listenableWorker;\n block47 : {\n a.i.e e2;\n block44 : {\n g g2;\n block45 : {\n block40 : {\n boolean bl;\n Iterator iterator;\n j j2;\n StringBuilder stringBuilder;\n block43 : {\n a.i.r.p.n n3 = this.m;\n String string = this.b;\n o o2 = (o)n3;\n if (o2 == null) throw null;\n n2 = 1;\n i i3 = i.a((String)\"SELECT DISTINCT tag FROM worktag WHERE work_spec_id=?\", (int)n2);\n if (string == null) {\n i3.bindNull(n2);\n } else {\n i3.bindString(n2, string);\n }\n o2.a.b();\n Cursor cursor2 = a.f.l.a.a(o2.a, (a.g.a.e)i3, false);\n ArrayList arrayList = new ArrayList(cursor2.getCount());\n while (cursor2.moveToNext()) {\n arrayList.add((Object)cursor2.getString(0));\n }\n this.n = arrayList;\n stringBuilder = new StringBuilder(\"Work [ id=\");\n stringBuilder.append(this.b);\n stringBuilder.append(\", tags={ \");\n iterator = arrayList.iterator();\n bl = true;\n break block43;\n finally {\n cursor2.close();\n i3.b();\n }\n }\n while (iterator.hasNext()) {\n String string = (String)iterator.next();\n if (bl) {\n bl = false;\n } else {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(string);\n }\n stringBuilder.append(\" } ]\");\n this.o = stringBuilder.toString();\n if (this.f()) {\n return;\n }\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n this.e = j2 = l2.d(string);\n if (j2 == null) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.b;\n h2.b(string2, String.format((String)\"Didn't find WorkSpec for id %s\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n return;\n }\n if (j2.b != n.a) {\n this.d();\n this.j.g();\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h4.a(string3, String.format((String)\"%s is not in ENQUEUED state. Nothing more to do.\", (Object[])arrobject), new Throwable[0]);\n return;\n }\n if (j2.d() || this.e.c()) {\n long l3 = System.currentTimeMillis();\n boolean bl2 = this.e.n == 0L;\n if (!bl2 && l3 < this.e.a()) {\n h h5 = h.a();\n String string4 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h5.a(string4, String.format((String)\"Delaying execution for %s because it is being executed before schedule.\", (Object[])arrobject), new Throwable[0]);\n this.a((boolean)n2);\n return;\n }\n }\n this.j.g();\n if (!this.e.d()) break block40;\n e2 = this.e.e;\n break block44;\n }\n g2 = g.a(this.e.d);\n if (g2 != null) break block45;\n h h6 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.d;\n h6.b(string, String.format((String)\"Could not create Input Merger %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n ArrayList arrayList = new ArrayList();\n arrayList.add((Object)this.e.e);\n k k3 = this.k;\n String string = this.b;\n l l4 = (l)k3;\n if (l4 == null) throw null;\n i2 = i.a((String)\"SELECT output FROM workspec WHERE id IN (SELECT prerequisite_id FROM dependency WHERE work_spec_id=?)\", (int)n2);\n if (string == null) {\n i2.bindNull(n2);\n } else {\n i2.bindString(n2, string);\n }\n l4.a.b();\n cursor = a.f.l.a.a(l4.a, (a.g.a.e)i2, false);\n ArrayList arrayList2 = new ArrayList(cursor.getCount());\n while (cursor.moveToNext()) {\n arrayList2.add((Object)a.i.e.b(cursor.getBlob(0)));\n }\n arrayList.addAll((Collection)arrayList2);\n e2 = g2.a((List<a.i.e>)arrayList);\n }\n a.i.e e3 = e2;\n UUID uUID = UUID.fromString((String)this.b);\n List<String> list = this.n;\n WorkerParameters.a a2 = this.d;\n int n5 = this.e.k;\n a.i.b b2 = this.h;\n WorkerParameters workerParameters = new WorkerParameters(uUID, e3, list, a2, n5, b2.a, this.i, b2.c);\n if (this.f == null) {\n this.f = this.h.c.a(this.a, this.e.c, workerParameters);\n }\n if ((listenableWorker = this.f) != null) break block47;\n h h7 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h7.b(string, String.format((String)\"Could not create Worker %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n if (!listenableWorker.isUsed()) break block48;\n h h8 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h8.b(string, String.format((String)\"Received an already-used Worker %s; WorkerFactory should return new instances\", (Object[])arrobject), new Throwable[0]);\n }\n this.e();\n return;\n }\n this.f.setUsed();\n this.j.c();\n k k4 = this.k;\n String string = this.b;\n l l5 = (l)k4;\n if (l5.a(string) != n.a) break block41;\n k k5 = this.k;\n n n7 = n.b;\n String[] arrstring = new String[n2];\n arrstring[0] = this.b;\n l l6 = (l)k5;\n l6.a(n7, arrstring);\n k k6 = this.k;\n String string5 = this.b;\n l l7 = (l)k6;\n try {\n l7.e(string5);\n break block42;\n }\n finally {\n cursor.close();\n i2.b();\n }\n catch (Throwable throwable) {\n throw throwable;\n }\n finally {\n this.j.d();\n }\n }\n n2 = 0;\n }\n this.j.g();\n if (n2 != 0) {\n if (this.f()) {\n return;\n }\n c c2 = new c();\n ((a.i.r.q.m.b)this.i).c.execute((Runnable)new a.i.r.k(this, c2));\n c2.a((Runnable)new a.i.r.l(this, c2, this.o), ((a.i.r.q.m.b)this.i).a);\n return;\n }\n this.d();\n return;\n finally {\n this.j.d();\n }\n }\n\n public static class a {\n public Context a;\n public ListenableWorker b;\n public a.i.r.q.m.a c;\n public a.i.b d;\n public WorkDatabase e;\n public String f;\n public List<d> g;\n public WorkerParameters.a h = new WorkerParameters.a();\n\n public a(Context context, a.i.b b2, a.i.r.q.m.a a2, WorkDatabase workDatabase, String string) {\n this.a = context.getApplicationContext();\n this.c = a2;\n this.d = b2;\n this.e = workDatabase;\n this.f = string;\n }\n }\n\n}",
"@android.support.annotation.RequiresApi(api = 23)\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final synchronized void c(int r11) {\n /*\n r10 = this;\n monitor-enter(r10)\n r8 = 1\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x004b }\n java.lang.Integer r2 = java.lang.Integer.valueOf(r11) // Catch:{ all -> 0x004b }\n r9 = 0\n r1[r9] = r2 // Catch:{ all -> 0x004b }\n com.meituan.robust.ChangeQuickRedirect r3 = f29525a // Catch:{ all -> 0x004b }\n r4 = 0\n r5 = 16805(0x41a5, float:2.3549E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x004b }\n java.lang.Class r2 = java.lang.Integer.TYPE // Catch:{ all -> 0x004b }\n r6[r9] = r2 // Catch:{ all -> 0x004b }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x004b }\n r2 = r10\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x004b }\n if (r1 == 0) goto L_0x003a\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x004b }\n java.lang.Integer r0 = java.lang.Integer.valueOf(r11) // Catch:{ all -> 0x004b }\n r1[r9] = r0 // Catch:{ all -> 0x004b }\n com.meituan.robust.ChangeQuickRedirect r3 = f29525a // Catch:{ all -> 0x004b }\n r4 = 0\n r5 = 16805(0x41a5, float:2.3549E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x004b }\n java.lang.Class r0 = java.lang.Integer.TYPE // Catch:{ all -> 0x004b }\n r6[r9] = r0 // Catch:{ all -> 0x004b }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x004b }\n r2 = r10\n com.meituan.robust.PatchProxy.accessDispatch(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x004b }\n monitor-exit(r10)\n return\n L_0x003a:\n com.ss.android.medialib.camera.IESCameraInterface r1 = r10.f29527c // Catch:{ all -> 0x004b }\n boolean r1 = r1 instanceof com.ss.android.medialib.camera.IESHwCamera // Catch:{ all -> 0x004b }\n if (r1 == 0) goto L_0x0049\n com.ss.android.medialib.camera.IESCameraInterface r1 = r10.f29527c // Catch:{ all -> 0x004b }\n com.ss.android.medialib.camera.IESHwCamera r1 = (com.ss.android.medialib.camera.IESHwCamera) r1 // Catch:{ all -> 0x004b }\n r1.c((int) r11) // Catch:{ all -> 0x004b }\n r10.o = r11 // Catch:{ all -> 0x004b }\n L_0x0049:\n monitor-exit(r10)\n return\n L_0x004b:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.medialib.camera.g.c(int):void\");\n }",
"public final void a(com.tencent.mm.plugin.game.c.ai r12, java.lang.String r13, int r14, int r15) {\n /*\n r11 = this;\n if (r12 == 0) goto L_0x000a;\n L_0x0002:\n r0 = r12.nmz;\n r0 = com.tencent.mm.sdk.platformtools.bi.cC(r0);\n if (r0 == 0) goto L_0x0010;\n L_0x000a:\n r0 = 8;\n r11.setVisibility(r0);\n L_0x000f:\n return;\n L_0x0010:\n r11.mAppId = r13;\n r11.niV = r15;\n r0 = r12.nmz;\n r7 = r0.iterator();\n L_0x001a:\n r0 = r7.hasNext();\n if (r0 == 0) goto L_0x000f;\n L_0x0020:\n r0 = r7.next();\n r4 = r0;\n r4 = (com.tencent.mm.plugin.game.c.k) r4;\n if (r4 == 0) goto L_0x001a;\n L_0x0029:\n r5 = new com.tencent.mm.plugin.game.d.e$a$a;\n r5.<init>();\n r0 = r4.nlz;\n switch(r0) {\n case 1: goto L_0x004a;\n case 2: goto L_0x00e3;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = 2;\n if (r14 != r0) goto L_0x001a;\n L_0x0036:\n r0 = r11.mContext;\n r1 = 10;\n r2 = 1002; // 0x3ea float:1.404E-42 double:4.95E-321;\n r3 = r4.nlw;\n r4 = r4.nlr;\n r6 = com.tencent.mm.plugin.game.model.ap.CD(r4);\n r4 = r13;\n r5 = r15;\n com.tencent.mm.plugin.game.model.ap.a(r0, r1, r2, r3, r4, r5, r6);\n goto L_0x001a;\n L_0x004a:\n r0 = r4.nlx;\n if (r0 == 0) goto L_0x001a;\n L_0x004e:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djD;\n r2 = 1;\n r6 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cxP;\n r0 = r6.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cxR;\n r1 = r6.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cxO;\n r2 = r6.findViewById(r2);\n r2 = (com.tencent.mm.plugin.game.widget.EllipsizingTextView) r2;\n r3 = 2;\n r2.setMaxLines(r3);\n r3 = com.tencent.mm.R.h.cxQ;\n r3 = r6.findViewById(r3);\n r3 = (android.widget.ImageView) r3;\n r8 = r11.mContext;\n r9 = r4.nlv;\n r10 = r0.getTextSize();\n r8 = com.tencent.mm.pluginsdk.ui.d.i.b(r8, r9, r10);\n r0.setText(r8);\n r0 = r11.mContext;\n r8 = r4.nlx;\n r8 = r8.fpg;\n r9 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r8, r9);\n r1.setText(r0);\n r0 = r11.mContext;\n r1 = r4.nlx;\n r1 = r1.nkL;\n r8 = r2.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r1, r8);\n r2.setText(r0);\n r0 = r4.nlx;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x00dd;\n L_0x00b9:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nlx;\n r1 = r1.nkM;\n r2 = r5.aSD();\n r0.a(r3, r1, r2);\n L_0x00c8:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nlx;\n r2 = r2.nkN;\n r3 = r4.nlr;\n r0.<init>(r1, r2, r3);\n r6.setTag(r0);\n r6.setOnClickListener(r11);\n goto L_0x0033;\n L_0x00dd:\n r0 = 8;\n r3.setVisibility(r0);\n goto L_0x00c8;\n L_0x00e3:\n r0 = r4.nly;\n if (r0 == 0) goto L_0x001a;\n L_0x00e7:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djE;\n r2 = 1;\n r3 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cOG;\n r0 = r3.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cOI;\n r1 = r3.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cOH;\n r2 = r3.findViewById(r2);\n r2 = (android.widget.ImageView) r2;\n r6 = r11.mContext;\n r8 = r4.nlv;\n r9 = r0.getTextSize();\n r6 = com.tencent.mm.pluginsdk.ui.d.i.b(r6, r8, r9);\n r0.setText(r6);\n r0 = r11.mContext;\n r6 = r4.nly;\n r6 = r6.fpg;\n r8 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r6, r8);\n r1.setText(r0);\n r0 = r4.nly;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x016f;\n L_0x0135:\n r0 = r4.nly;\n r0 = r0.npS;\n r1 = 1;\n if (r0 != r1) goto L_0x0167;\n L_0x013c:\n r0 = 1;\n r5.nDa = r0;\n r0 = com.tencent.mm.R.g.bCF;\n r5.nDd = r0;\n L_0x0143:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nly;\n r1 = r1.nkM;\n r5 = r5.aSD();\n r0.a(r2, r1, r5);\n L_0x0152:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nly;\n r2 = r2.nkN;\n r5 = r4.nlr;\n r0.<init>(r1, r2, r5);\n r3.setTag(r0);\n r3.setOnClickListener(r11);\n goto L_0x0033;\n L_0x0167:\n r0 = 1;\n r5.hFJ = r0;\n r0 = com.tencent.mm.R.g.bCE;\n r5.nDd = r0;\n goto L_0x0143;\n L_0x016f:\n r0 = 8;\n r2.setVisibility(r0);\n goto L_0x0152;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.ui.f.a(com.tencent.mm.plugin.game.c.ai, java.lang.String, int, int):void\");\n }",
"protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void m2108c() {\n /*\n r3 = this;\n r0 = \"Calling this from your main thread can lead to deadlock\";\n com.google.android.gms.common.internal.C1305x.m6628c(r0);\n monitor-enter(r3);\n r0 = r3.f1274g;\t Catch:{ all -> 0x002a }\n if (r0 == 0) goto L_0x000e;\n L_0x000a:\n r0 = r3.f1268a;\t Catch:{ all -> 0x002a }\n if (r0 != 0) goto L_0x0010;\n L_0x000e:\n monitor-exit(r3);\t Catch:{ all -> 0x002a }\n L_0x000f:\n return;\n L_0x0010:\n r0 = r3.f1270c;\t Catch:{ IllegalArgumentException -> 0x002d }\n if (r0 == 0) goto L_0x001f;\n L_0x0014:\n r0 = com.google.android.gms.common.stats.C1530b.m6956a();\t Catch:{ IllegalArgumentException -> 0x002d }\n r1 = r3.f1274g;\t Catch:{ IllegalArgumentException -> 0x002d }\n r2 = r3.f1268a;\t Catch:{ IllegalArgumentException -> 0x002d }\n r0.m6963a(r1, r2);\t Catch:{ IllegalArgumentException -> 0x002d }\n L_0x001f:\n r0 = 0;\n r3.f1270c = r0;\t Catch:{ all -> 0x002a }\n r0 = 0;\n r3.f1269b = r0;\t Catch:{ all -> 0x002a }\n r0 = 0;\n r3.f1268a = r0;\t Catch:{ all -> 0x002a }\n monitor-exit(r3);\t Catch:{ all -> 0x002a }\n goto L_0x000f;\n L_0x002a:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x002a }\n throw r0;\n L_0x002d:\n r0 = move-exception;\n r1 = \"AdvertisingIdClient\";\n r2 = \"AdvertisingIdClient unbindService failed.\";\n android.util.Log.i(r1, r2, r0);\t Catch:{ all -> 0x002a }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.c.a.c():void\");\n }",
"private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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 r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }",
"private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\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/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }",
"private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }",
"private void a(com.bytedance.crash.nativecrash.c r6, java.lang.String r7, boolean r8) {\n /*\n r5 = this;\n r0 = 0\n boolean r1 = r6.c() // Catch:{ Throwable -> 0x009a }\n if (r1 != 0) goto L_0x0008\n return\n L_0x0008:\n com.bytedance.crash.e.d r8 = a((com.bytedance.crash.nativecrash.c) r6, (boolean) r8) // Catch:{ Throwable -> 0x009a }\n if (r8 == 0) goto L_0x0099\n org.json.JSONObject r1 = r8.f19424b // Catch:{ Throwable -> 0x009a }\n if (r1 == 0) goto L_0x0099\n java.io.File r1 = r6.f19496a // Catch:{ Throwable -> 0x009a }\n java.lang.String r2 = \".npth\"\n java.io.File r1 = com.bytedance.crash.i.h.a(r1, r2) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.db.a r2 = com.bytedance.crash.db.a.a() // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = r1.getAbsolutePath() // Catch:{ Throwable -> 0x009a }\n boolean r2 = r2.a((java.lang.String) r3) // Catch:{ Throwable -> 0x009a }\n if (r2 != 0) goto L_0x0096\n org.json.JSONObject r2 = r8.f19424b // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = \"upload_scene\"\n java.lang.String r4 = \"launch_scan\"\n r2.put(r3, r4) // Catch:{ Throwable -> 0x009a }\n if (r7 == 0) goto L_0x0038\n java.lang.String r3 = \"crash_uuid\"\n r2.put(r3, r7) // Catch:{ Throwable -> 0x009a }\n L_0x0038:\n com.bytedance.crash.d r7 = com.bytedance.crash.d.NATIVE // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = com.bytedance.crash.c.a.f19382f // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = com.bytedance.crash.event.b.a((com.bytedance.crash.d) r7, (java.lang.String) r3, (org.json.JSONObject) r2) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r7) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = r7.clone() // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = com.bytedance.crash.c.a.g // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = r7.eventType(r3) // Catch:{ Throwable -> 0x009a }\n java.lang.String r0 = r8.f19423a // Catch:{ Throwable -> 0x0093 }\n java.lang.String r2 = r2.toString() // Catch:{ Throwable -> 0x0093 }\n java.lang.String r8 = r8.f19425c // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.upload.h r8 = com.bytedance.crash.upload.b.a((java.lang.String) r0, (java.lang.String) r2, (java.lang.String) r8) // Catch:{ Throwable -> 0x0093 }\n boolean r0 = r8.a() // Catch:{ Throwable -> 0x0093 }\n if (r0 == 0) goto L_0x0083\n boolean r6 = r6.e() // Catch:{ Throwable -> 0x0093 }\n if (r6 != 0) goto L_0x0074\n com.bytedance.crash.db.a r6 = com.bytedance.crash.db.a.a() // Catch:{ Throwable -> 0x0093 }\n java.lang.String r0 = r1.getAbsolutePath() // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.db.a.a r0 = com.bytedance.crash.db.a.a.a(r0) // Catch:{ Throwable -> 0x0093 }\n r6.a((com.bytedance.crash.db.a.a) r0) // Catch:{ Throwable -> 0x0093 }\n L_0x0074:\n r6 = 0\n com.bytedance.crash.event.a r6 = r7.state(r6) // Catch:{ Throwable -> 0x0093 }\n org.json.JSONObject r8 = r8.f19589c // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r6.errorInfo((org.json.JSONObject) r8) // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6) // Catch:{ Throwable -> 0x0093 }\n goto L_0x0099\n L_0x0083:\n int r6 = r8.f19587a // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r7.state(r6) // Catch:{ Throwable -> 0x0093 }\n java.lang.String r8 = r8.f19588b // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r6.errorInfo((java.lang.String) r8) // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6) // Catch:{ Throwable -> 0x0093 }\n goto L_0x00aa\n L_0x0093:\n r6 = move-exception\n r0 = r7\n goto L_0x009b\n L_0x0096:\n r6.e() // Catch:{ Throwable -> 0x009a }\n L_0x0099:\n return\n L_0x009a:\n r6 = move-exception\n L_0x009b:\n if (r0 == 0) goto L_0x00aa\n r7 = 211(0xd3, float:2.96E-43)\n com.bytedance.crash.event.a r7 = r0.state(r7)\n com.bytedance.crash.event.a r6 = r7.errorInfo((java.lang.Throwable) r6)\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6)\n L_0x00aa:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.crash.runtime.d.a(com.bytedance.crash.nativecrash.c, java.lang.String, boolean):void\");\n }",
"public java.lang.Object mo13022a(java.lang.String r18, kotlin.coroutines.Continuation<? super java.lang.Boolean> r19) {\n /*\n r17 = this;\n r0 = r17\n r1 = r19\n boolean r2 = r1 instanceof p008c.p009a.p024e.p026b.C0963b.C0970g\n if (r2 == 0) goto L_0x0017\n r2 = r1\n c.a.e.b.b$g r2 = (p008c.p009a.p024e.p026b.C0963b.C0970g) r2\n int r3 = r2.f1086b\n r4 = -2147483648(0xffffffff80000000, float:-0.0)\n r5 = r3 & r4\n if (r5 == 0) goto L_0x0017\n int r3 = r3 - r4\n r2.f1086b = r3\n goto L_0x001c\n L_0x0017:\n c.a.e.b.b$g r2 = new c.a.e.b.b$g\n r2.<init>(r0, r1)\n L_0x001c:\n java.lang.Object r1 = r2.f1085a\n java.lang.Object r3 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r4 = r2.f1086b\n r5 = 0\n r6 = 2\n r7 = 1\n if (r4 == 0) goto L_0x0051\n if (r4 == r7) goto L_0x0045\n if (r4 != r6) goto L_0x003d\n java.lang.Object r3 = r2.f1090f\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r3 = r2.f1089e\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r2 = r2.f1088d\n c.a.e.b.b r2 = (p008c.p009a.p024e.p026b.C0963b) r2\n kotlin.ResultKt.throwOnFailure(r1)\n goto L_0x00a1\n L_0x003d:\n java.lang.IllegalStateException r1 = new java.lang.IllegalStateException\n java.lang.String r2 = \"call to 'resume' before 'invoke' with coroutine\"\n r1.<init>(r2)\n throw r1\n L_0x0045:\n java.lang.Object r4 = r2.f1089e\n java.lang.String r4 = (java.lang.String) r4\n java.lang.Object r8 = r2.f1088d\n c.a.e.b.b r8 = (p008c.p009a.p024e.p026b.C0963b) r8\n kotlin.ResultKt.throwOnFailure(r1)\n goto L_0x0066\n L_0x0051:\n kotlin.ResultKt.throwOnFailure(r1)\n c.a.e.c.a r1 = r0.f1032c\n r2.f1088d = r0\n r4 = r18\n r2.f1089e = r4\n r2.f1086b = r7\n java.lang.Object r1 = r1.mo13034a(r2)\n if (r1 != r3) goto L_0x0065\n return r3\n L_0x0065:\n r8 = r0\n L_0x0066:\n c.a.e.c.a r1 = r8.f1032c\n java.lang.String r1 = r1.mo13035a()\n if (r1 == 0) goto L_0x00b7\n org.mobileid.time_key.web_service.TimeKeyWebService r15 = r8.f1031b\n org.mobileid.time_key.web_service.ActionOnKeyBody r14 = new org.mobileid.time_key.web_service.ActionOnKeyBody\n java.util.Locale r9 = java.util.Locale.getDefault()\n java.lang.String r10 = \"Locale.getDefault()\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r9, r10)\n if (r4 == 0) goto L_0x00af\n java.lang.String r10 = r4.toUpperCase(r9)\n java.lang.String r9 = \"(this as java.lang.String).toUpperCase(locale)\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, r9)\n r12 = 0\n r13 = 4\n r16 = 0\n r9 = r14\n r11 = r1\n r7 = r14\n r14 = r16\n r9.<init>(r10, r11, r12, r13, r14)\n r2.f1088d = r8\n r2.f1089e = r4\n r2.f1090f = r1\n r2.f1086b = r6\n java.lang.Object r1 = r15.activateKey(r7, r2)\n if (r1 != r3) goto L_0x00a1\n return r3\n L_0x00a1:\n org.mobileid.requester.web_service.Response r1 = (org.mobileid.requester.web_service.Response) r1\n java.lang.Object r1 = r1.getResult()\n if (r1 == 0) goto L_0x00aa\n r5 = 1\n L_0x00aa:\n java.lang.Boolean r1 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)\n return r1\n L_0x00af:\n java.lang.NullPointerException r1 = new java.lang.NullPointerException\n java.lang.String r2 = \"null cannot be cast to non-null type java.lang.String\"\n r1.<init>(r2)\n throw r1\n L_0x00b7:\n java.lang.Boolean r1 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p008c.p009a.p024e.p026b.C0963b.mo13022a(java.lang.String, kotlin.coroutines.Continuation):java.lang.Object\");\n }",
"public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }",
"public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\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/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }",
"private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }",
"@androidx.annotation.Nullable\n /* renamed from: a */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static com.inmobi.media.C2336dl m4847a(@androidx.annotation.NonNull java.lang.String r3, @androidx.annotation.Nullable com.inmobi.media.C2600j r4, @androidx.annotation.Nullable java.lang.String r5, boolean r6) {\n /*\n com.iab.omid.library.inmobi.adsession.AdSessionContext r4 = m4846a(r4, r5)\n int r5 = r3.hashCode()\n r0 = -284840886(0xffffffffef05ac4a, float:-4.136979E28)\n r1 = 3\n r2 = 2\n if (r5 == r0) goto L_0x002e\n r0 = 112202875(0x6b0147b, float:6.6233935E-35)\n if (r5 == r0) goto L_0x0024\n r0 = 1425678798(0x54fa21ce, float:8.5944718E12)\n if (r5 == r0) goto L_0x001a\n goto L_0x0038\n L_0x001a:\n java.lang.String r5 = \"nonvideo\"\n boolean r3 = r3.equals(r5)\n if (r3 == 0) goto L_0x0038\n r3 = 2\n goto L_0x0039\n L_0x0024:\n java.lang.String r5 = \"video\"\n boolean r3 = r3.equals(r5)\n if (r3 == 0) goto L_0x0038\n r3 = 3\n goto L_0x0039\n L_0x002e:\n java.lang.String r5 = \"unknown\"\n boolean r3 = r3.equals(r5)\n if (r3 == 0) goto L_0x0038\n r3 = 1\n goto L_0x0039\n L_0x0038:\n r3 = -1\n L_0x0039:\n if (r3 == r2) goto L_0x0047\n if (r3 == r1) goto L_0x003f\n r3 = 0\n goto L_0x004e\n L_0x003f:\n com.inmobi.media.dm r3 = new com.inmobi.media.dm\n java.lang.String r5 = \"html_video_ad\"\n r3.<init>(r5, r4, r6)\n goto L_0x004e\n L_0x0047:\n com.inmobi.media.dm r3 = new com.inmobi.media.dm\n java.lang.String r5 = \"html_display_ad\"\n r3.<init>(r5, r4)\n L_0x004e:\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.inmobi.media.C2341dp.m4847a(java.lang.String, com.inmobi.media.j, java.lang.String, boolean):com.inmobi.media.dl\");\n }",
"private final com.google.android.play.p179a.p352a.C6210u m28673b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x001b;\n case 26: goto L_0x0058;\n case 34: goto L_0x0065;\n case 42: goto L_0x0072;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f31049b = r0;\n r0 = r6.f31048a;\n r0 = r0 | 1;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x001b:\n r1 = r6.f31048a;\n r1 = r1 | 2;\n r6.f31048a = r1;\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0047 }\n switch(r2) {\n case 0: goto L_0x004f;\n case 1: goto L_0x004f;\n case 2: goto L_0x004f;\n case 3: goto L_0x004f;\n case 4: goto L_0x004f;\n case 5: goto L_0x004f;\n case 6: goto L_0x004f;\n default: goto L_0x002c;\n };\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x002c:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = 38;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = \" is not a valid enum OsType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0047 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x0047:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x004f:\n r6.f31050c = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r6.f31048a;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2 | 2;\n r6.f31048a = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n goto L_0x0000;\n L_0x0058:\n r0 = r7.f();\n r6.f31051d = r0;\n r0 = r6.f31048a;\n r0 = r0 | 4;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0065:\n r0 = r7.f();\n r6.f31052e = r0;\n r0 = r6.f31048a;\n r0 = r0 | 8;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0072:\n r0 = r7.f();\n r6.f31053f = r0;\n r0 = r6.f31048a;\n r0 = r0 | 16;\n r6.f31048a = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.u.b(com.google.protobuf.nano.a):com.google.android.play.a.a.u\");\n }",
"private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }",
"public /* synthetic */ void lambda$createView$6(android.view.View r24) {\n /*\n r23 = this;\n r1 = r23\n org.telegram.ui.ActionBar.Theme$ThemeInfo r0 = org.telegram.ui.ActionBar.Theme.getActiveTheme()\n boolean r2 = r1.isBlurred\n r3 = 0\n java.lang.String r2 = r0.generateWallpaperName(r3, r2)\n boolean r4 = r1.isBlurred\n r5 = 0\n if (r4 == 0) goto L_0x0018\n java.lang.String r0 = r0.generateWallpaperName(r3, r5)\n r4 = r0\n goto L_0x0019\n L_0x0018:\n r4 = r2\n L_0x0019:\n java.io.File r6 = new java.io.File\n java.io.File r0 = org.telegram.messenger.ApplicationLoader.getFilesDirFixed()\n r6.<init>(r0, r2)\n java.lang.Object r0 = r1.currentWallpaper\n boolean r7 = r0 instanceof org.telegram.tgnet.TLRPC$TL_wallPaper\n java.lang.String r8 = \"jpg\"\n java.lang.String r10 = \"t\"\n r11 = 87\n r12 = 1\n if (r7 == 0) goto L_0x008e\n android.graphics.Bitmap r0 = r1.originalBitmap\n if (r0 == 0) goto L_0x0049\n java.io.FileOutputStream r0 = new java.io.FileOutputStream // Catch:{ Exception -> 0x0044 }\n r0.<init>(r6) // Catch:{ Exception -> 0x0044 }\n android.graphics.Bitmap r7 = r1.originalBitmap // Catch:{ Exception -> 0x0044 }\n android.graphics.Bitmap$CompressFormat r13 = android.graphics.Bitmap.CompressFormat.JPEG // Catch:{ Exception -> 0x0044 }\n r7.compress(r13, r11, r0) // Catch:{ Exception -> 0x0044 }\n r0.close() // Catch:{ Exception -> 0x0044 }\n L_0x0042:\n r0 = 1\n goto L_0x0075\n L_0x0044:\n r0 = move-exception\n org.telegram.messenger.FileLog.e((java.lang.Throwable) r0)\n goto L_0x005c\n L_0x0049:\n org.telegram.ui.Components.BackupImageView r0 = r1.backgroundImage\n org.telegram.messenger.ImageReceiver r0 = r0.getImageReceiver()\n boolean r7 = r0.hasNotThumb()\n if (r7 != 0) goto L_0x005e\n boolean r7 = r0.hasStaticThumb()\n if (r7 == 0) goto L_0x005c\n goto L_0x005e\n L_0x005c:\n r0 = 0\n goto L_0x0075\n L_0x005e:\n android.graphics.Bitmap r0 = r0.getBitmap()\n java.io.FileOutputStream r7 = new java.io.FileOutputStream // Catch:{ Exception -> 0x0070 }\n r7.<init>(r6) // Catch:{ Exception -> 0x0070 }\n android.graphics.Bitmap$CompressFormat r13 = android.graphics.Bitmap.CompressFormat.JPEG // Catch:{ Exception -> 0x0070 }\n r0.compress(r13, r11, r7) // Catch:{ Exception -> 0x0070 }\n r7.close() // Catch:{ Exception -> 0x0070 }\n goto L_0x0042\n L_0x0070:\n r0 = move-exception\n org.telegram.messenger.FileLog.e((java.lang.Throwable) r0)\n goto L_0x005c\n L_0x0075:\n if (r0 != 0) goto L_0x012d\n java.lang.Object r0 = r1.currentWallpaper\n org.telegram.tgnet.TLRPC$TL_wallPaper r0 = (org.telegram.tgnet.TLRPC$TL_wallPaper) r0\n org.telegram.tgnet.TLRPC$Document r0 = r0.document\n java.io.File r0 = org.telegram.messenger.FileLoader.getPathToAttach(r0, r12)\n boolean r0 = org.telegram.messenger.AndroidUtilities.copyFile((java.io.File) r0, (java.io.File) r6) // Catch:{ Exception -> 0x0087 }\n goto L_0x012d\n L_0x0087:\n r0 = move-exception\n r7 = r0\n org.telegram.messenger.FileLog.e((java.lang.Throwable) r7)\n goto L_0x0186\n L_0x008e:\n boolean r7 = r0 instanceof org.telegram.ui.WallpapersListActivity.ColorWallpaper\n if (r7 == 0) goto L_0x012f\n org.telegram.tgnet.TLRPC$TL_wallPaper r7 = r1.selectedPattern\n if (r7 == 0) goto L_0x012c\n org.telegram.ui.WallpapersListActivity$ColorWallpaper r0 = (org.telegram.ui.WallpapersListActivity.ColorWallpaper) r0 // Catch:{ all -> 0x0127 }\n org.telegram.ui.Components.BackupImageView r0 = r1.backgroundImage // Catch:{ all -> 0x0127 }\n org.telegram.messenger.ImageReceiver r0 = r0.getImageReceiver() // Catch:{ all -> 0x0127 }\n android.graphics.Bitmap r0 = r0.getBitmap() // Catch:{ all -> 0x0127 }\n int r7 = r0.getWidth() // Catch:{ all -> 0x0127 }\n int r13 = r0.getHeight() // Catch:{ all -> 0x0127 }\n android.graphics.Bitmap$Config r14 = android.graphics.Bitmap.Config.ARGB_8888 // Catch:{ all -> 0x0127 }\n android.graphics.Bitmap r7 = android.graphics.Bitmap.createBitmap(r7, r13, r14) // Catch:{ all -> 0x0127 }\n android.graphics.Canvas r13 = new android.graphics.Canvas // Catch:{ all -> 0x0127 }\n r13.<init>(r7) // Catch:{ all -> 0x0127 }\n int r14 = r1.backgroundGradientColor2 // Catch:{ all -> 0x0127 }\n r15 = 2\n if (r14 == 0) goto L_0x00bb\n goto L_0x00e8\n L_0x00bb:\n int r14 = r1.backgroundGradientColor1 // Catch:{ all -> 0x0127 }\n if (r14 == 0) goto L_0x00e3\n android.graphics.drawable.GradientDrawable r14 = new android.graphics.drawable.GradientDrawable // Catch:{ all -> 0x0127 }\n int r3 = r1.backgroundRotation // Catch:{ all -> 0x0127 }\n android.graphics.drawable.GradientDrawable$Orientation r3 = org.telegram.ui.Components.BackgroundGradientDrawable.getGradientOrientation(r3) // Catch:{ all -> 0x0127 }\n int[] r11 = new int[r15] // Catch:{ all -> 0x0127 }\n int r9 = r1.backgroundColor // Catch:{ all -> 0x0127 }\n r11[r5] = r9 // Catch:{ all -> 0x0127 }\n int r9 = r1.backgroundGradientColor1 // Catch:{ all -> 0x0127 }\n r11[r12] = r9 // Catch:{ all -> 0x0127 }\n r14.<init>(r3, r11) // Catch:{ all -> 0x0127 }\n int r3 = r7.getWidth() // Catch:{ all -> 0x0127 }\n int r9 = r7.getHeight() // Catch:{ all -> 0x0127 }\n r14.setBounds(r5, r5, r3, r9) // Catch:{ all -> 0x0127 }\n r14.draw(r13) // Catch:{ all -> 0x0127 }\n goto L_0x00e8\n L_0x00e3:\n int r3 = r1.backgroundColor // Catch:{ all -> 0x0127 }\n r13.drawColor(r3) // Catch:{ all -> 0x0127 }\n L_0x00e8:\n android.graphics.Paint r3 = new android.graphics.Paint // Catch:{ all -> 0x0127 }\n r3.<init>(r15) // Catch:{ all -> 0x0127 }\n android.graphics.PorterDuffColorFilter r9 = new android.graphics.PorterDuffColorFilter // Catch:{ all -> 0x0127 }\n int r11 = r1.patternColor // Catch:{ all -> 0x0127 }\n android.graphics.PorterDuff$Mode r14 = r1.blendMode // Catch:{ all -> 0x0127 }\n r9.<init>(r11, r14) // Catch:{ all -> 0x0127 }\n r3.setColorFilter(r9) // Catch:{ all -> 0x0127 }\n r9 = 1132396544(0x437var_, float:255.0)\n float r11 = r1.currentIntensity // Catch:{ all -> 0x0127 }\n float r11 = java.lang.Math.abs(r11) // Catch:{ all -> 0x0127 }\n float r11 = r11 * r9\n int r9 = (int) r11 // Catch:{ all -> 0x0127 }\n r3.setAlpha(r9) // Catch:{ all -> 0x0127 }\n r9 = 0\n r13.drawBitmap(r0, r9, r9, r3) // Catch:{ all -> 0x0127 }\n java.io.FileOutputStream r0 = new java.io.FileOutputStream // Catch:{ all -> 0x0127 }\n r0.<init>(r6) // Catch:{ all -> 0x0127 }\n int r3 = r1.backgroundGradientColor2 // Catch:{ all -> 0x0127 }\n if (r3 == 0) goto L_0x011c\n android.graphics.Bitmap$CompressFormat r3 = android.graphics.Bitmap.CompressFormat.PNG // Catch:{ all -> 0x0127 }\n r9 = 100\n r7.compress(r3, r9, r0) // Catch:{ all -> 0x0127 }\n goto L_0x0123\n L_0x011c:\n android.graphics.Bitmap$CompressFormat r3 = android.graphics.Bitmap.CompressFormat.JPEG // Catch:{ all -> 0x0127 }\n r9 = 87\n r7.compress(r3, r9, r0) // Catch:{ all -> 0x0127 }\n L_0x0123:\n r0.close() // Catch:{ all -> 0x0127 }\n goto L_0x012c\n L_0x0127:\n r0 = move-exception\n org.telegram.messenger.FileLog.e((java.lang.Throwable) r0)\n goto L_0x0186\n L_0x012c:\n r0 = 1\n L_0x012d:\n r7 = 0\n goto L_0x0188\n L_0x012f:\n boolean r3 = r0 instanceof org.telegram.ui.WallpapersListActivity.FileWallpaper\n if (r3 == 0) goto L_0x015f\n org.telegram.ui.WallpapersListActivity$FileWallpaper r0 = (org.telegram.ui.WallpapersListActivity.FileWallpaper) r0\n int r3 = r0.resId\n if (r3 != 0) goto L_0x012c\n java.lang.String r3 = r0.slug\n boolean r3 = r10.equals(r3)\n if (r3 == 0) goto L_0x0142\n goto L_0x012c\n L_0x0142:\n java.io.File r3 = r0.originalPath // Catch:{ Exception -> 0x0158 }\n if (r3 == 0) goto L_0x0147\n goto L_0x0149\n L_0x0147:\n java.io.File r3 = r0.path // Catch:{ Exception -> 0x0158 }\n L_0x0149:\n boolean r7 = r3.equals(r6) // Catch:{ Exception -> 0x0158 }\n if (r7 == 0) goto L_0x0151\n r0 = 1\n goto L_0x0188\n L_0x0151:\n boolean r0 = org.telegram.messenger.AndroidUtilities.copyFile((java.io.File) r3, (java.io.File) r6) // Catch:{ Exception -> 0x0156 }\n goto L_0x0188\n L_0x0156:\n r0 = move-exception\n goto L_0x015a\n L_0x0158:\n r0 = move-exception\n r7 = 0\n L_0x015a:\n org.telegram.messenger.FileLog.e((java.lang.Throwable) r0)\n r0 = 0\n goto L_0x0188\n L_0x015f:\n boolean r3 = r0 instanceof org.telegram.messenger.MediaController.SearchImage\n if (r3 == 0) goto L_0x0186\n org.telegram.messenger.MediaController$SearchImage r0 = (org.telegram.messenger.MediaController.SearchImage) r0\n org.telegram.tgnet.TLRPC$Photo r3 = r0.photo\n if (r3 == 0) goto L_0x0176\n java.util.ArrayList<org.telegram.tgnet.TLRPC$PhotoSize> r0 = r3.sizes\n int r3 = r1.maxWallpaperSize\n org.telegram.tgnet.TLRPC$PhotoSize r0 = org.telegram.messenger.FileLoader.getClosestPhotoSizeWithSize(r0, r3, r12)\n java.io.File r0 = org.telegram.messenger.FileLoader.getPathToAttach(r0, r12)\n goto L_0x017c\n L_0x0176:\n java.lang.String r0 = r0.imageUrl\n java.io.File r0 = org.telegram.messenger.ImageLoader.getHttpFilePath(r0, r8)\n L_0x017c:\n boolean r0 = org.telegram.messenger.AndroidUtilities.copyFile((java.io.File) r0, (java.io.File) r6) // Catch:{ Exception -> 0x0181 }\n goto L_0x012d\n L_0x0181:\n r0 = move-exception\n r3 = r0\n org.telegram.messenger.FileLog.e((java.lang.Throwable) r3)\n L_0x0186:\n r0 = 0\n goto L_0x012d\n L_0x0188:\n boolean r3 = r1.isBlurred\n if (r3 == 0) goto L_0x01ad\n java.io.File r0 = new java.io.File // Catch:{ all -> 0x01a8 }\n java.io.File r3 = org.telegram.messenger.ApplicationLoader.getFilesDirFixed() // Catch:{ all -> 0x01a8 }\n r0.<init>(r3, r4) // Catch:{ all -> 0x01a8 }\n java.io.FileOutputStream r3 = new java.io.FileOutputStream // Catch:{ all -> 0x01a8 }\n r3.<init>(r0) // Catch:{ all -> 0x01a8 }\n android.graphics.Bitmap r0 = r1.blurredBitmap // Catch:{ all -> 0x01a8 }\n android.graphics.Bitmap$CompressFormat r9 = android.graphics.Bitmap.CompressFormat.JPEG // Catch:{ all -> 0x01a8 }\n r11 = 87\n r0.compress(r9, r11, r3) // Catch:{ all -> 0x01a8 }\n r3.close() // Catch:{ all -> 0x01a8 }\n r0 = 1\n goto L_0x01ad\n L_0x01a8:\n r0 = move-exception\n org.telegram.messenger.FileLog.e((java.lang.Throwable) r0)\n r0 = 0\n L_0x01ad:\n r3 = 45\n java.lang.Object r9 = r1.currentWallpaper\n boolean r11 = r9 instanceof org.telegram.tgnet.TLRPC$TL_wallPaper\n java.lang.String r13 = \"c\"\n java.lang.String r14 = \"d\"\n if (r11 == 0) goto L_0x01c4\n org.telegram.tgnet.TLRPC$TL_wallPaper r9 = (org.telegram.tgnet.TLRPC$TL_wallPaper) r9\n java.lang.String r8 = r9.slug\n L_0x01bd:\n r9 = 0\n r11 = 0\n r15 = 0\n L_0x01c0:\n r17 = 0\n goto L_0x0221\n L_0x01c4:\n boolean r11 = r9 instanceof org.telegram.ui.WallpapersListActivity.ColorWallpaper\n if (r11 == 0) goto L_0x01ed\n org.telegram.ui.WallpapersListActivity$ColorWallpaper r9 = (org.telegram.ui.WallpapersListActivity.ColorWallpaper) r9\n java.lang.String r8 = r9.slug\n boolean r8 = r14.equals(r8)\n if (r8 == 0) goto L_0x01d4\n r8 = r14\n goto L_0x01bd\n L_0x01d4:\n org.telegram.tgnet.TLRPC$TL_wallPaper r3 = r1.selectedPattern\n if (r3 == 0) goto L_0x01db\n java.lang.String r3 = r3.slug\n goto L_0x01dc\n L_0x01db:\n r3 = r13\n L_0x01dc:\n int r8 = r1.backgroundColor\n int r9 = r1.backgroundGradientColor1\n int r11 = r1.backgroundGradientColor2\n int r15 = r1.backgroundGradientColor3\n int r5 = r1.backgroundRotation\n r22 = r8\n r8 = r3\n r3 = r5\n r5 = r22\n goto L_0x01c0\n L_0x01ed:\n boolean r5 = r9 instanceof org.telegram.ui.WallpapersListActivity.FileWallpaper\n if (r5 == 0) goto L_0x01fe\n org.telegram.ui.WallpapersListActivity$FileWallpaper r9 = (org.telegram.ui.WallpapersListActivity.FileWallpaper) r9\n java.lang.String r8 = r9.slug\n java.io.File r5 = r9.path\n L_0x01f7:\n r17 = r5\n r5 = 0\n r9 = 0\n r11 = 0\n r15 = 0\n goto L_0x0221\n L_0x01fe:\n boolean r5 = r9 instanceof org.telegram.messenger.MediaController.SearchImage\n if (r5 == 0) goto L_0x021e\n org.telegram.messenger.MediaController$SearchImage r9 = (org.telegram.messenger.MediaController.SearchImage) r9\n org.telegram.tgnet.TLRPC$Photo r5 = r9.photo\n if (r5 == 0) goto L_0x0215\n java.util.ArrayList<org.telegram.tgnet.TLRPC$PhotoSize> r5 = r5.sizes\n int r8 = r1.maxWallpaperSize\n org.telegram.tgnet.TLRPC$PhotoSize r5 = org.telegram.messenger.FileLoader.getClosestPhotoSizeWithSize(r5, r8, r12)\n java.io.File r5 = org.telegram.messenger.FileLoader.getPathToAttach(r5, r12)\n goto L_0x021b\n L_0x0215:\n java.lang.String r5 = r9.imageUrl\n java.io.File r5 = org.telegram.messenger.ImageLoader.getHttpFilePath(r5, r8)\n L_0x021b:\n java.lang.String r8 = \"\"\n goto L_0x01f7\n L_0x021e:\n r8 = r14\n r5 = 0\n goto L_0x01bd\n L_0x0221:\n org.telegram.ui.ActionBar.Theme$OverrideWallpaperInfo r12 = new org.telegram.ui.ActionBar.Theme$OverrideWallpaperInfo\n r12.<init>()\n r12.fileName = r4\n r12.originalFileName = r2\n r12.slug = r8\n boolean r2 = r1.isBlurred\n r12.isBlurred = r2\n boolean r2 = r1.isMotion\n r12.isMotion = r2\n r12.color = r5\n r12.gradientColor1 = r9\n r12.gradientColor2 = r11\n r12.gradientColor3 = r15\n r12.rotation = r3\n float r2 = r1.currentIntensity\n r12.intensity = r2\n java.lang.Object r2 = r1.currentWallpaper\n boolean r4 = r2 instanceof org.telegram.ui.WallpapersListActivity.ColorWallpaper\n if (r4 == 0) goto L_0x02b0\n org.telegram.ui.WallpapersListActivity$ColorWallpaper r2 = (org.telegram.ui.WallpapersListActivity.ColorWallpaper) r2\n boolean r4 = r13.equals(r8)\n if (r4 != 0) goto L_0x025e\n boolean r4 = r10.equals(r8)\n if (r4 != 0) goto L_0x025e\n boolean r4 = r14.equals(r8)\n if (r4 != 0) goto L_0x025e\n r4 = r8\n goto L_0x025f\n L_0x025e:\n r4 = 0\n L_0x025f:\n float r13 = r2.intensity\n r14 = 0\n int r14 = (r13 > r14 ? 1 : (r13 == r14 ? 0 : -1))\n if (r14 >= 0) goto L_0x0274\n org.telegram.ui.ActionBar.Theme$ThemeInfo r14 = org.telegram.ui.ActionBar.Theme.getActiveTheme()\n boolean r14 = r14.isDark()\n if (r14 != 0) goto L_0x0274\n r14 = -1082130432(0xffffffffbvar_, float:-1.0)\n float r13 = r13 * r14\n L_0x0274:\n org.telegram.tgnet.TLRPC$WallPaper r14 = r2.parentWallpaper\n if (r14 == 0) goto L_0x02b0\n int r14 = r2.color\n if (r14 != r5) goto L_0x02b0\n int r5 = r2.gradientColor1\n if (r5 != r9) goto L_0x02b0\n int r5 = r2.gradientColor2\n if (r5 != r11) goto L_0x02b0\n int r5 = r2.gradientColor3\n if (r5 != r15) goto L_0x02b0\n java.lang.String r5 = r2.slug\n boolean r4 = android.text.TextUtils.equals(r5, r4)\n if (r4 == 0) goto L_0x02b0\n int r4 = r2.gradientRotation\n if (r4 != r3) goto L_0x02b0\n org.telegram.tgnet.TLRPC$TL_wallPaper r3 = r1.selectedPattern\n if (r3 == 0) goto L_0x02a6\n float r3 = r1.currentIntensity\n float r13 = r13 - r3\n float r3 = java.lang.Math.abs(r13)\n r4 = 981668463(0x3a83126f, float:0.001)\n int r3 = (r3 > r4 ? 1 : (r3 == r4 ? 0 : -1))\n if (r3 >= 0) goto L_0x02b0\n L_0x02a6:\n org.telegram.tgnet.TLRPC$WallPaper r2 = r2.parentWallpaper\n long r3 = r2.id\n r12.wallpaperId = r3\n long r2 = r2.access_hash\n r12.accessHash = r2\n L_0x02b0:\n int r2 = r1.currentAccount\n org.telegram.messenger.MessagesController r2 = org.telegram.messenger.MessagesController.getInstance(r2)\n if (r8 == 0) goto L_0x02bb\n r19 = 1\n goto L_0x02bd\n L_0x02bb:\n r19 = 0\n L_0x02bd:\n r20 = 0\n r16 = r2\n r18 = r12\n r16.saveWallpaperToServer(r17, r18, r19, r20)\n if (r0 == 0) goto L_0x0307\n java.lang.String r0 = \"chat_serviceBackground\"\n int r0 = org.telegram.ui.ActionBar.Theme.getColor(r0)\n org.telegram.ui.ActionBar.Theme.serviceMessageColorBackup = r0\n java.lang.String r0 = r12.slug\n boolean r0 = r10.equals(r0)\n if (r0 == 0) goto L_0x02da\n r3 = 0\n goto L_0x02db\n L_0x02da:\n r3 = r12\n L_0x02db:\n org.telegram.ui.ActionBar.Theme$ThemeInfo r0 = org.telegram.ui.ActionBar.Theme.getActiveTheme()\n r0.setOverrideWallpaper(r3)\n org.telegram.ui.ActionBar.Theme.reloadWallpaper()\n if (r7 != 0) goto L_0x0307\n org.telegram.messenger.ImageLoader r0 = org.telegram.messenger.ImageLoader.getInstance()\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = r6.getAbsolutePath()\n java.lang.String r3 = org.telegram.messenger.ImageLoader.getHttpFileName(r3)\n r2.append(r3)\n java.lang.String r3 = \"@100_100\"\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r0.removeImage(r2)\n L_0x0307:\n org.telegram.ui.ThemePreviewActivity$WallpaperActivityDelegate r0 = r1.delegate\n if (r0 == 0) goto L_0x030e\n r0.didSetNewBackground()\n L_0x030e:\n r23.finishFragment()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.ui.ThemePreviewActivity.lambda$createView$6(android.view.View):void\");\n }",
"@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }",
"private static void m13385d() {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }",
"static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private final void m699a(boolean r24, boolean r25, boolean r26, boolean r27, boolean r28) {\n /*\n r23 = this;\n r1 = r23\n bkp r0 = r1.f516a\n r0.mo2044a()\n r2 = 0\n r1.f538w = r2\n ajf r0 = r1.f528m\n r0.mo377a()\n r3 = 0\n r1.f513D = r3\n akx[] r3 = r1.f535t\n int r4 = r3.length\n r5 = 0\n L_0x0017:\n java.lang.String r6 = \"ExoPlayerImplInternal\"\n if (r5 >= r4) goto L_0x002c\n r0 = r3[r5]\n r1.m695a(r0) // Catch:{ ajh -> 0x0023, RuntimeException -> 0x0021 }\n goto L_0x0029\n L_0x0021:\n r0 = move-exception\n goto L_0x0024\n L_0x0023:\n r0 = move-exception\n L_0x0024:\n java.lang.String r7 = \"Disable failed.\"\n android.util.Log.e(r6, r7, r0)\n L_0x0029:\n int r5 = r5 + 1\n goto L_0x0017\n L_0x002c:\n if (r24 == 0) goto L_0x0045\n akx[] r3 = r1.f518c\n int r4 = r3.length\n r5 = 0\n L_0x0032:\n if (r5 < r4) goto L_0x0035\n goto L_0x0045\n L_0x0035:\n r0 = r3[r5]\n r0.mo366n() // Catch:{ RuntimeException -> 0x003b }\n goto L_0x0042\n L_0x003b:\n r0 = move-exception\n r7 = r0\n java.lang.String r0 = \"Reset failed.\"\n android.util.Log.e(r6, r0, r7)\n L_0x0042:\n int r5 = r5 + 1\n goto L_0x0032\n L_0x0045:\n akx[] r0 = new p000.akx[r2]\n r1.f535t = r0\n r0 = 0\n r3 = 1\n if (r26 == 0) goto L_0x0050\n r1.f512C = r0\n goto L_0x0084\n L_0x0050:\n if (r27 == 0) goto L_0x0083\n akd r4 = r1.f512C\n if (r4 != 0) goto L_0x0082\n akp r4 = r1.f533r\n alh r4 = r4.f611a\n boolean r4 = r4.mo552c()\n if (r4 != 0) goto L_0x0081\n akp r4 = r1.f533r\n alh r5 = r4.f611a\n awt r4 = r4.f612b\n java.lang.Object r4 = r4.f2566a\n alf r6 = r1.f526k\n r5.mo547a(r4, r6)\n akp r4 = r1.f533r\n long r4 = r4.f623m\n alf r6 = r1.f526k\n long r6 = r6.f669c\n akd r8 = new akd\n alh r9 = p000.alh.f685a\n long r4 = r4 + r6\n r8.<init>(r9, r2, r4)\n r1.f512C = r8\n goto L_0x0086\n L_0x0081:\n L_0x0082:\n goto L_0x0086\n L_0x0083:\n L_0x0084:\n r3 = r26\n L_0x0086:\n akn r4 = r1.f531p\n r5 = r27 ^ 1\n r4.mo454a(r5)\n r1.f539x = r2\n if (r27 == 0) goto L_0x00ae\n akn r4 = r1.f531p\n alh r5 = p000.alh.f685a\n r4.f598a = r5\n java.util.ArrayList r4 = r1.f530o\n int r5 = r4.size()\n if (r5 > 0) goto L_0x00a7\n java.util.ArrayList r4 = r1.f530o\n r4.clear()\n r1.f514E = r2\n goto L_0x00ae\n L_0x00a7:\n java.lang.Object r2 = r4.get(r2)\n akb r2 = (p000.akb) r2\n throw r0\n L_0x00ae:\n if (r3 == 0) goto L_0x00bd\n akp r2 = r1.f533r\n alg r4 = r1.f525j\n alf r5 = r1.f526k\n awt r2 = r2.mo461a(r4, r5)\n r16 = r2\n goto L_0x00c3\n L_0x00bd:\n akp r2 = r1.f533r\n awt r2 = r2.f612b\n r16 = r2\n L_0x00c3:\n r4 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r3 != 0) goto L_0x00d1\n akp r2 = r1.f533r\n long r6 = r2.f623m\n r21 = r6\n goto L_0x00d4\n L_0x00d1:\n r21 = r4\n L_0x00d4:\n if (r3 != 0) goto L_0x00dc\n akp r2 = r1.f533r\n long r2 = r2.f614d\n r9 = r2\n goto L_0x00de\n L_0x00dc:\n r9 = r4\n L_0x00de:\n akp r2 = new akp\n if (r27 != 0) goto L_0x00e8\n akp r3 = r1.f533r\n alh r3 = r3.f611a\n r5 = r3\n goto L_0x00eb\n L_0x00e8:\n alh r3 = p000.alh.f685a\n r5 = r3\n L_0x00eb:\n akp r3 = r1.f533r\n int r11 = r3.f615e\n if (r28 != 0) goto L_0x00f5\n ajh r4 = r3.f616f\n r12 = r4\n goto L_0x00f7\n L_0x00f5:\n r12 = r0\n L_0x00f7:\n if (r27 != 0) goto L_0x00fd\n aye r3 = r3.f618h\n r14 = r3\n goto L_0x0100\n L_0x00fd:\n aye r3 = p000.aye.f2750a\n r14 = r3\n L_0x0100:\n if (r27 != 0) goto L_0x0108\n akp r3 = r1.f533r\n bgr r3 = r3.f619i\n r15 = r3\n goto L_0x010b\n L_0x0108:\n bgr r3 = r1.f521f\n r15 = r3\n L_0x010b:\n r13 = 0\n r19 = 0\n r4 = r2\n r6 = r16\n r7 = r21\n r17 = r21\n r4.<init>(r5, r6, r7, r9, r11, r12, r13, r14, r15, r16, r17, r19, r21)\n r1.f533r = r2\n if (r25 == 0) goto L_0x0125\n awv r2 = r1.f534s\n if (r2 == 0) goto L_0x0125\n r2.mo1475c(r1)\n r1.f534s = r0\n L_0x0125:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m699a(boolean, boolean, boolean, boolean, boolean):void\");\n }",
"void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private final void zzaj() {\n /*\n r6 = this;\n java.lang.Object r0 = r6.zzsC\n monitor-enter(r0)\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = r6.zzsD // Catch:{ all -> 0x0026 }\n if (r1 == 0) goto L_0x0013\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = r6.zzsD // Catch:{ all -> 0x0026 }\n java.util.concurrent.CountDownLatch r1 = r1.zzsI // Catch:{ all -> 0x0026 }\n r1.countDown() // Catch:{ all -> 0x0026 }\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = r6.zzsD // Catch:{ InterruptedException -> 0x0013 }\n r1.join() // Catch:{ InterruptedException -> 0x0013 }\n L_0x0013:\n long r1 = r6.zzsE // Catch:{ all -> 0x0026 }\n r3 = 0\n int r5 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))\n if (r5 <= 0) goto L_0x0024\n com.google.android.gms.ads.identifier.AdvertisingIdClient$zza r1 = new com.google.android.gms.ads.identifier.AdvertisingIdClient$zza // Catch:{ all -> 0x0026 }\n long r2 = r6.zzsE // Catch:{ all -> 0x0026 }\n r1.<init>(r6, r2) // Catch:{ all -> 0x0026 }\n r6.zzsD = r1 // Catch:{ all -> 0x0026 }\n L_0x0024:\n monitor-exit(r0) // Catch:{ all -> 0x0026 }\n return\n L_0x0026:\n r1 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0026 }\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.identifier.AdvertisingIdClient.zzaj():void\");\n }",
"public org.a9 a() {\n /*\n r4 = this;\n r1 = 0;\n r0 = r4.c;\n if (r0 != 0) goto L_0x0040;\n L_0x0005:\n monitor-enter(r4);\n r0 = r4.c;\t Catch:{ all -> 0x0043 }\n if (r0 != 0) goto L_0x003f;\n L_0x000a:\n r2 = r4.e;\t Catch:{ IllegalArgumentException -> 0x0041 }\n if (r2 != 0) goto L_0x003f;\n L_0x000e:\n r0 = r4.b;\t Catch:{ all -> 0x0043 }\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 8;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n r3 = 0;\n r0 = r0.getSharedPreferences(r2, r3);\t Catch:{ all -> 0x0043 }\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 6;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n r3 = \"\";\n r0 = r0.getString(r2, r3);\t Catch:{ all -> 0x0043 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ IllegalArgumentException -> 0x0046 }\n if (r2 == 0) goto L_0x0053;\n L_0x002d:\n r2 = r1;\n L_0x002e:\n if (r2 == 0) goto L_0x0039;\n L_0x0030:\n r0 = new org.a9;\t Catch:{ IllegalArgumentException -> 0x0048 }\n r0.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0048 }\n r2 = com.whatsapp.DialogToastActivity.f;\t Catch:{ IllegalArgumentException -> 0x0048 }\n if (r2 == 0) goto L_0x003a;\n L_0x0039:\n r0 = r1;\n L_0x003a:\n r4.c = r0;\t Catch:{ all -> 0x0043 }\n r1 = 1;\n r4.e = r1;\t Catch:{ all -> 0x0043 }\n L_0x003f:\n monitor-exit(r4);\t Catch:{ all -> 0x0043 }\n L_0x0040:\n return r0;\n L_0x0041:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0043 }\n L_0x0043:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0043 }\n throw r0;\n L_0x0046:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0048 }\n L_0x0048:\n r0 = move-exception;\n r2 = z;\t Catch:{ all -> 0x0043 }\n r3 = 7;\n r2 = r2[r3];\t Catch:{ all -> 0x0043 }\n com.whatsapp.util.Log.c(r2, r0);\t Catch:{ all -> 0x0043 }\n r0 = r1;\n goto L_0x003a;\n L_0x0053:\n r2 = 3;\n r0 = android.backport.util.Base64.decode(r0, r2);\t Catch:{ IllegalArgumentException -> 0x0048 }\n r2 = r0;\n goto L_0x002e;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.l9.a():org.a9\");\n }",
"void m1864a() {\r\n }",
"@Override\n public final void run() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 3: invokevirtual cd.I:()V\n // 6: getstatic u.Code:Lbn;\n // 9: invokeinterface bn.p:()Z\n // 14: ifne 43\n // 17: aload_0 \n // 18: monitorenter \n // 19: invokestatic com/opera/mini/android/bf.c:()Z\n // 22: ifne 62\n // 25: aload_0 \n // 26: iconst_0 \n // 27: invokestatic cg.Code:(Ljava/lang/Object;I)V\n // 30: getstatic u.Code:Lbn;\n // 33: invokeinterface bn.p:()Z\n // 38: ifeq 62\n // 41: aload_0 \n // 42: monitorexit \n // 43: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 46: ifnull 55\n // 49: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 52: invokevirtual com/opera/mini/android/k.g:()V\n // 55: invokestatic com/opera/mini/android/bf.B:()Lcd;\n // 58: invokevirtual cd.Z:()V\n // 61: return \n // 62: invokestatic com/opera/mini/android/bf.d:()Z\n // 65: pop \n // 66: invokestatic com/opera/mini/android/bf.e:()I\n // 69: istore_1 \n // 70: invokestatic com/opera/mini/android/bf.f:()I\n // 73: istore_2 \n // 74: invokestatic com/opera/mini/android/bf.g:()I\n // 77: istore_3 \n // 78: invokestatic com/opera/mini/android/bf.h:()I\n // 81: istore 4\n // 83: iconst_0 \n // 84: invokestatic com/opera/mini/android/bf.Code:(I)I\n // 87: pop \n // 88: aload_0 \n // 89: monitorexit \n // 90: aload_0 \n // 91: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 94: invokevirtual com/opera/mini/android/bf.getWidth:()I\n // 97: istore 5\n // 99: aload_0 \n // 100: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 103: invokevirtual com/opera/mini/android/bf.getHeight:()I\n // 106: istore 6\n // 108: iload 5\n // 110: ifle 6\n // 113: iload 6\n // 115: ifle 6\n // 118: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 121: ifnull 146\n // 124: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 127: invokevirtual android/graphics/Bitmap.getWidth:()I\n // 130: iload 5\n // 132: if_icmpne 146\n // 135: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 138: invokevirtual android/graphics/Bitmap.getHeight:()I\n // 141: iload 6\n // 143: if_icmpeq 209\n // 146: aconst_null \n // 147: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/k;)Lcom/opera/mini/android/k;\n // 150: pop \n // 151: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 154: ifnull 168\n // 157: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 160: invokevirtual android/graphics/Bitmap.recycle:()V\n // 163: aconst_null \n // 164: invokestatic com/opera/mini/android/bf.Code:(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;\n // 167: pop \n // 168: iload 5\n // 170: iload 6\n // 172: invokestatic com/opera/mini/android/bg.Code:(II)Landroid/graphics/Bitmap;\n // 175: invokestatic com/opera/mini/android/bf.Code:(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;\n // 178: pop \n // 179: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 182: ifnull 55\n // 185: aload_0 \n // 186: monitorenter \n // 187: invokestatic com/opera/mini/android/bf.j:()I\n // 190: pop \n // 191: invokestatic com/opera/mini/android/bf.k:()I\n // 194: pop \n // 195: iload 5\n // 197: invokestatic com/opera/mini/android/bf.Code:(I)I\n // 200: pop \n // 201: iload 6\n // 203: invokestatic com/opera/mini/android/bf.I:(I)I\n // 206: pop \n // 207: aload_0 \n // 208: monitorexit \n // 209: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 212: ifnonnull 242\n // 215: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 218: invokestatic com/opera/mini/android/k.I:(Landroid/graphics/Bitmap;)Lcom/opera/mini/android/k;\n // 221: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/k;)Lcom/opera/mini/android/k;\n // 224: pop \n // 225: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 228: iconst_1 \n // 229: invokevirtual com/opera/mini/android/k.Code:(Z)V\n // 232: aload_0 \n // 233: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 236: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/bf;)Lcom/opera/mini/android/MiniView;\n // 239: invokevirtual com/opera/mini/android/MiniView.I:()V\n // 242: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 245: invokevirtual com/opera/mini/android/k.a:()Z\n // 248: ifeq 290\n // 251: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 254: iload_1 \n // 255: iload_2 \n // 256: iload_3 \n // 257: iload 4\n // 259: invokevirtual com/opera/mini/android/k.Code:(IIII)V\n // 262: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 265: iload_1 \n // 266: iload_2 \n // 267: iload_3 \n // 268: iload 4\n // 270: ldc 16777215\n // 272: invokevirtual com/opera/mini/android/k.Z:(IIIII)V\n // 275: getstatic com/opera/mini/android/Browser.Code:Lcom/opera/mini/android/a;\n // 278: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 281: invokevirtual com/opera/mini/android/a.Code:(Law;)V\n // 284: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 287: invokevirtual com/opera/mini/android/k.b:()V\n // 290: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 293: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 296: invokevirtual com/opera/mini/android/k.Code:(Landroid/graphics/Bitmap;)V\n // 299: aload_0 \n // 300: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 303: invokestatic com/opera/mini/android/bf.I:(Lcom/opera/mini/android/bf;)Landroid/view/SurfaceHolder;\n // 306: invokeinterface android/view/SurfaceHolder.lockCanvas:()Landroid/graphics/Canvas;\n // 311: astore 7\n // 313: aload 7\n // 315: ifnull 6\n // 318: aload 7\n // 320: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 323: fconst_0 \n // 324: fconst_0 \n // 325: aconst_null \n // 326: invokevirtual android/graphics/Canvas.drawBitmap:(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V\n // 329: aload_0 \n // 330: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 333: invokestatic com/opera/mini/android/bf.I:(Lcom/opera/mini/android/bf;)Landroid/view/SurfaceHolder;\n // 336: aload 7\n // 338: invokeinterface android/view/SurfaceHolder.unlockCanvasAndPost:(Landroid/graphics/Canvas;)V\n // 343: goto 6\n // 346: astore 7\n // 348: invokestatic com/opera/mini/android/bf.B:()Lcd;\n // 351: invokevirtual cd.Z:()V\n // 354: aload 7\n // 356: athrow \n // 357: astore 7\n // 359: aload_0 \n // 360: monitorexit \n // 361: aload 7\n // 363: athrow \n // 364: astore 7\n // 366: aload_0 \n // 367: monitorexit \n // 368: aload 7\n // 370: athrow \n // Exceptions:\n // Try Handler\n // Start End Start End Type\n // ----- ----- ----- ----- ----\n // 6 19 346 357 Any\n // 19 43 357 364 Any\n // 43 55 346 357 Any\n // 62 90 357 364 Any\n // 90 108 346 357 Any\n // 118 146 346 357 Any\n // 146 168 346 357 Any\n // 168 187 346 357 Any\n // 187 209 364 371 Any\n // 209 242 346 357 Any\n // 242 290 346 357 Any\n // 290 313 346 357 Any\n // 318 343 346 357 Any\n // 359 364 346 357 Any\n // 366 371 346 357 Any\n // \n // The error that occurred was:\n // \n // java.lang.IndexOutOfBoundsException: Index: 163, Size: 163\n // at java.util.ArrayList.rangeCheck(ArrayList.java:659)\n // at java.util.ArrayList.get(ArrayList.java:435)\n // at com.strobel.decompiler.ast.AstBuilder.convertToAst(AstBuilder.java:3379)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:113)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:206)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:94)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:840)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:733)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:610)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:577)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:193)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:160)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:135)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:333)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:254)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"protected final /* synthetic */ java.lang.Object run() {\n /*\n r4 = this;\n r0 = 1;\n r1 = 0;\n r2 = com.tencent.mm.plugin.appbrand.b.c.this;\n r2 = r2.chu();\n r3 = com.tencent.mm.plugin.appbrand.b.c.this;\n r3 = r3.iKh;\n if (r2 != r3) goto L_0x0022;\n L_0x000e:\n r2 = com.tencent.mm.plugin.appbrand.b.c.this;\n r2 = r2.iKh;\n r2 = r2.iKy;\n r2 = r2 & 1;\n if (r2 <= 0) goto L_0x0020;\n L_0x0018:\n r2 = r0;\n L_0x0019:\n if (r2 == 0) goto L_0x0022;\n L_0x001b:\n r0 = java.lang.Boolean.valueOf(r0);\n return r0;\n L_0x0020:\n r2 = r1;\n goto L_0x0019;\n L_0x0022:\n r0 = r1;\n goto L_0x001b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.b.c.5.run():java.lang.Object\");\n }",
"private synchronized void a(com.whatsapp.util.x r11, boolean r12) {\n /*\n r10 = this;\n r0 = 0;\n monitor-enter(r10);\n r2 = com.whatsapp.util.Log.h;\t Catch:{ all -> 0x0016 }\n r3 = com.whatsapp.util.x.a(r11);\t Catch:{ all -> 0x0016 }\n r1 = com.whatsapp.util.bl.b(r3);\t Catch:{ IllegalArgumentException -> 0x0014 }\n if (r1 == r11) goto L_0x0019;\n L_0x000e:\n r0 = new java.lang.IllegalStateException;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r0.<init>();\t Catch:{ IllegalArgumentException -> 0x0014 }\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0014 }\n L_0x0014:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0016:\n r0 = move-exception;\n monitor-exit(r10);\n throw r0;\n L_0x0019:\n if (r12 == 0) goto L_0x0058;\n L_0x001b:\n r1 = com.whatsapp.util.bl.d(r3);\t Catch:{ IllegalArgumentException -> 0x0052 }\n if (r1 != 0) goto L_0x0058;\n L_0x0021:\n r1 = r0;\n L_0x0022:\n r4 = r10.b;\t Catch:{ all -> 0x0016 }\n if (r1 >= r4) goto L_0x0058;\n L_0x0026:\n r4 = r3.b(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r4 = r4.exists();\t Catch:{ IllegalArgumentException -> 0x0050 }\n if (r4 != 0) goto L_0x0054;\n L_0x0030:\n r11.b();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r0 = new java.lang.IllegalStateException;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2.<init>();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r3 = z;\t Catch:{ IllegalArgumentException -> 0x0050 }\n r4 = 24;\n r3 = r3[r4];\t Catch:{ IllegalArgumentException -> 0x0050 }\n r2 = r2.append(r3);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r1 = r2.append(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x0050 }\n r0.<init>(r1);\t Catch:{ IllegalArgumentException -> 0x0050 }\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0050 }\n L_0x0050:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0052:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0054:\n r1 = r1 + 1;\n if (r2 == 0) goto L_0x0022;\n L_0x0058:\n r1 = r10.b;\t Catch:{ all -> 0x0016 }\n if (r0 >= r1) goto L_0x008f;\n L_0x005c:\n r1 = r3.b(r0);\t Catch:{ all -> 0x0016 }\n if (r12 == 0) goto L_0x0088;\n L_0x0062:\n r4 = r1.exists();\t Catch:{ IllegalArgumentException -> 0x0126 }\n if (r4 == 0) goto L_0x008b;\n L_0x0068:\n r4 = r3.a(r0);\t Catch:{ all -> 0x0016 }\n r1.renameTo(r4);\t Catch:{ all -> 0x0016 }\n r5 = com.whatsapp.util.bl.e(r3);\t Catch:{ all -> 0x0016 }\n r6 = r5[r0];\t Catch:{ all -> 0x0016 }\n r4 = r4.length();\t Catch:{ all -> 0x0016 }\n r8 = com.whatsapp.util.bl.e(r3);\t Catch:{ IllegalArgumentException -> 0x0128 }\n r8[r0] = r4;\t Catch:{ IllegalArgumentException -> 0x0128 }\n r8 = r10.i;\t Catch:{ IllegalArgumentException -> 0x0128 }\n r6 = r8 - r6;\n r4 = r4 + r6;\n r10.i = r4;\t Catch:{ IllegalArgumentException -> 0x0128 }\n if (r2 == 0) goto L_0x008b;\n L_0x0088:\n a(r1);\t Catch:{ IllegalArgumentException -> 0x0128 }\n L_0x008b:\n r0 = r0 + 1;\n if (r2 == 0) goto L_0x0058;\n L_0x008f:\n r0 = r10.e;\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = r0 + 1;\n r10.e = r0;\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = 0;\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = com.whatsapp.util.bl.d(r3);\t Catch:{ IllegalArgumentException -> 0x012a }\n r0 = r0 | r12;\n if (r0 == 0) goto L_0x00e0;\n L_0x00a0:\n r0 = 1;\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012c }\n r0 = r10.m;\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x012c }\n r1.<init>();\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = z;\t Catch:{ IllegalArgumentException -> 0x012c }\n r5 = 26;\n r4 = r4[r5];\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = r3.a();\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r4 = 10;\n r1 = r1.append(r4);\t Catch:{ IllegalArgumentException -> 0x012c }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x012c }\n r0.write(r1);\t Catch:{ IllegalArgumentException -> 0x012c }\n if (r12 == 0) goto L_0x010f;\n L_0x00d4:\n r0 = r10.n;\t Catch:{ IllegalArgumentException -> 0x012e }\n r4 = 1;\n r4 = r4 + r0;\n r10.n = r4;\t Catch:{ IllegalArgumentException -> 0x012e }\n com.whatsapp.util.bl.a(r3, r0);\t Catch:{ IllegalArgumentException -> 0x012e }\n if (r2 == 0) goto L_0x010f;\n L_0x00e0:\n r0 = r10.k;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012e }\n r0.remove(r1);\t Catch:{ IllegalArgumentException -> 0x012e }\n r0 = r10.m;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x012e }\n r1.<init>();\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = z;\t Catch:{ IllegalArgumentException -> 0x012e }\n r4 = 25;\n r2 = r2[r4];\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = com.whatsapp.util.bl.a(r3);\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r2 = 10;\n r1 = r1.append(r2);\t Catch:{ IllegalArgumentException -> 0x012e }\n r1 = r1.toString();\t Catch:{ IllegalArgumentException -> 0x012e }\n r0.write(r1);\t Catch:{ IllegalArgumentException -> 0x012e }\n L_0x010f:\n r0 = r10.i;\t Catch:{ IllegalArgumentException -> 0x0130 }\n r2 = r10.c;\t Catch:{ IllegalArgumentException -> 0x0130 }\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 > 0) goto L_0x011d;\n L_0x0117:\n r0 = r10.f();\t Catch:{ IllegalArgumentException -> 0x0132 }\n if (r0 == 0) goto L_0x0124;\n L_0x011d:\n r0 = r10.d;\t Catch:{ IllegalArgumentException -> 0x0132 }\n r1 = r10.j;\t Catch:{ IllegalArgumentException -> 0x0132 }\n r0.submit(r1);\t Catch:{ IllegalArgumentException -> 0x0132 }\n L_0x0124:\n monitor-exit(r10);\n return;\n L_0x0126:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0128:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x012a:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x012c }\n L_0x012c:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x012e }\n L_0x012e:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n L_0x0130:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalArgumentException -> 0x0132 }\n L_0x0132:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0016 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.util.b6.a(com.whatsapp.util.x, boolean):void\");\n }",
"public final synchronized void d() {\n /*\n r10 = this;\n monitor-enter(r10)\n android.content.Context r0 = r10.f // Catch:{ all -> 0x0053 }\n r1 = 0\n if (r0 != 0) goto L_0x0008\n r0 = 0\n goto L_0x000e\n L_0x0008:\n android.content.Context r0 = r10.f // Catch:{ all -> 0x0053 }\n int r0 = com.google.ads.interactivemedia.v3.internal.vf.a(r0) // Catch:{ all -> 0x0053 }\n L_0x000e:\n int r2 = r10.n // Catch:{ all -> 0x0053 }\n if (r2 != r0) goto L_0x0014\n monitor-exit(r10)\n return\n L_0x0014:\n r10.n = r0 // Catch:{ all -> 0x0053 }\n r2 = 1\n if (r0 == r2) goto L_0x0051\n if (r0 == 0) goto L_0x0051\n r2 = 8\n if (r0 != r2) goto L_0x0020\n goto L_0x0051\n L_0x0020:\n long r2 = r10.a(r0) // Catch:{ all -> 0x0053 }\n r10.q = r2 // Catch:{ all -> 0x0053 }\n com.google.ads.interactivemedia.v3.internal.ua r0 = r10.j // Catch:{ all -> 0x0053 }\n long r2 = r0.a() // Catch:{ all -> 0x0053 }\n int r0 = r10.k // Catch:{ all -> 0x0053 }\n if (r0 <= 0) goto L_0x0037\n long r0 = r10.l // Catch:{ all -> 0x0053 }\n long r0 = r2 - r0\n int r1 = (int) r0 // Catch:{ all -> 0x0053 }\n r5 = r1\n goto L_0x0038\n L_0x0037:\n r5 = 0\n L_0x0038:\n long r6 = r10.m // Catch:{ all -> 0x0053 }\n long r8 = r10.q // Catch:{ all -> 0x0053 }\n r4 = r10\n r4.a(r5, r6, r8) // Catch:{ all -> 0x0053 }\n r10.l = r2 // Catch:{ all -> 0x0053 }\n r0 = 0\n r10.m = r0 // Catch:{ all -> 0x0053 }\n r10.p = r0 // Catch:{ all -> 0x0053 }\n r10.o = r0 // Catch:{ all -> 0x0053 }\n com.google.ads.interactivemedia.v3.internal.ux r0 = r10.i // Catch:{ all -> 0x0053 }\n r0.a() // Catch:{ all -> 0x0053 }\n monitor-exit(r10)\n return\n L_0x0051:\n monitor-exit(r10)\n return\n L_0x0053:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.ads.interactivemedia.v3.internal.ss.d():void\");\n }",
"public final synchronized void a(com.ss.android.ugc.aweme.base.e.b r11) {\n /*\n r10 = this;\n monitor-enter(r10)\n r8 = 1\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x0041 }\n r9 = 0\n r1[r9] = r11 // Catch:{ all -> 0x0041 }\n com.meituan.robust.ChangeQuickRedirect r3 = f34732a // Catch:{ all -> 0x0041 }\n r4 = 0\n r5 = 25164(0x624c, float:3.5262E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x0041 }\n java.lang.Class<com.ss.android.ugc.aweme.base.e.b> r2 = com.ss.android.ugc.aweme.base.e.b.class\n r6[r9] = r2 // Catch:{ all -> 0x0041 }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x0041 }\n r2 = r10\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x0041 }\n if (r1 == 0) goto L_0x0032\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x0041 }\n r1[r9] = r11 // Catch:{ all -> 0x0041 }\n com.meituan.robust.ChangeQuickRedirect r3 = f34732a // Catch:{ all -> 0x0041 }\n r4 = 0\n r5 = 25164(0x624c, float:3.5262E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x0041 }\n java.lang.Class<com.ss.android.ugc.aweme.base.e.b> r0 = com.ss.android.ugc.aweme.base.e.b.class\n r6[r9] = r0 // Catch:{ all -> 0x0041 }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x0041 }\n r2 = r10\n com.meituan.robust.PatchProxy.accessDispatch(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x0041 }\n monitor-exit(r10)\n return\n L_0x0032:\n java.util.ArrayList<com.ss.android.ugc.aweme.base.e.b<T>> r1 = r10.f34733b // Catch:{ all -> 0x0041 }\n boolean r1 = r1.contains(r11) // Catch:{ all -> 0x0041 }\n if (r1 != 0) goto L_0x003f\n java.util.ArrayList<com.ss.android.ugc.aweme.base.e.b<T>> r1 = r10.f34733b // Catch:{ all -> 0x0041 }\n r1.add(r11) // Catch:{ all -> 0x0041 }\n L_0x003f:\n monitor-exit(r10)\n return\n L_0x0041:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.base.e.a.a(com.ss.android.ugc.aweme.base.e.b):void\");\n }",
"private final com.google.wireless.android.finsky.dfe.p505c.p506a.ec m35437b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 8: goto L_0x000f;\n case 16: goto L_0x004c;\n case 26: goto L_0x006f;\n case 34: goto L_0x007c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r2 = r7.f37533a;\n r2 = r2 | 1;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r3) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = 42;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = \" is not a valid enum ResultCode\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x0043:\n r7.f37534b = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3 | 1;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0001;\n L_0x004c:\n r2 = r7.f37533a;\n r2 = r2 | 2;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33560d();\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = com.google.wireless.android.finsky.dfe.p505c.p506a.dp.m35391a(r3);\t Catch:{ IllegalArgumentException -> 0x0067 }\n r7.f37535c = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r3 | 2;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n goto L_0x0001;\n L_0x0067:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x006f:\n r0 = r8.m33565g();\n r7.f37536d = r0;\n r0 = r7.f37533a;\n r0 = r0 | 4;\n r7.f37533a = r0;\n goto L_0x0001;\n L_0x007c:\n r0 = 34;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37537e;\n if (r0 != 0) goto L_0x00a8;\n L_0x0086:\n r0 = r1;\n L_0x0087:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p505c.p506a.ed[r2];\n if (r0 == 0) goto L_0x0091;\n L_0x008c:\n r3 = r7.f37537e;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x0091:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x00ac;\n L_0x0096:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x0091;\n L_0x00a8:\n r0 = r7.f37537e;\n r0 = r0.length;\n goto L_0x0087;\n L_0x00ac:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37537e = r2;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.c.a.ec.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.c.a.ec\");\n }",
"@androidx.annotation.WorkerThread\n /* Code decompiled incorrectly, please refer to instructions dump. */\n private static boolean zza(com.google.firebase.iid.FirebaseInstanceId r6, java.lang.String r7) {\n /*\n java.lang.String r0 = \"!\"\n java.lang.String[] r7 = r7.split(r0)\n int r0 = r7.length\n r1 = 1\n r2 = 2\n if (r0 != r2) goto L_0x0075\n r0 = 0\n r2 = r7[r0]\n r7 = r7[r1]\n r3 = -1\n int r4 = r2.hashCode() // Catch:{ IOException -> 0x0054 }\n r5 = 83\n if (r4 == r5) goto L_0x0028\n r5 = 85\n if (r4 == r5) goto L_0x001e\n goto L_0x0031\n L_0x001e:\n java.lang.String r4 = \"U\"\n boolean r2 = r2.equals(r4) // Catch:{ IOException -> 0x0054 }\n if (r2 == 0) goto L_0x0031\n r3 = 1\n goto L_0x0031\n L_0x0028:\n java.lang.String r4 = \"S\"\n boolean r2 = r2.equals(r4) // Catch:{ IOException -> 0x0054 }\n if (r2 == 0) goto L_0x0031\n r3 = 0\n L_0x0031:\n switch(r3) {\n case 0: goto L_0x0046;\n case 1: goto L_0x0035;\n default: goto L_0x0034;\n } // Catch:{ IOException -> 0x0054 }\n L_0x0034:\n goto L_0x0075\n L_0x0035:\n r6.zzc(r7) // Catch:{ IOException -> 0x0054 }\n boolean r6 = com.google.firebase.iid.FirebaseInstanceId.zzm() // Catch:{ IOException -> 0x0054 }\n if (r6 == 0) goto L_0x0075\n java.lang.String r6 = \"FirebaseInstanceId\"\n java.lang.String r7 = \"unsubscribe operation succeeded\"\n L_0x0042:\n android.util.Log.d(r6, r7) // Catch:{ IOException -> 0x0054 }\n goto L_0x0075\n L_0x0046:\n r6.zzb((java.lang.String) r7) // Catch:{ IOException -> 0x0054 }\n boolean r6 = com.google.firebase.iid.FirebaseInstanceId.zzm() // Catch:{ IOException -> 0x0054 }\n if (r6 == 0) goto L_0x0075\n java.lang.String r6 = \"FirebaseInstanceId\"\n java.lang.String r7 = \"subscribe operation succeeded\"\n goto L_0x0042\n L_0x0054:\n r6 = move-exception\n java.lang.String r7 = \"FirebaseInstanceId\"\n java.lang.String r1 = \"Topic sync failed: \"\n java.lang.String r6 = r6.getMessage()\n java.lang.String r6 = java.lang.String.valueOf(r6)\n int r2 = r6.length()\n if (r2 == 0) goto L_0x006c\n java.lang.String r6 = r1.concat(r6)\n goto L_0x0071\n L_0x006c:\n java.lang.String r6 = new java.lang.String\n r6.<init>(r1)\n L_0x0071:\n android.util.Log.e(r7, r6)\n return r0\n L_0x0075:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.firebase.iid.zzba.zza(com.google.firebase.iid.FirebaseInstanceId, java.lang.String):boolean\");\n }",
"static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public final com.google.android.gms.internal.ads.zzafx mo4170d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19705f;\n monitor-enter(r0);\n r1 = r2.f19706g;\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n r1 = r1.m26175a();\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x000b:\n r1 = move-exception;\t Catch:{ all -> 0x000b }\n goto L_0x0010;\t Catch:{ all -> 0x000b }\n L_0x000d:\n r1 = 0;\t Catch:{ all -> 0x000b }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x0010:\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzafn.d():com.google.android.gms.internal.ads.zzafx\");\n }",
"public void M(android.view.View r6) {\n /*\n r5 = this;\n r0 = \"v\";\n kotlin.jvm.internal.i.f(r6, r0);\n r6 = r5.this$0;\n r6 = r6.ayL;\n r0 = 0;\n if (r6 == 0) goto L_0x001a;\n L_0x000f:\n r6 = r6.Km();\n if (r6 == 0) goto L_0x001a;\n L_0x0015:\n r6 = r6.XA();\n goto L_0x001b;\n L_0x001a:\n r6 = r0;\n L_0x001b:\n if (r6 != 0) goto L_0x0020;\n L_0x001d:\n kotlin.jvm.internal.i.bnJ();\n L_0x0020:\n r1 = com.iqoption.deposit.light.menu.currency.c.cFb;\n r2 = new com.iqoption.deposit.c.a.b;\n r6 = (java.util.List) r6;\n r3 = r5.this$0;\n r3 = r3.cFE;\n if (r3 == 0) goto L_0x0037;\n L_0x002e:\n r3 = r3.getId();\n r3 = java.lang.Long.valueOf(r3);\n goto L_0x0038;\n L_0x0037:\n r3 = r0;\n L_0x0038:\n r2.<init>(r6, r3);\n r6 = r1.a(r2);\n r1 = com.iqoption.deposit.navigator.b.cGp;\n r2 = r5.this$0;\n r2 = (androidx.fragment.app.Fragment) r2;\n r1 = r1.P(r2);\n r2 = 0;\n r3 = 2;\n com.iqoption.core.ui.d.g.b(r1, r6, r2, r3, r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c$r.M(android.view.View):void\");\n }",
"private void zzbJ(int r6) {\n /*\n r5 = this;\n r0 = 8;\n if (r6 != r0) goto L_0x0035;\n L_0x0004:\n r1 = com.google.android.gms.internal.zzld.class;\n monitor-enter(r1);\n r0 = mTwiceBaseCache;\t Catch:{ all -> 0x0067 }\n if (r0 == 0) goto L_0x0030;\n L_0x000b:\n r2 = mTwiceBaseCache;\t Catch:{ all -> 0x0067 }\n r5.mArray = r2;\t Catch:{ all -> 0x0067 }\n r0 = 0;\n r0 = r2[r0];\t Catch:{ all -> 0x0067 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0067 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0067 }\n mTwiceBaseCache = r0;\t Catch:{ all -> 0x0067 }\n r0 = 1;\n r0 = r2[r0];\t Catch:{ all -> 0x0067 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0067 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0067 }\n r5.mHashes = r0;\t Catch:{ all -> 0x0067 }\n r0 = 0;\n r3 = 1;\n r4 = 0;\n r2[r3] = r4;\t Catch:{ all -> 0x0067 }\n r2[r0] = r4;\t Catch:{ all -> 0x0067 }\n r0 = mTwiceBaseCacheSize;\t Catch:{ all -> 0x0067 }\n r0 = r0 + -1;\n mTwiceBaseCacheSize = r0;\t Catch:{ all -> 0x0067 }\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n L_0x002f:\n return;\n L_0x0030:\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n r0 = com.google.android.gms.internal.zzkq.a;\t Catch:{ ClassCastException -> 0x006a }\n if (r0 == 0) goto L_0x006d;\n L_0x0035:\n r0 = 4;\n if (r6 != r0) goto L_0x006d;\n L_0x0038:\n r1 = com.google.android.gms.internal.zzld.class;\n monitor-enter(r1);\n r0 = mBaseCache;\t Catch:{ all -> 0x0064 }\n if (r0 == 0) goto L_0x006c;\n L_0x003f:\n r2 = mBaseCache;\t Catch:{ all -> 0x0064 }\n r5.mArray = r2;\t Catch:{ all -> 0x0064 }\n r0 = 0;\n r0 = r2[r0];\t Catch:{ all -> 0x0064 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0064 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0064 }\n mBaseCache = r0;\t Catch:{ all -> 0x0064 }\n r0 = 1;\n r0 = r2[r0];\t Catch:{ all -> 0x0064 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0064 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0064 }\n r5.mHashes = r0;\t Catch:{ all -> 0x0064 }\n r0 = 0;\n r3 = 1;\n r4 = 0;\n r2[r3] = r4;\t Catch:{ all -> 0x0064 }\n r2[r0] = r4;\t Catch:{ all -> 0x0064 }\n r0 = mBaseCacheSize;\t Catch:{ all -> 0x0064 }\n r0 = r0 + -1;\n mBaseCacheSize = r0;\t Catch:{ all -> 0x0064 }\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n goto L_0x002f;\n L_0x0064:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n throw r0;\n L_0x0067:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n throw r0;\n L_0x006a:\n r0 = move-exception;\n throw r0;\n L_0x006c:\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n L_0x006d:\n r0 = new int[r6];\n r5.mHashes = r0;\n r0 = r6 << 1;\n r0 = new java.lang.Object[r0];\n r5.mArray = r0;\n goto L_0x002f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzlh.zzbJ(int):void\");\n }",
"public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public static int m22557b(java.lang.String r1) {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }",
"public void mo21809a(android.view.LayoutInflater r13, android.view.ViewGroup r14, android.os.Bundle r15, p256e.p258b.C6977a r16, android.view.SurfaceHolder r17) {\n /*\n r12 = this;\n r0 = r12\n r16.mo21761L_()\n int r1 = r16.mo21764b()\n r0.f24533e = r1\n int r1 = r16.mo21765c()\n r0.f24534f = r1\n float r1 = r16.mo21766d()\n r0.f24539k = r1\n r12.mo21870l()\n int r1 = r0.f24531c\n r2 = 0\n r3 = 1\n r4 = -1\n if (r1 != r4) goto L_0x0035\n boolean r1 = r0.f24519V\n if (r1 != 0) goto L_0x002c\n int r1 = r0.f24537i\n if (r1 == r4) goto L_0x002c\n int r1 = r0.f24538j\n if (r1 != r4) goto L_0x0042\n L_0x002c:\n int r1 = r0.f24533e\n r0.f24537i = r1\n int r1 = r0.f24534f\n r0.f24538j = r1\n goto L_0x0042\n L_0x0035:\n boolean r1 = r0.f24519V\n if (r1 != 0) goto L_0x0044\n int r1 = r0.f24537i\n if (r1 == r4) goto L_0x0044\n int r1 = r0.f24538j\n if (r1 != r4) goto L_0x0042\n goto L_0x0044\n L_0x0042:\n r8 = 0\n goto L_0x004b\n L_0x0044:\n r1 = 100\n r0.f24537i = r1\n r0.f24538j = r1\n r8 = 1\n L_0x004b:\n int r1 = r0.f24537i\n int r5 = r0.f24540l\n int r1 = r1 * r5\n r0.f24541m = r1\n int r1 = r0.f24538j\n int r5 = r0.f24540l\n int r1 = r1 * r5\n r0.f24542n = r1\n java.lang.String r1 = r12.mo21873o()\n int r5 = r0.f24537i\n int r6 = r0.f24538j\n e.c.c r1 = r12.mo21799a(r5, r6, r1, r3)\n r0.f24532d = r1\n e.c.c r1 = r0.f24532d\n r5 = r16\n r6 = r17\n e.c.i r1 = r1.mo21705a(r5, r6, r2)\n r0.f24530b = r1\n int r1 = r0.f24531c\n if (r1 != r4) goto L_0x0086\n r12.m36394W()\n e.c.i r1 = r0.f24530b\n int r4 = r0.f24537i\n int r5 = r0.f24538j\n r1.mo22056a(r4, r5)\n goto L_0x0092\n L_0x0086:\n e.c.i r5 = r0.f24530b\n int r6 = r0.f24537i\n int r7 = r0.f24538j\n r9 = r13\n r10 = r14\n r11 = r15\n r5.mo22057a(r6, r7, r8, r9, r10, r11)\n L_0x0092:\n r0.f24515R = r2\n r0.f24512O = r3\n r0.f24513P = r3\n e.c.i r1 = r0.f24530b\n java.io.File r1 = r1.mo22067h()\n java.lang.String r1 = r1.getAbsolutePath()\n r0.f24535g = r1\n e.c.i r1 = r0.f24530b\n r1.mo22069j()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p256e.p259c.C6982a.mo21809a(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle, e.b.a, android.view.SurfaceHolder):void\");\n }",
"public void a(com.xiaomi.push.jc r6) {\n /*\n r5 = this;\n r6.a()\n L_0x0003:\n com.xiaomi.push.iz r0 = r6.a()\n byte r1 = r0.a\n if (r1 != 0) goto L_0x0012\n r6.f()\n r5.a()\n return\n L_0x0012:\n short r1 = r0.f784a\n r2 = 11\n switch(r1) {\n case 1: goto L_0x00b6;\n case 2: goto L_0x00a3;\n case 3: goto L_0x0098;\n case 4: goto L_0x008d;\n case 5: goto L_0x0082;\n case 6: goto L_0x0019;\n case 7: goto L_0x0071;\n case 8: goto L_0x0066;\n case 9: goto L_0x0038;\n case 10: goto L_0x002c;\n case 11: goto L_0x0020;\n default: goto L_0x0019;\n }\n L_0x0019:\n byte r0 = r0.a\n com.xiaomi.push.jf.a(r6, r0)\n goto L_0x00c0\n L_0x0020:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f573g = r0\n goto L_0x00c0\n L_0x002c:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f572f = r0\n goto L_0x00c0\n L_0x0038:\n byte r1 = r0.a\n r2 = 13\n if (r1 != r2) goto L_0x0019\n com.xiaomi.push.jb r0 = r6.a()\n java.util.HashMap r1 = new java.util.HashMap\n int r2 = r0.f788a\n int r2 = r2 * 2\n r1.<init>(r2)\n r5.f567a = r1\n r1 = 0\n L_0x004e:\n int r2 = r0.f788a\n if (r1 >= r2) goto L_0x0062\n java.lang.String r2 = r6.a()\n java.lang.String r3 = r6.a()\n java.util.Map<java.lang.String, java.lang.String> r4 = r5.f567a\n r4.put(r2, r3)\n int r1 = r1 + 1\n goto L_0x004e\n L_0x0062:\n r6.h()\n goto L_0x00c0\n L_0x0066:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f571e = r0\n goto L_0x00c0\n L_0x0071:\n byte r1 = r0.a\n r2 = 10\n if (r1 != r2) goto L_0x0019\n long r0 = r6.a()\n r5.f563a = r0\n r0 = 1\n r5.a((boolean) r0)\n goto L_0x00c0\n L_0x0082:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f570d = r0\n goto L_0x00c0\n L_0x008d:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f569c = r0\n goto L_0x00c0\n L_0x0098:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f568b = r0\n goto L_0x00c0\n L_0x00a3:\n byte r1 = r0.a\n r2 = 12\n if (r1 != r2) goto L_0x0019\n com.xiaomi.push.hv r0 = new com.xiaomi.push.hv\n r0.<init>()\n r5.f564a = r0\n com.xiaomi.push.hv r0 = r5.f564a\n r0.a((com.xiaomi.push.jc) r6)\n goto L_0x00c0\n L_0x00b6:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f565a = r0\n L_0x00c0:\n r6.g()\n goto L_0x0003\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.xiaomi.push.hx.a(com.xiaomi.push.jc):void\");\n }",
"final com.google.bV a(java.util.Map r14) {\n /*\n r13_this = this;\n r6 = f;\n if (r14 == 0) goto L_0x013c;\n L_0x0004:\n r0 = com.google.fm.TRY_HARDER;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x013c;\n L_0x000c:\n r0 = 1;\n r2 = r0;\n L_0x000e:\n if (r14 == 0) goto L_0x0140;\n L_0x0010:\n r0 = com.google.fm.PURE_BARCODE;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x0140;\n L_0x0018:\n r0 = 1;\n L_0x0019:\n r1 = r13.b;\n r7 = r1.f();\n r1 = r13.b;\n r8 = r1.b();\n r1 = r7 * 3;\n r1 = r1 / 228;\n r3 = 3;\n if (r1 < r3) goto L_0x002e;\n L_0x002c:\n if (r2 == 0) goto L_0x002f;\n L_0x002e:\n r1 = 3;\n L_0x002f:\n r2 = 0;\n r3 = 5;\n r9 = new int[r3];\n r4 = r1 + -1;\n r5 = r1;\n L_0x0036:\n if (r4 >= r7) goto L_0x0127;\n L_0x0038:\n if (r2 != 0) goto L_0x0127;\n L_0x003a:\n r1 = 0;\n r3 = 0;\n r9[r1] = r3;\n r1 = 1;\n r3 = 0;\n r9[r1] = r3;\n r1 = 2;\n r3 = 0;\n r9[r1] = r3;\n r1 = 3;\n r3 = 0;\n r9[r1] = r3;\n r1 = 4;\n r3 = 0;\n r9[r1] = r3;\n r1 = 0;\n r3 = 0;\n L_0x0050:\n if (r3 >= r8) goto L_0x010d;\n L_0x0052:\n r10 = r13.b;\n r10 = r10.a(r3, r4);\n if (r10 == 0) goto L_0x0069;\n L_0x005a:\n r10 = r1 & 1;\n r11 = 1;\n if (r10 != r11) goto L_0x0061;\n L_0x005f:\n r1 = r1 + 1;\n L_0x0061:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0069:\n r10 = r1 & 1;\n if (r10 != 0) goto L_0x0103;\n L_0x006d:\n r10 = 4;\n if (r1 != r10) goto L_0x00f9;\n L_0x0070:\n r1 = a(r9);\n if (r1 == 0) goto L_0x015f;\n L_0x0076:\n r1 = r13.a(r9, r4, r3, r0);\n if (r1 == 0) goto L_0x0159;\n L_0x007c:\n r5 = 2;\n r1 = r13.a;\n if (r1 == 0) goto L_0x0156;\n L_0x0081:\n r1 = r13.b();\n if (r6 == 0) goto L_0x00c2;\n L_0x0087:\n r2 = r13.c();\n r10 = 2;\n r10 = r9[r10];\n if (r2 <= r10) goto L_0x0152;\n L_0x0090:\n r3 = 2;\n r3 = r9[r3];\n r2 = r2 - r3;\n r2 = r2 - r5;\n r3 = r4 + r2;\n r2 = r8 + -1;\n L_0x0099:\n if (r6 == 0) goto L_0x014e;\n L_0x009b:\n r4 = r5;\n r12 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r12;\n L_0x00a0:\n r5 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 3;\n r10 = 1;\n r9[r5] = r10;\n r5 = 4;\n r10 = 0;\n r9[r5] = r10;\n r5 = 3;\n if (r6 == 0) goto L_0x0147;\n L_0x00bd:\n r5 = r4;\n r4 = r2;\n r12 = r3;\n r3 = r1;\n r1 = r12;\n L_0x00c2:\n r2 = 0;\n r10 = 0;\n r11 = 0;\n r9[r10] = r11;\n r10 = 1;\n r11 = 0;\n r9[r10] = r11;\n r10 = 2;\n r11 = 0;\n r9[r10] = r11;\n r10 = 3;\n r11 = 0;\n r9[r10] = r11;\n r10 = 4;\n r11 = 0;\n r9[r10] = r11;\n if (r6 == 0) goto L_0x0143;\n L_0x00d9:\n r2 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 3;\n r10 = 1;\n r9[r2] = r10;\n r2 = 4;\n r10 = 0;\n r9[r2] = r10;\n r2 = 3;\n if (r6 == 0) goto L_0x0143;\n L_0x00f6:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n L_0x00f9:\n r1 = r1 + 1;\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0103:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n L_0x0109:\n r3 = r3 + 1;\n if (r6 == 0) goto L_0x0050;\n L_0x010d:\n r1 = a(r9);\n if (r1 == 0) goto L_0x0124;\n L_0x0113:\n r1 = r13.a(r9, r4, r8, r0);\n if (r1 == 0) goto L_0x0124;\n L_0x0119:\n r1 = 0;\n r5 = r9[r1];\n r1 = r13.a;\n if (r1 == 0) goto L_0x0124;\n L_0x0120:\n r2 = r13.b();\n L_0x0124:\n r4 = r4 + r5;\n if (r6 == 0) goto L_0x0036;\n L_0x0127:\n r0 = r13.a();\n com.google.bm.a(r0);\n r1 = new com.google.bV;\n r1.<init>(r0);\n r0 = com.google.gC.a;\n if (r0 == 0) goto L_0x013b;\n L_0x0137:\n r0 = r6 + 1;\n f = r0;\n L_0x013b:\n return r1;\n L_0x013c:\n r0 = 0;\n r2 = r0;\n goto L_0x000e;\n L_0x0140:\n r0 = 0;\n goto L_0x0019;\n L_0x0143:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n goto L_0x0109;\n L_0x0147:\n r12 = r1;\n r1 = r5;\n r5 = r4;\n r4 = r2;\n r2 = r3;\n r3 = r12;\n goto L_0x0109;\n L_0x014e:\n r4 = r3;\n r3 = r2;\n goto L_0x00c2;\n L_0x0152:\n r2 = r3;\n r3 = r4;\n goto L_0x0099;\n L_0x0156:\n r1 = r2;\n goto L_0x0087;\n L_0x0159:\n r1 = r3;\n r3 = r2;\n r2 = r4;\n r4 = r5;\n goto L_0x00a0;\n L_0x015f:\n r1 = r2;\n goto L_0x00d9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.bj.a(java.util.Map):com.google.bV\");\n }",
"private void m9534a(android.content.Context r3) {\n /*\n r2 = this;\n android.content.Context r0 = r2.f7502i\n boolean r1 = r0 instanceof android.app.Activity\n if (r1 == 0) goto L_0x0010\n android.app.Activity r0 = (android.app.Activity) r0\n boolean r0 = r0.isFinishing()\n if (r0 != 0) goto L_0x0010\n android.content.Context r3 = r2.f7502i\n L_0x0010:\n com.bytedance.sdk.openadsdk.dislike.b r0 = new com.bytedance.sdk.openadsdk.dislike.b\n com.bytedance.sdk.openadsdk.core.d.k r1 = r2.f7501h\n r0.m43956init(r3, r1)\n r2.f7503j = r0\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.sdk.openadsdk.core.p171e.TTNativeAdImpl.m9534a(android.app.Activity):void\");\n }",
"@javax.annotation.Nullable\n /* renamed from: a */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n private final com.google.android.gms.internal.ads.alc m16975a(@javax.annotation.Nullable android.content.Context r4, boolean r5, boolean r6) {\n /*\n r3 = this;\n com.google.android.gms.internal.ads.ark<java.lang.Boolean> r0 = com.google.android.gms.internal.ads.aru.f11765Q\n com.google.android.gms.internal.ads.ars r1 = com.google.android.gms.internal.ads.aoq.m14620f()\n java.lang.Object r0 = r1.mo14695a(r0)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r0 = r0.booleanValue()\n r1 = 0\n if (r0 != 0) goto L_0x0014\n return r1\n L_0x0014:\n boolean r0 = com.google.android.gms.common.util.C3563o.m12763b()\n if (r0 != 0) goto L_0x001b\n return r1\n L_0x001b:\n com.google.android.gms.internal.ads.ark<java.lang.Boolean> r0 = com.google.android.gms.internal.ads.aru.f11773Y\n com.google.android.gms.internal.ads.ars r2 = com.google.android.gms.internal.ads.aoq.m14620f()\n java.lang.Object r0 = r2.mo14695a(r0)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r0 = r0.booleanValue()\n if (r0 != 0) goto L_0x0040\n com.google.android.gms.internal.ads.ark<java.lang.Boolean> r0 = com.google.android.gms.internal.ads.aru.f11771W\n com.google.android.gms.internal.ads.ars r2 = com.google.android.gms.internal.ads.aoq.m14620f()\n java.lang.Object r0 = r2.mo14695a(r0)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r0 = r0.booleanValue()\n if (r0 != 0) goto L_0x0040\n return r1\n L_0x0040:\n if (r5 == 0) goto L_0x0045\n if (r6 == 0) goto L_0x0045\n return r1\n L_0x0045:\n java.lang.Object r5 = r3.f13322a\n monitor-enter(r5)\n android.os.Looper r6 = android.os.Looper.getMainLooper() // Catch:{ all -> 0x007f }\n if (r6 == 0) goto L_0x007d\n if (r4 != 0) goto L_0x0051\n goto L_0x007d\n L_0x0051:\n com.google.android.gms.internal.ads.akx r6 = r3.f13331j // Catch:{ all -> 0x007f }\n if (r6 != 0) goto L_0x005c\n com.google.android.gms.internal.ads.akx r6 = new com.google.android.gms.internal.ads.akx // Catch:{ all -> 0x007f }\n r6.<init>() // Catch:{ all -> 0x007f }\n r3.f13331j = r6 // Catch:{ all -> 0x007f }\n L_0x005c:\n com.google.android.gms.internal.ads.alc r6 = r3.f13330i // Catch:{ all -> 0x007f }\n if (r6 != 0) goto L_0x006f\n com.google.android.gms.internal.ads.alc r6 = new com.google.android.gms.internal.ads.alc // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.akx r0 = r3.f13331j // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.zzang r1 = r3.f13328g // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.ck r4 = com.google.android.gms.internal.ads.C3712cg.m16480a(r4, r1) // Catch:{ all -> 0x007f }\n r6.<init>(r0, r4) // Catch:{ all -> 0x007f }\n r3.f13330i = r6 // Catch:{ all -> 0x007f }\n L_0x006f:\n com.google.android.gms.internal.ads.alc r4 = r3.f13330i // Catch:{ all -> 0x007f }\n r4.mo14478a() // Catch:{ all -> 0x007f }\n java.lang.String r4 = \"start fetching content...\"\n com.google.android.gms.internal.ads.C3900je.m17433d(r4) // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.alc r4 = r3.f13330i // Catch:{ all -> 0x007f }\n monitor-exit(r5) // Catch:{ all -> 0x007f }\n return r4\n L_0x007d:\n monitor-exit(r5) // Catch:{ all -> 0x007f }\n return r1\n L_0x007f:\n r4 = move-exception\n monitor-exit(r5) // Catch:{ all -> 0x007f }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.C3883io.m16975a(android.content.Context, boolean, boolean):com.google.android.gms.internal.ads.alc\");\n }",
"private void b(int r14) {\n /*\n r13 = this;\n java.lang.Integer r0 = r13.w\n if (r0 != 0) goto L_0x000b\n java.lang.Integer r14 = java.lang.Integer.valueOf(r14)\n r13.w = r14\n goto L_0x005b\n L_0x000b:\n java.lang.Integer r0 = r13.w\n int r0 = r0.intValue()\n if (r0 == r14) goto L_0x005b\n java.lang.IllegalStateException r0 = new java.lang.IllegalStateException\n java.lang.String r14 = a(r14)\n java.lang.String r14 = java.lang.String.valueOf(r14)\n java.lang.Integer r1 = r13.w\n int r1 = r1.intValue()\n java.lang.String r1 = a(r1)\n java.lang.String r1 = java.lang.String.valueOf(r1)\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n java.lang.String r3 = java.lang.String.valueOf(r14)\n int r3 = r3.length()\n int r3 = r3 + 51\n java.lang.String r4 = java.lang.String.valueOf(r1)\n int r4 = r4.length()\n int r3 = r3 + r4\n r2.<init>(r3)\n java.lang.String r3 = \"Cannot use sign-in mode: \"\n r2.append(r3)\n r2.append(r14)\n java.lang.String r14 = \". Mode was already set to \"\n r2.append(r14)\n r2.append(r1)\n java.lang.String r14 = r2.toString()\n r0.<init>(r14)\n throw r0\n L_0x005b:\n com.google.android.gms.internal.zzqy r14 = r13.l\n if (r14 == 0) goto L_0x0060\n return\n L_0x0060:\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r14 = r13.c\n java.util.Collection r14 = r14.values()\n java.util.Iterator r14 = r14.iterator()\n r0 = 0\n r1 = 0\n L_0x006c:\n boolean r2 = r14.hasNext()\n if (r2 == 0) goto L_0x0088\n java.lang.Object r2 = r14.next()\n com.google.android.gms.common.api.Api$zze r2 = (com.google.android.gms.common.api.Api.zze) r2\n boolean r3 = r2.zzahd()\n r4 = 1\n if (r3 == 0) goto L_0x0080\n r0 = 1\n L_0x0080:\n boolean r2 = r2.zzahs()\n if (r2 == 0) goto L_0x006c\n r1 = 1\n goto L_0x006c\n L_0x0088:\n java.lang.Integer r14 = r13.w\n int r14 = r14.intValue()\n switch(r14) {\n case 1: goto L_0x00ae;\n case 2: goto L_0x0092;\n case 3: goto L_0x00c2;\n default: goto L_0x0091;\n }\n L_0x0091:\n goto L_0x00c2\n L_0x0092:\n if (r0 == 0) goto L_0x00c2\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r3 = r13\n com.google.android.gms.internal.zzqh r14 = com.google.android.gms.internal.zzqh.a(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11)\n L_0x00ab:\n r13.l = r14\n return\n L_0x00ae:\n if (r0 != 0) goto L_0x00b8\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"SIGN_IN_MODE_REQUIRED cannot be used on a GoogleApiClient that does not contain any authenticated APIs. Use connect() instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00b8:\n if (r1 == 0) goto L_0x00c2\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"Cannot use SIGN_IN_MODE_REQUIRED with GOOGLE_SIGN_IN_API. Use connect(SIGN_IN_MODE_OPTIONAL) instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00c2:\n com.google.android.gms.internal.zzqr r14 = new com.google.android.gms.internal.zzqr\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r1 = r14\n r3 = r13\n r12 = r13\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)\n goto L_0x00ab\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzqp.b(int):void\");\n }",
"@org.jetbrains.annotations.Nullable\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final java.lang.Object invokeSuspend(@org.jetbrains.annotations.NotNull java.lang.Object r12) {\n /*\n r11 = this;\n java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r1 = r11.label\n r2 = 3\n r3 = 2\n r4 = 1\n if (r1 == 0) goto L_0x005c\n if (r1 == r4) goto L_0x004a\n if (r1 == r3) goto L_0x0031\n if (r1 != r2) goto L_0x0029\n java.lang.Object r1 = r11.L$4\n java.lang.Object r5 = r11.L$3\n kotlinx.coroutines.channels.ChannelIterator r5 = (kotlinx.coroutines.channels.ChannelIterator) r5\n java.lang.Object r6 = r11.L$2\n java.lang.Object r6 = r11.L$1\n java.util.HashSet r6 = (java.util.HashSet) r6\n java.lang.Object r7 = r11.L$0\n kotlinx.coroutines.channels.ProducerScope r7 = (kotlinx.coroutines.channels.ProducerScope) r7\n kotlin.ResultKt.throwOnFailure(r12)\n r12 = r7\n r7 = r0\n r0 = r11\n goto L_0x00c2\n L_0x0029:\n java.lang.IllegalStateException r12 = new java.lang.IllegalStateException\n java.lang.String r0 = \"call to 'resume' before 'invoke' with coroutine\"\n r12.<init>(r0)\n throw r12\n L_0x0031:\n java.lang.Object r1 = r11.L$3\n kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1\n java.lang.Object r5 = r11.L$2\n java.lang.Object r6 = r11.L$1\n java.util.HashSet r6 = (java.util.HashSet) r6\n java.lang.Object r7 = r11.L$0\n kotlinx.coroutines.channels.ProducerScope r7 = (kotlinx.coroutines.channels.ProducerScope) r7\n kotlin.ResultKt.throwOnFailure(r12)\n r8 = r5\n r5 = r1\n r1 = r12\n r12 = r7\n r7 = r0\n r0 = r11\n goto L_0x00a9\n L_0x004a:\n java.lang.Object r1 = r11.L$2\n kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1\n java.lang.Object r5 = r11.L$1\n java.util.HashSet r5 = (java.util.HashSet) r5\n java.lang.Object r6 = r11.L$0\n kotlinx.coroutines.channels.ProducerScope r6 = (kotlinx.coroutines.channels.ProducerScope) r6\n kotlin.ResultKt.throwOnFailure(r12)\n r7 = r0\n r0 = r11\n goto L_0x0084\n L_0x005c:\n kotlin.ResultKt.throwOnFailure(r12)\n kotlinx.coroutines.channels.ProducerScope r12 = r11.f5420p$\n java.util.HashSet r1 = new java.util.HashSet\n r1.<init>()\n kotlinx.coroutines.channels.ReceiveChannel r5 = r11.$this_distinctBy\n kotlinx.coroutines.channels.ChannelIterator r5 = r5.iterator()\n r6 = r12\n r12 = r11\n r10 = r5\n r5 = r1\n r1 = r10\n L_0x0071:\n r12.L$0 = r6\n r12.L$1 = r5\n r12.L$2 = r1\n r12.label = r4\n java.lang.Object r7 = r1.hasNext(r12)\n if (r7 != r0) goto L_0x0080\n return r0\n L_0x0080:\n r10 = r0\n r0 = r12\n r12 = r7\n r7 = r10\n L_0x0084:\n java.lang.Boolean r12 = (java.lang.Boolean) r12\n boolean r12 = r12.booleanValue()\n if (r12 == 0) goto L_0x00ce\n java.lang.Object r12 = r1.next()\n kotlin.jvm.functions.Function2 r8 = r0.$selector\n r0.L$0 = r6\n r0.L$1 = r5\n r0.L$2 = r12\n r0.L$3 = r1\n r0.label = r3\n java.lang.Object r8 = r8.invoke(r12, r0)\n if (r8 != r7) goto L_0x00a3\n return r7\n L_0x00a3:\n r10 = r8\n r8 = r12\n r12 = r6\n r6 = r5\n r5 = r1\n r1 = r10\n L_0x00a9:\n boolean r9 = r6.contains(r1)\n if (r9 != 0) goto L_0x00c8\n r0.L$0 = r12\n r0.L$1 = r6\n r0.L$2 = r8\n r0.L$3 = r5\n r0.L$4 = r1\n r0.label = r2\n java.lang.Object r8 = r12.send(r8, r0)\n if (r8 != r7) goto L_0x00c2\n return r7\n L_0x00c2:\n r8 = r6\n java.util.Collection r8 = (java.util.Collection) r8\n r8.add(r1)\n L_0x00c8:\n r1 = r5\n r5 = r6\n r6 = r12\n r12 = r0\n r0 = r7\n goto L_0x0071\n L_0x00ce:\n kotlin.Unit r12 = kotlin.Unit.INSTANCE\n return r12\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$distinctBy$1.invokeSuspend(java.lang.Object):java.lang.Object\");\n }",
"static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public final void mo14764a() {\n /*\n r9 = this;\n com.google.android.gms.common.util.Clock r0 = com.google.android.gms.ads.internal.zzp.zzkx()\n long r0 = r0.currentTimeMillis()\n java.lang.Object r2 = r9.f10846a\n monitor-enter(r2)\n int r3 = r9.f10847b // Catch:{ all -> 0x004d }\n int r4 = com.google.android.gms.internal.ads.C2349r5.f10765b // Catch:{ all -> 0x004d }\n if (r3 != r4) goto L_0x002c\n long r5 = r9.f10848c // Catch:{ all -> 0x004d }\n com.google.android.gms.internal.ads.zzaaq<java.lang.Long> r3 = com.google.android.gms.internal.ads.zzabf.zzcwh // Catch:{ all -> 0x004d }\n com.google.android.gms.internal.ads.zzabb r7 = com.google.android.gms.internal.ads.zzwq.zzqe() // Catch:{ all -> 0x004d }\n java.lang.Object r3 = r7.zzd(r3) // Catch:{ all -> 0x004d }\n java.lang.Long r3 = (java.lang.Long) r3 // Catch:{ all -> 0x004d }\n long r7 = r3.longValue() // Catch:{ all -> 0x004d }\n long r5 = r5 + r7\n int r3 = (r5 > r0 ? 1 : (r5 == r0 ? 0 : -1))\n if (r3 > 0) goto L_0x002c\n int r0 = com.google.android.gms.internal.ads.C2349r5.f10764a // Catch:{ all -> 0x004d }\n r9.f10847b = r0 // Catch:{ all -> 0x004d }\n L_0x002c:\n monitor-exit(r2) // Catch:{ all -> 0x004d }\n com.google.android.gms.common.util.Clock r0 = com.google.android.gms.ads.internal.zzp.zzkx()\n long r0 = r0.currentTimeMillis()\n java.lang.Object r3 = r9.f10846a\n monitor-enter(r3)\n int r2 = r9.f10847b // Catch:{ all -> 0x004a }\n r5 = 2\n if (r2 == r5) goto L_0x003f\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n return\n L_0x003f:\n r2 = 3\n r9.f10847b = r2 // Catch:{ all -> 0x004a }\n int r2 = r9.f10847b // Catch:{ all -> 0x004a }\n if (r2 != r4) goto L_0x0048\n r9.f10848c = r0 // Catch:{ all -> 0x004a }\n L_0x0048:\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n return\n L_0x004a:\n r0 = move-exception\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n throw r0\n L_0x004d:\n r0 = move-exception\n monitor-exit(r2) // Catch:{ all -> 0x004d }\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.C2386s5.mo14764a():void\");\n }",
"private void m50366E() {\n }",
"public static boolean a(android.content.Context r4, byte[] r5) {\n /*\n r1 = d;\n r0 = 0;\n L_0x0003:\n r2 = c();\t Catch:{ Exception -> 0x003a }\n if (r2 != 0) goto L_0x0010;\n L_0x0009:\n r2 = e;\t Catch:{ Exception -> 0x003a }\n r2.block();\t Catch:{ Exception -> 0x003a }\n if (r1 == 0) goto L_0x0003;\n L_0x0010:\n r1 = z;\t Catch:{ Exception -> 0x003a }\n r2 = 22;\n r1 = r1[r2];\t Catch:{ Exception -> 0x003a }\n com.whatsapp.util.Log.i(r1);\t Catch:{ Exception -> 0x003a }\n r1 = com.whatsapp.contact.o.NOTIFICATION_DELTA;\t Catch:{ Exception -> 0x003a }\n r0 = a(r4, r1, r5);\t Catch:{ Exception -> 0x003a }\n r1 = b();\t Catch:{ Exception -> 0x0038 }\n if (r1 != 0) goto L_0x002e;\n L_0x0025:\n r1 = z;\t Catch:{ Exception -> 0x0038 }\n r2 = 16;\n r1 = r1[r2];\t Catch:{ Exception -> 0x0038 }\n com.whatsapp.util.Log.e(r1);\t Catch:{ Exception -> 0x0038 }\n L_0x002e:\n r1 = z;\n r2 = 18;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n L_0x0037:\n return r0;\n L_0x0038:\n r0 = move-exception;\n throw r0;\n L_0x003a:\n r1 = move-exception;\n r2 = z;\t Catch:{ all -> 0x005d }\n r3 = 20;\n r2 = r2[r3];\t Catch:{ all -> 0x005d }\n com.whatsapp.util.Log.b(r2, r1);\t Catch:{ all -> 0x005d }\n r1 = b();\n if (r1 != 0) goto L_0x0053;\n L_0x004a:\n r1 = z;\n r2 = 19;\n r1 = r1[r2];\n com.whatsapp.util.Log.e(r1);\n L_0x0053:\n r1 = z;\n r2 = 23;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n goto L_0x0037;\n L_0x005d:\n r0 = move-exception;\n r1 = b();\t Catch:{ Exception -> 0x0077 }\n if (r1 != 0) goto L_0x006d;\n L_0x0064:\n r1 = z;\t Catch:{ Exception -> 0x0077 }\n r2 = 21;\n r1 = r1[r2];\t Catch:{ Exception -> 0x0077 }\n com.whatsapp.util.Log.e(r1);\t Catch:{ Exception -> 0x0077 }\n L_0x006d:\n r1 = z;\n r2 = 17;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n throw r0;\n L_0x0077:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.contact.i.a(android.content.Context, byte[]):boolean\");\n }",
"public final void b() {\n /*\n r3 = this;\n r0 = r3.a;\n r1 = \"fadeAnimatorSet\";\n if (r0 == 0) goto L_0x0032;\n L_0x0006:\n r0 = r3.e;\n if (r0 != 0) goto L_0x000d;\n L_0x000a:\n defpackage.akcr.a(r1);\n L_0x000d:\n r0 = r0.getListeners();\n if (r0 == 0) goto L_0x0024;\n L_0x0013:\n r0 = r3.e;\n if (r0 != 0) goto L_0x001a;\n L_0x0017:\n defpackage.akcr.a(r1);\n L_0x001a:\n r0 = r0.getListeners();\n r0 = r0.isEmpty();\n if (r0 == 0) goto L_0x0032;\n L_0x0024:\n r0 = r3.e;\n if (r0 != 0) goto L_0x002b;\n L_0x0028:\n defpackage.akcr.a(r1);\n L_0x002b:\n r2 = r3.a;\n r2 = (android.animation.Animator.AnimatorListener) r2;\n r0.addListener(r2);\n L_0x0032:\n r0 = r3.d;\n if (r0 != 0) goto L_0x003b;\n L_0x0036:\n r2 = \"scrollAnimatorSet\";\n defpackage.akcr.a(r2);\n L_0x003b:\n r0.start();\n r0 = r3.e;\n if (r0 != 0) goto L_0x0045;\n L_0x0042:\n defpackage.akcr.a(r1);\n L_0x0045:\n r0.start();\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.snap.search.ui.loading.LoadingBar.b():void\");\n }",
"public void mo4059b() {\n imageCacheStatsTracker.mo4072f();\n }",
"public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void mo55177a() {\n long unused = C3615m3.this.f1452k = System.currentTimeMillis();\n if (C3615m3.this.f1443b) {\n C3615m3.this.m1171c(new MDExternalError(MDExternalError.ExternalError.SDK_INITIALIZATION_IN_PROGRESS), this.f1467a);\n } else if (!C3615m3.this.f1447f.mo55921b() || C3615m3.this.f1447f.mo55918a()) {\n C3615m3.this.f1449h.updateFilePath(C3595k3.m1060d().mo55511a());\n boolean unused2 = C3615m3.this.f1443b = true;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n if (C3723s4.m1629b() || C3723s4.m1628a()) {\n C3490e3.m665e(\"SDK Upgrade - delete UUID and local configuration storage\");\n C3661o5.m1405a();\n Pair<String, Boolean> a = C3729t0.m1642a();\n if (a != null) {\n AnalyticsBridge.getInstance().reportDeleteStorageEvent((String) a.first, ((Boolean) a.second).booleanValue());\n }\n }\n C3723s4.m1630c();\n C3615m3.this.m1172c(this.f1467a);\n C3580j createApiToken = ModelFactory.getInstance().createApiToken(this.f1468b);\n if (createApiToken == null) {\n boolean unused3 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1158a((C3665p2) new C3593k1(C3586j3.C3587a.API_TOKEN_PARSE_ERROR), this.f1467a);\n C3615m3.this.clearAndDisconnect();\n } else if (!C3615m3.this.f1442a || C3604l2.m1115c().mo55538b() == null || !C3604l2.m1115c().mo55538b().mo55850a().equals(createApiToken.mo55850a())) {\n C3604l2.m1115c().mo55537a(createApiToken);\n if (!C3604l2.m1115c().mo55538b().mo55850a().equals(C3659o3.m1391f().mo55687a(C3815z4.C3816a.API_TOKEN))) {\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.API_TOKEN, C3604l2.m1115c().mo55538b().mo55850a());\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.ACCESS_TOKEN, (String) null);\n }\n C3490e3.m665e(\"SDK init started\");\n AnalyticsBridge.getInstance().reportInitEvent();\n C3767w0.m1812b().mo55893a();\n C3646n3.m1337m().mo55661a(60000, 3, 60000, 0, 512, 3);\n C3615m3.this.m1150a(this.f1467a);\n } else {\n boolean unused4 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_ALREADY_INITIALIZED), this.f1467a);\n }\n } else {\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_KILLED), this.f1467a);\n C3461c3.m562g().clearAndDisconnect();\n }\n }",
"@androidx.annotation.Nullable\r\n public synchronized android.graphics.Bitmap getNextFrame() {\r\n /*\r\n r7 = this;\r\n monitor-enter(r7);\r\n r0 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r0 = r0.frameCount;\t Catch:{ all -> 0x00ea }\r\n r1 = 3;\r\n r2 = 1;\r\n if (r0 <= 0) goto L_0x000d;\r\n L_0x0009:\r\n r0 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n if (r0 >= 0) goto L_0x003b;\r\n L_0x000d:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r0 = android.util.Log.isLoggable(r0, r1);\t Catch:{ all -> 0x00ea }\r\n if (r0 == 0) goto L_0x0039;\r\n L_0x0015:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00ea }\r\n r3.<init>();\t Catch:{ all -> 0x00ea }\r\n r4 = \"Unable to decode frame, frameCount=\";\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r4 = r4.frameCount;\t Catch:{ all -> 0x00ea }\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = \", framePointer=\";\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r3.append(r4);\t Catch:{ all -> 0x00ea }\r\n r3 = r3.toString();\t Catch:{ all -> 0x00ea }\r\n android.util.Log.d(r0, r3);\t Catch:{ all -> 0x00ea }\r\n L_0x0039:\r\n r7.status = r2;\t Catch:{ all -> 0x00ea }\r\n L_0x003b:\r\n r0 = r7.status;\t Catch:{ all -> 0x00ea }\r\n r3 = 0;\r\n if (r0 == r2) goto L_0x00c8;\r\n L_0x0040:\r\n r0 = r7.status;\t Catch:{ all -> 0x00ea }\r\n r4 = 2;\r\n if (r0 != r4) goto L_0x0047;\r\n L_0x0045:\r\n goto L_0x00c8;\r\n L_0x0047:\r\n r0 = 0;\r\n r7.status = r0;\t Catch:{ all -> 0x00ea }\r\n r4 = r7.block;\t Catch:{ all -> 0x00ea }\r\n if (r4 != 0) goto L_0x0058;\r\n L_0x004e:\r\n r4 = r7.bitmapProvider;\t Catch:{ all -> 0x00ea }\r\n r5 = 255; // 0xff float:3.57E-43 double:1.26E-321;\r\n r4 = r4.obtainByteArray(r5);\t Catch:{ all -> 0x00ea }\r\n r7.block = r4;\t Catch:{ all -> 0x00ea }\r\n L_0x0058:\r\n r4 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r4 = r4.frames;\t Catch:{ all -> 0x00ea }\r\n r5 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r4 = r4.get(r5);\t Catch:{ all -> 0x00ea }\r\n r4 = (com.bumptech.glide.gifdecoder.GifFrame) r4;\t Catch:{ all -> 0x00ea }\r\n r5 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r5 = r5 - r2;\r\n if (r5 < 0) goto L_0x0074;\r\n L_0x0069:\r\n r6 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r6 = r6.frames;\t Catch:{ all -> 0x00ea }\r\n r5 = r6.get(r5);\t Catch:{ all -> 0x00ea }\r\n r5 = (com.bumptech.glide.gifdecoder.GifFrame) r5;\t Catch:{ all -> 0x00ea }\r\n goto L_0x0075;\r\n L_0x0074:\r\n r5 = r3;\r\n L_0x0075:\r\n r6 = r4.lct;\t Catch:{ all -> 0x00ea }\r\n if (r6 == 0) goto L_0x007c;\r\n L_0x0079:\r\n r6 = r4.lct;\t Catch:{ all -> 0x00ea }\r\n goto L_0x0080;\r\n L_0x007c:\r\n r6 = r7.header;\t Catch:{ all -> 0x00ea }\r\n r6 = r6.gct;\t Catch:{ all -> 0x00ea }\r\n L_0x0080:\r\n r7.act = r6;\t Catch:{ all -> 0x00ea }\r\n r6 = r7.act;\t Catch:{ all -> 0x00ea }\r\n if (r6 != 0) goto L_0x00aa;\r\n L_0x0086:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r0 = android.util.Log.isLoggable(r0, r1);\t Catch:{ all -> 0x00ea }\r\n if (r0 == 0) goto L_0x00a6;\r\n L_0x008e:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r1 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00ea }\r\n r1.<init>();\t Catch:{ all -> 0x00ea }\r\n r4 = \"No valid color table found for frame #\";\r\n r1.append(r4);\t Catch:{ all -> 0x00ea }\r\n r4 = r7.framePointer;\t Catch:{ all -> 0x00ea }\r\n r1.append(r4);\t Catch:{ all -> 0x00ea }\r\n r1 = r1.toString();\t Catch:{ all -> 0x00ea }\r\n android.util.Log.d(r0, r1);\t Catch:{ all -> 0x00ea }\r\n L_0x00a6:\r\n r7.status = r2;\t Catch:{ all -> 0x00ea }\r\n monitor-exit(r7);\r\n return r3;\r\n L_0x00aa:\r\n r1 = r4.transparency;\t Catch:{ all -> 0x00ea }\r\n if (r1 == 0) goto L_0x00c2;\r\n L_0x00ae:\r\n r1 = r7.act;\t Catch:{ all -> 0x00ea }\r\n r2 = r7.pct;\t Catch:{ all -> 0x00ea }\r\n r3 = r7.act;\t Catch:{ all -> 0x00ea }\r\n r3 = r3.length;\t Catch:{ all -> 0x00ea }\r\n java.lang.System.arraycopy(r1, r0, r2, r0, r3);\t Catch:{ all -> 0x00ea }\r\n r1 = r7.pct;\t Catch:{ all -> 0x00ea }\r\n r7.act = r1;\t Catch:{ all -> 0x00ea }\r\n r1 = r7.act;\t Catch:{ all -> 0x00ea }\r\n r2 = r4.transIndex;\t Catch:{ all -> 0x00ea }\r\n r1[r2] = r0;\t Catch:{ all -> 0x00ea }\r\n L_0x00c2:\r\n r0 = r7.setPixels(r4, r5);\t Catch:{ all -> 0x00ea }\r\n monitor-exit(r7);\r\n return r0;\r\n L_0x00c8:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r0 = android.util.Log.isLoggable(r0, r1);\t Catch:{ all -> 0x00ea }\r\n if (r0 == 0) goto L_0x00e8;\r\n L_0x00d0:\r\n r0 = TAG;\t Catch:{ all -> 0x00ea }\r\n r1 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00ea }\r\n r1.<init>();\t Catch:{ all -> 0x00ea }\r\n r2 = \"Unable to decode frame, status=\";\r\n r1.append(r2);\t Catch:{ all -> 0x00ea }\r\n r2 = r7.status;\t Catch:{ all -> 0x00ea }\r\n r1.append(r2);\t Catch:{ all -> 0x00ea }\r\n r1 = r1.toString();\t Catch:{ all -> 0x00ea }\r\n android.util.Log.d(r0, r1);\t Catch:{ all -> 0x00ea }\r\n L_0x00e8:\r\n monitor-exit(r7);\r\n return r3;\r\n L_0x00ea:\r\n r0 = move-exception;\r\n monitor-exit(r7);\r\n throw r0;\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: com.bumptech.glide.gifdecoder.StandardGifDecoder.getNextFrame():android.graphics.Bitmap\");\r\n }",
"private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void onFinalImageSet(java.lang.String r3, @javax.annotation.Nullable com.facebook.imagepipeline.image.ImageInfo r4, @javax.annotation.Nullable android.graphics.drawable.Animatable r5) {\r\n /*\r\n r2 = this;\r\n r3 = 0;\r\n r4 = com.airbnb.android.react.maps.AirMapMarker.this;\t Catch:{ all -> 0x007e }\r\n r4 = r4.dataSource;\t Catch:{ all -> 0x007e }\r\n r4 = r4.getResult();\t Catch:{ all -> 0x007e }\r\n r4 = (com.facebook.common.references.CloseableReference) r4;\t Catch:{ all -> 0x007e }\r\n r3 = 1;\r\n if (r4 == 0) goto L_0x003b;\r\n L_0x0010:\r\n r5 = r4.get();\t Catch:{ all -> 0x0039 }\r\n r5 = (com.facebook.imagepipeline.image.CloseableImage) r5;\t Catch:{ all -> 0x0039 }\r\n if (r5 == 0) goto L_0x003b;\r\n L_0x0018:\r\n r0 = r5 instanceof com.facebook.imagepipeline.image.CloseableStaticBitmap;\t Catch:{ all -> 0x0039 }\r\n if (r0 == 0) goto L_0x003b;\r\n L_0x001c:\r\n r5 = (com.facebook.imagepipeline.image.CloseableStaticBitmap) r5;\t Catch:{ all -> 0x0039 }\r\n r5 = r5.getUnderlyingBitmap();\t Catch:{ all -> 0x0039 }\r\n if (r5 == 0) goto L_0x003b;\r\n L_0x0024:\r\n r0 = android.graphics.Bitmap.Config.ARGB_8888;\t Catch:{ all -> 0x0039 }\r\n r5 = r5.copy(r0, r3);\t Catch:{ all -> 0x0039 }\r\n r0 = com.airbnb.android.react.maps.AirMapMarker.this;\t Catch:{ all -> 0x0039 }\r\n r0.iconBitmap = r5;\t Catch:{ all -> 0x0039 }\r\n r0 = com.airbnb.android.react.maps.AirMapMarker.this;\t Catch:{ all -> 0x0039 }\r\n r5 = com.google.android.gms.maps.model.BitmapDescriptorFactory.fromBitmap(r5);\t Catch:{ all -> 0x0039 }\r\n r0.iconBitmapDescriptor = r5;\t Catch:{ all -> 0x0039 }\r\n goto L_0x003b;\r\n L_0x0039:\r\n r3 = move-exception;\r\n goto L_0x0082;\r\n L_0x003b:\r\n r5 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r5 = r5.dataSource;\r\n r5.close();\r\n if (r4 == 0) goto L_0x0049;\r\n L_0x0046:\r\n com.facebook.common.references.CloseableReference.closeSafely(r4);\r\n L_0x0049:\r\n r4 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r4 = r4.markerManager;\r\n if (r4 == 0) goto L_0x0078;\r\n L_0x0051:\r\n r4 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r4 = r4.imageUri;\r\n if (r4 == 0) goto L_0x0078;\r\n L_0x0059:\r\n r4 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r4 = r4.markerManager;\r\n r5 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r5 = r5.imageUri;\r\n r4 = r4.getSharedIcon(r5);\r\n r5 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r5 = r5.iconBitmapDescriptor;\r\n r0 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r0 = r0.iconBitmap;\r\n r4.updateIcon(r5, r0);\r\n L_0x0078:\r\n r4 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r4.update(r3);\r\n return;\r\n L_0x007e:\r\n r4 = move-exception;\r\n r1 = r4;\r\n r4 = r3;\r\n r3 = r1;\r\n L_0x0082:\r\n r5 = com.airbnb.android.react.maps.AirMapMarker.this;\r\n r5 = r5.dataSource;\r\n r5.close();\r\n if (r4 == 0) goto L_0x0090;\r\n L_0x008d:\r\n com.facebook.common.references.CloseableReference.closeSafely(r4);\r\n L_0x0090:\r\n throw r3;\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: com.airbnb.android.react.maps.AirMapMarker.1.onFinalImageSet(java.lang.String, com.facebook.imagepipeline.image.ImageInfo, android.graphics.drawable.Animatable):void\");\r\n }",
"public final void release() {\n /*\n r8 = this;\n r1 = 0;\n r0 = r8.zzlb(r1);\n r4 = r8.zzh(r1, r0);\n monitor-enter(r8);\n r1 = r8.zzjnt;\t Catch:{ all -> 0x0049 }\n if (r1 == 0) goto L_0x0018;\n L_0x000e:\n r1 = r8.zzjnu;\t Catch:{ all -> 0x0049 }\n r1 = r1 + -1;\n r8.zzjnu = r1;\t Catch:{ all -> 0x0049 }\n if (r1 == 0) goto L_0x0021;\n L_0x0016:\n if (r0 != 0) goto L_0x0021;\n L_0x0018:\n r0 = r8.zzjnt;\t Catch:{ all -> 0x0049 }\n if (r0 != 0) goto L_0x0042;\n L_0x001c:\n r0 = r8.zzjnv;\t Catch:{ all -> 0x0049 }\n r1 = 1;\n if (r0 != r1) goto L_0x0042;\n L_0x0021:\n com.google.android.gms.common.stats.zze.zzalb();\t Catch:{ all -> 0x0049 }\n r0 = r8.mContext;\t Catch:{ all -> 0x0049 }\n r1 = r8.zzjnp;\t Catch:{ all -> 0x0049 }\n r1 = com.google.android.gms.common.stats.zzc.zza(r1, r4);\t Catch:{ all -> 0x0049 }\n r2 = 8;\n r3 = r8.zzfxt;\t Catch:{ all -> 0x0049 }\n r5 = 0;\n r6 = r8.zzjnr;\t Catch:{ all -> 0x0049 }\n r7 = r8.zzjnq;\t Catch:{ all -> 0x0049 }\n r7 = com.google.android.gms.common.util.zzw.zzb(r7);\t Catch:{ all -> 0x0049 }\n com.google.android.gms.common.stats.zze.zza(r0, r1, r2, r3, r4, r5, r6, r7);\t Catch:{ all -> 0x0049 }\n r0 = r8.zzjnv;\t Catch:{ all -> 0x0049 }\n r0 = r0 + -1;\n r8.zzjnv = r0;\t Catch:{ all -> 0x0049 }\n L_0x0042:\n monitor-exit(r8);\t Catch:{ all -> 0x0049 }\n r0 = r8.zzjnp;\n r0.release();\n return;\n L_0x0049:\n r0 = move-exception;\n monitor-exit(r8);\t Catch:{ all -> 0x0049 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzcqb.release():void\");\n }",
"@Override // kotlinx.coroutines.flow.FlowCollector\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public java.lang.Object emit(java.lang.Object r9, kotlin.coroutines.Continuation r10) {\n /*\n r8 = this;\n boolean r0 = r10 instanceof kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1\n if (r0 == 0) goto L_0x0013\n r0 = r10\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r0 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1) r0\n int r1 = r0.label\n r2 = -2147483648(0xffffffff80000000, float:-0.0)\n r3 = r1 & r2\n if (r3 == 0) goto L_0x0013\n int r1 = r1 - r2\n r0.label = r1\n goto L_0x0018\n L_0x0013:\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r0 = new kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1\n r0.<init>(r10)\n L_0x0018:\n java.lang.Object r10 = r0.result\n java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()\n int r2 = r0.label\n r3 = 2\n r4 = 1\n if (r2 == 0) goto L_0x005e\n if (r2 == r4) goto L_0x0044\n if (r2 != r3) goto L_0x003c\n java.lang.Object r8 = r0.L$6\n kotlinx.coroutines.flow.FlowCollector r8 = (kotlinx.coroutines.flow.FlowCollector) r8\n java.lang.Object r8 = r0.L$4\n kotlin.coroutines.Continuation r8 = (kotlin.coroutines.Continuation) r8\n java.lang.Object r8 = r0.L$2\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r8 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1) r8\n java.lang.Object r8 = r0.L$0\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2 r8 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2) r8\n kotlin.ResultKt.throwOnFailure(r10)\n goto L_0x009b\n L_0x003c:\n java.lang.IllegalStateException r8 = new java.lang.IllegalStateException\n java.lang.String r9 = \"call to 'resume' before 'invoke' with coroutine\"\n r8.<init>(r9)\n throw r8\n L_0x0044:\n java.lang.Object r8 = r0.L$6\n kotlinx.coroutines.flow.FlowCollector r8 = (kotlinx.coroutines.flow.FlowCollector) r8\n java.lang.Object r9 = r0.L$5\n java.lang.Object r2 = r0.L$4\n kotlin.coroutines.Continuation r2 = (kotlin.coroutines.Continuation) r2\n java.lang.Object r4 = r0.L$3\n java.lang.Object r5 = r0.L$2\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2$1 r5 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.AnonymousClass1) r5\n java.lang.Object r6 = r0.L$1\n java.lang.Object r7 = r0.L$0\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2 r7 = (kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2) r7\n kotlin.ResultKt.throwOnFailure(r10)\n goto L_0x0084\n L_0x005e:\n kotlin.ResultKt.throwOnFailure(r10)\n kotlinx.coroutines.flow.FlowCollector r10 = kotlinx.coroutines.flow.FlowCollector.this\n kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1 r2 = r2\n kotlin.jvm.functions.Function2 r2 = r2.$action$inlined\n r0.L$0 = r8\n r0.L$1 = r9\n r0.L$2 = r0\n r0.L$3 = r9\n r0.L$4 = r0\n r0.L$5 = r9\n r0.L$6 = r10\n r0.label = r4\n java.lang.Object r2 = r2.invoke(r9, r0)\n if (r2 != r1) goto L_0x007e\n return r1\n L_0x007e:\n r7 = r8\n r4 = r9\n r6 = r4\n r8 = r10\n r2 = r0\n r5 = r2\n L_0x0084:\n r0.L$0 = r7\n r0.L$1 = r6\n r0.L$2 = r5\n r0.L$3 = r4\n r0.L$4 = r2\n r0.L$5 = r9\n r0.L$6 = r8\n r0.label = r3\n java.lang.Object r10 = r8.emit(r9, r0)\n if (r10 != r1) goto L_0x009b\n return r1\n L_0x009b:\n return r10\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object\");\n }",
"private void mo71773u() {\n List imageInfos = this.f73950g.getImageInfos();\n if (imageInfos != null && !imageInfos.isEmpty()) {\n ImageInfo imageInfo = (ImageInfo) imageInfos.get(0);\n if (imageInfo != null) {\n this.mCoverView.setVisibility(0);\n this.mLineProgressBar.mo74361a();\n C23323e.m76524b(this.mCoverView, imageInfo.getLabelLarge());\n C23323e.m76502a(imageInfo.getLabelLarge(), (C23328a) new C23328a() {\n /* renamed from: a */\n public final void mo60609a(C13346c<C13326a<C13645c>> cVar) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }\n\n /* renamed from: a */\n public final void mo60610a(Exception exc) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }\n });\n }\n }\n }",
"private void m50367F() {\n }",
"public void mo38101a(okhttp3.internal.http2.C13256a r4, okhttp3.internal.http2.C13256a r5, java.io.IOException r6) {\n /*\n r3 = this;\n r3.mo38100a(r4) // Catch:{ IOException -> 0x0003 }\n L_0x0003:\n r4 = 0\n monitor-enter(r3)\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r0 = r3.f34193g // Catch:{ all -> 0x004a }\n boolean r0 = r0.isEmpty() // Catch:{ all -> 0x004a }\n if (r0 != 0) goto L_0x0026\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r4 = r3.f34193g // Catch:{ all -> 0x004a }\n java.util.Collection r4 = r4.values() // Catch:{ all -> 0x004a }\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r0 = r3.f34193g // Catch:{ all -> 0x004a }\n int r0 = r0.size() // Catch:{ all -> 0x004a }\n okhttp3.internal.http2.h[] r0 = new okhttp3.internal.http2.C13281h[r0] // Catch:{ all -> 0x004a }\n java.lang.Object[] r4 = r4.toArray(r0) // Catch:{ all -> 0x004a }\n okhttp3.internal.http2.h[] r4 = (okhttp3.internal.http2.C13281h[]) r4 // Catch:{ all -> 0x004a }\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r0 = r3.f34193g // Catch:{ all -> 0x004a }\n r0.clear() // Catch:{ all -> 0x004a }\n L_0x0026:\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n if (r4 == 0) goto L_0x0035\n int r0 = r4.length\n r1 = 0\n L_0x002b:\n if (r1 >= r0) goto L_0x0035\n r2 = r4[r1]\n r2.mo38133a(r5, r6) // Catch:{ IOException -> 0x0032 }\n L_0x0032:\n int r1 = r1 + 1\n goto L_0x002b\n L_0x0035:\n okhttp3.internal.http2.i r4 = r3.f34208v // Catch:{ IOException -> 0x003a }\n r4.close() // Catch:{ IOException -> 0x003a }\n L_0x003a:\n java.net.Socket r4 = r3.f34207u // Catch:{ IOException -> 0x003f }\n r4.close() // Catch:{ IOException -> 0x003f }\n L_0x003f:\n java.util.concurrent.ScheduledExecutorService r4 = r3.f34198l\n r4.shutdown()\n java.util.concurrent.ExecutorService r4 = r3.f34199m\n r4.shutdown()\n return\n L_0x004a:\n r4 = move-exception\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http2.C13262e.mo38101a(okhttp3.internal.http2.a, okhttp3.internal.http2.a, java.io.IOException):void\");\n }",
"public void mo12704a(androidx.recyclerview.widget.RecyclerView.C1085v r23, int r24) {\n /*\n r22 = this;\n r11 = r22\n r12 = r23\n r13 = r24\n androidx.recyclerview.widget.RecyclerView$v r0 = r11.f13664c\n if (r12 != r0) goto L_0x000f\n int r0 = r11.f13675n\n if (r13 != r0) goto L_0x000f\n return\n L_0x000f:\n r0 = -9223372036854775808\n r11.f13661D = r0\n int r4 = r11.f13675n\n r14 = 1\n r11.mo12705a(r12, r14)\n r11.f13675n = r13\n r15 = 2\n if (r13 != r15) goto L_0x0030\n if (r12 == 0) goto L_0x0028\n android.view.View r0 = r12.itemView\n r11.f13685x = r0\n r22.m15037d()\n goto L_0x0030\n L_0x0028:\n java.lang.IllegalArgumentException r0 = new java.lang.IllegalArgumentException\n java.lang.String r1 = \"Must pass a ViewHolder when dragging\"\n r0.<init>(r1)\n throw r0\n L_0x0030:\n int r0 = r13 * 8\n r10 = 8\n int r0 = r0 + r10\n int r0 = r14 << r0\n int r16 = r0 + -1\n androidx.recyclerview.widget.RecyclerView$v r9 = r11.f13664c\n r8 = 0\n if (r9 == 0) goto L_0x00fd\n android.view.View r0 = r9.itemView\n android.view.ViewParent r0 = r0.getParent()\n if (r0 == 0) goto L_0x00e9\n if (r4 != r15) goto L_0x004a\n r7 = 0\n goto L_0x004f\n L_0x004a:\n int r0 = r11.m15036d(r9)\n r7 = r0\n L_0x004f:\n android.view.VelocityTracker r0 = r11.f13681t\n float r17 = r0.getXVelocity()\n r22.m15039f()\n r0 = 4\n r1 = 0\n if (r7 == r14) goto L_0x0081\n if (r7 == r15) goto L_0x0081\n if (r7 == r0) goto L_0x006f\n if (r7 == r10) goto L_0x006f\n r2 = 16\n if (r7 == r2) goto L_0x006f\n r2 = 32\n if (r7 == r2) goto L_0x006f\n r18 = 0\n L_0x006c:\n r19 = 0\n goto L_0x0094\n L_0x006f:\n float r2 = r11.f13669h\n float r2 = java.lang.Math.signum(r2)\n androidx.recyclerview.widget.RecyclerView r3 = r11.f13679r\n int r3 = r3.getWidth()\n float r3 = (float) r3\n float r2 = r2 * r3\n r18 = r2\n goto L_0x006c\n L_0x0081:\n float r2 = r11.f13670i\n float r2 = java.lang.Math.signum(r2)\n androidx.recyclerview.widget.RecyclerView r3 = r11.f13679r\n int r3 = r3.getHeight()\n float r3 = (float) r3\n float r2 = r2 * r3\n r19 = r2\n r18 = 0\n L_0x0094:\n if (r4 != r15) goto L_0x0099\n r3 = 8\n goto L_0x009e\n L_0x0099:\n if (r7 <= 0) goto L_0x009d\n r3 = 2\n goto L_0x009e\n L_0x009d:\n r3 = 4\n L_0x009e:\n float[] r0 = r11.f13663b\n r11.mo12708a(r0)\n float[] r0 = r11.f13663b\n r20 = r0[r8]\n r6 = r0[r14]\n app.zenly.locator.recommendation.swipeable.touchhelper.ItemTouchHelper$c r5 = new app.zenly.locator.recommendation.swipeable.touchhelper.ItemTouchHelper$c\n r0 = r5\n r1 = r22\n r2 = r9\n r14 = r5\n r5 = r20\n r21 = r7\n r7 = r18\n r8 = r19\n r19 = r9\n r9 = r21\n r21 = 8\n r10 = r19\n r0.<init>(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10)\n float r18 = r18 - r20\n float r18 = r18 / r17\n float r0 = java.lang.Math.abs(r18)\n r1 = 1148846080(0x447a0000, float:1000.0)\n float r0 = r0 * r1\n long r0 = (long) r0\n r2 = 250(0xfa, double:1.235E-321)\n r4 = 100\n long r0 = java.lang.Math.max(r4, r0)\n long r0 = java.lang.Math.min(r2, r0)\n r14.mo12743a(r0)\n java.util.List<app.zenly.locator.recommendation.swipeable.touchhelper.ItemTouchHelper$i> r0 = r11.f13677p\n r0.add(r14)\n r14.mo12745b()\n r8 = 1\n goto L_0x00f9\n L_0x00e9:\n r0 = r9\n r21 = 8\n android.view.View r1 = r0.itemView\n r11.mo12702a(r1)\n app.zenly.locator.recommendation.swipeable.touchhelper.ItemTouchHelper$g r1 = r11.f13674m\n androidx.recyclerview.widget.RecyclerView r2 = r11.f13679r\n r1.mo12692a(r2, r0)\n r8 = 0\n L_0x00f9:\n r0 = 0\n r11.f13664c = r0\n goto L_0x0100\n L_0x00fd:\n r21 = 8\n r8 = 0\n L_0x0100:\n if (r12 == 0) goto L_0x0132\n app.zenly.locator.recommendation.swipeable.touchhelper.ItemTouchHelper$g r0 = r11.f13674m\n androidx.recyclerview.widget.RecyclerView r1 = r11.f13679r\n int r0 = r0.mo12729b(r1, r12)\n r0 = r0 & r16\n int r1 = r11.f13675n\n int r1 = r1 * 8\n int r0 = r0 >> r1\n r11.f13676o = r0\n android.view.View r0 = r12.itemView\n int r0 = r0.getLeft()\n float r0 = (float) r0\n r11.f13671j = r0\n android.view.View r0 = r12.itemView\n int r0 = r0.getTop()\n float r0 = (float) r0\n r11.f13672k = r0\n r11.f13664c = r12\n if (r13 != r15) goto L_0x0132\n androidx.recyclerview.widget.RecyclerView$v r0 = r11.f13664c\n android.view.View r0 = r0.itemView\n r1 = 0\n r0.performHapticFeedback(r1)\n goto L_0x0133\n L_0x0132:\n r1 = 0\n L_0x0133:\n androidx.recyclerview.widget.RecyclerView r0 = r11.f13679r\n android.view.ViewParent r0 = r0.getParent()\n if (r0 == 0) goto L_0x0143\n androidx.recyclerview.widget.RecyclerView$v r2 = r11.f13664c\n if (r2 == 0) goto L_0x0140\n r1 = 1\n L_0x0140:\n r0.requestDisallowInterceptTouchEvent(r1)\n L_0x0143:\n if (r8 != 0) goto L_0x014e\n androidx.recyclerview.widget.RecyclerView r0 = r11.f13679r\n androidx.recyclerview.widget.RecyclerView$LayoutManager r0 = r0.getLayoutManager()\n r0.mo5218C()\n L_0x014e:\n app.zenly.locator.recommendation.swipeable.touchhelper.ItemTouchHelper$g r0 = r11.f13674m\n androidx.recyclerview.widget.RecyclerView$v r1 = r11.f13664c\n int r2 = r11.f13675n\n r0.mo12725a(r1, r2)\n androidx.recyclerview.widget.RecyclerView r0 = r11.f13679r\n r0.invalidate()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: app.zenly.locator.recommendation.swipeable.touchhelper.ItemTouchHelper.mo12704a(androidx.recyclerview.widget.RecyclerView$v, int):void\");\n }",
"public final void b(@org.jetbrains.annotations.Nullable java.lang.String r18) {\n /*\n r17 = this;\n r1 = 1\n java.lang.Object[] r2 = new java.lang.Object[r1]\n r9 = 0\n r2[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r4 = f2610e\n java.lang.Class[] r7 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r3 = java.lang.String.class\n r7[r9] = r3\n java.lang.Class r8 = java.lang.Void.TYPE\n r5 = 0\n r6 = 21950(0x55be, float:3.0759E-41)\n r3 = r17\n boolean r2 = com.meituan.robust.PatchProxy.isSupport(r2, r3, r4, r5, r6, r7, r8)\n if (r2 == 0) goto L_0x0032\n java.lang.Object[] r10 = new java.lang.Object[r1]\n r10[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r12 = f2610e\n r13 = 0\n r14 = 21950(0x55be, float:3.0759E-41)\n java.lang.Class[] r15 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r0 = java.lang.String.class\n r15[r9] = r0\n java.lang.Class r16 = java.lang.Void.TYPE\n r11 = r17\n com.meituan.robust.PatchProxy.accessDispatch(r10, r11, r12, r13, r14, r15, r16)\n return\n L_0x0032:\n com.ss.android.ugc.aweme.antiaddic.lock.c r2 = com.ss.android.ugc.aweme.antiaddic.lock.c.f33443d\n boolean r2 = r2.e()\n if (r2 == 0) goto L_0x003e\n r17.c(r18)\n return\n L_0x003e:\n java.lang.Object[] r10 = new java.lang.Object[r1]\n r10[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r12 = f2610e\n r13 = 0\n r14 = 21953(0x55c1, float:3.0763E-41)\n java.lang.Class[] r15 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r2 = java.lang.String.class\n r15[r9] = r2\n java.lang.Class r16 = java.lang.Boolean.TYPE\n r11 = r17\n boolean r2 = com.meituan.robust.PatchProxy.isSupport(r10, r11, r12, r13, r14, r15, r16)\n if (r2 == 0) goto L_0x0075\n java.lang.Object[] r10 = new java.lang.Object[r1]\n r10[r9] = r18\n com.meituan.robust.ChangeQuickRedirect r12 = f2610e\n r13 = 0\n r14 = 21953(0x55c1, float:3.0763E-41)\n java.lang.Class[] r15 = new java.lang.Class[r1]\n java.lang.Class<java.lang.String> r0 = java.lang.String.class\n r15[r9] = r0\n java.lang.Class r16 = java.lang.Boolean.TYPE\n r11 = r17\n java.lang.Object r0 = com.meituan.robust.PatchProxy.accessDispatch(r10, r11, r12, r13, r14, r15, r16)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r1 = r0.booleanValue()\n goto L_0x0096\n L_0x0075:\n com.ss.android.ugc.aweme.antiaddic.lock.entity.TimeLockUserSetting r2 = com.ss.android.ugc.aweme.antiaddic.lock.TimeLockRuler.getUserSetting()\n if (r2 == 0) goto L_0x0095\n r0 = r18\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n com.ss.android.ugc.aweme.antiaddic.lock.entity.TimeLockUserSetting r2 = com.ss.android.ugc.aweme.antiaddic.lock.TimeLockRuler.getUserSetting()\n java.lang.String r3 = \"TimeLockRuler.getUserSetting()\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r2, r3)\n java.lang.String r2 = r2.getPassword()\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n boolean r0 = android.text.TextUtils.equals(r0, r2)\n if (r0 == 0) goto L_0x0095\n goto L_0x0096\n L_0x0095:\n r1 = 0\n L_0x0096:\n if (r1 == 0) goto L_0x009c\n r17.b()\n return\n L_0x009c:\n android.content.Context r0 = com.ss.android.ugc.aweme.base.utils.d.a()\n r1 = 2131564680(0x7f0d1888, float:1.8754852E38)\n com.bytedance.ies.dmt.ui.d.a r0 = com.bytedance.ies.dmt.ui.d.a.b((android.content.Context) r0, (int) r1)\n r0.a()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.antiaddic.lock.ui.fragment.AntiAddictionTipFragment.b(java.lang.String):void\");\n }",
"private static boolean m20205b(java.lang.Throwable r3) {\n /*\n r0 = r3\n L_0x0001:\n if (r0 == 0) goto L_0x0015\n boolean r1 = r0 instanceof com.google.android.exoplayer2.upstream.DataSourceException\n if (r1 == 0) goto L_0x0010\n r1 = r0\n com.google.android.exoplayer2.upstream.DataSourceException r1 = (com.google.android.exoplayer2.upstream.DataSourceException) r1\n int r1 = r1.f18593a\n if (r1 != 0) goto L_0x0010\n r2 = 1\n return r2\n L_0x0010:\n java.lang.Throwable r0 = r0.getCause()\n goto L_0x0001\n L_0x0015:\n r1 = 0\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.upstream.cache.C8465b.m20205b(java.io.IOException):boolean\");\n }",
"public final void b() {\n /*\n r10 = this;\n r0 = 0\n java.lang.Object[] r1 = new java.lang.Object[r0]\n com.meituan.robust.ChangeQuickRedirect r3 = f53248e\n java.lang.Class[] r6 = new java.lang.Class[r0]\n java.lang.Class r7 = java.lang.Void.TYPE\n r4 = 0\n r5 = 55479(0xd8b7, float:7.7743E-41)\n r2 = r10\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7)\n if (r1 == 0) goto L_0x0025\n java.lang.Object[] r2 = new java.lang.Object[r0]\n com.meituan.robust.ChangeQuickRedirect r4 = f53248e\n r5 = 0\n r6 = 55479(0xd8b7, float:7.7743E-41)\n java.lang.Class[] r7 = new java.lang.Class[r0]\n java.lang.Class r8 = java.lang.Void.TYPE\n r3 = r10\n com.meituan.robust.PatchProxy.accessDispatch(r2, r3, r4, r5, r6, r7, r8)\n return\n L_0x0025:\n com.ss.android.ugc.aweme.live.alphaplayer.e$i r9 = r10.h\n java.lang.Object[] r2 = new java.lang.Object[r0]\n com.meituan.robust.ChangeQuickRedirect r4 = com.ss.android.ugc.aweme.live.alphaplayer.e.i.f53268a\n r5 = 0\n r6 = 55516(0xd8dc, float:7.7794E-41)\n java.lang.Class[] r7 = new java.lang.Class[r0]\n java.lang.Class r8 = java.lang.Void.TYPE\n r3 = r9\n boolean r2 = com.meituan.robust.PatchProxy.isSupport(r2, r3, r4, r5, r6, r7, r8)\n if (r2 == 0) goto L_0x004b\n java.lang.Object[] r2 = new java.lang.Object[r0]\n com.meituan.robust.ChangeQuickRedirect r4 = com.ss.android.ugc.aweme.live.alphaplayer.e.i.f53268a\n r5 = 0\n r6 = 55516(0xd8dc, float:7.7794E-41)\n java.lang.Class[] r7 = new java.lang.Class[r0]\n java.lang.Class r8 = java.lang.Void.TYPE\n r3 = r9\n com.meituan.robust.PatchProxy.accessDispatch(r2, r3, r4, r5, r6, r7, r8)\n return\n L_0x004b:\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r2 = g\n monitor-enter(r2)\n r0 = 1\n r9.f53270c = r0 // Catch:{ all -> 0x006e }\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r0 = g // Catch:{ all -> 0x006e }\n r0.notifyAll() // Catch:{ all -> 0x006e }\n L_0x0056:\n boolean r0 = r9.f53269b // Catch:{ all -> 0x006e }\n if (r0 != 0) goto L_0x006c\n boolean r0 = r9.f53271d // Catch:{ all -> 0x006e }\n if (r0 != 0) goto L_0x006c\n com.ss.android.ugc.aweme.live.alphaplayer.e$j r0 = g // Catch:{ InterruptedException -> 0x0064 }\n r0.wait() // Catch:{ InterruptedException -> 0x0064 }\n goto L_0x0056\n L_0x0064:\n java.lang.Thread r0 = java.lang.Thread.currentThread() // Catch:{ all -> 0x006e }\n r0.interrupt() // Catch:{ all -> 0x006e }\n goto L_0x0056\n L_0x006c:\n monitor-exit(r2) // Catch:{ all -> 0x006e }\n return\n L_0x006e:\n r0 = move-exception\n monitor-exit(r2) // Catch:{ all -> 0x006e }\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.live.alphaplayer.e.b():void\");\n }",
"public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\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.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\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 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }"
] | [
"0.6473304",
"0.6448246",
"0.6401136",
"0.6360934",
"0.63470304",
"0.62605035",
"0.61686045",
"0.61288047",
"0.60985935",
"0.60753447",
"0.60634154",
"0.60565186",
"0.60486025",
"0.6020886",
"0.59959006",
"0.5942019",
"0.59311485",
"0.5922769",
"0.5913288",
"0.5907221",
"0.58343685",
"0.5799384",
"0.5796515",
"0.5763771",
"0.57503587",
"0.5739328",
"0.5736665",
"0.572531",
"0.5721338",
"0.5719778",
"0.57103616",
"0.57103306",
"0.5700795",
"0.56961375",
"0.5689238",
"0.5688989",
"0.567371",
"0.5655549",
"0.5641317",
"0.5619603",
"0.56181884",
"0.5611965",
"0.56111544",
"0.560392",
"0.5597354",
"0.55788493",
"0.5578766",
"0.5574808",
"0.5574535",
"0.5567814",
"0.5555739",
"0.55543983",
"0.55543983",
"0.55494153",
"0.5537002",
"0.55276024",
"0.55240536",
"0.5520773",
"0.5501245",
"0.5487562",
"0.5487508",
"0.54628074",
"0.546079",
"0.545463",
"0.5453608",
"0.5450894",
"0.5447627",
"0.5447329",
"0.5431752",
"0.5407043",
"0.54065496",
"0.54042625",
"0.5401579",
"0.53966236",
"0.5392908",
"0.5388788",
"0.5386687",
"0.53857917",
"0.53802586",
"0.53792775",
"0.53759706",
"0.5375682",
"0.5373767",
"0.536464",
"0.5360016",
"0.5358725",
"0.53537905",
"0.5353505",
"0.53463036",
"0.5343676",
"0.5334554",
"0.53345376",
"0.5333134",
"0.53329057",
"0.53304034",
"0.53300357",
"0.53226787",
"0.5315305",
"0.5314998",
"0.53113127",
"0.5306001"
] | 0.0 | -1 |
Execute Step: Do nothing | @Override
public void execute(RuntimeStep exe, RuntimePlan plan) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void execute() {\n \t// literally still do nothing\n }",
"protected void runBeforeStep() {}",
"protected void runAfterStep() {}",
"@Override\n public boolean step() {\n return false;\n }",
"@Override\r\n\tprotected void doExecute(StepExecution stepExecution) throws Exception {\n\t\t\r\n\t}",
"protected abstract R runStep();",
"public abstract void performStep();",
"public void step()\n {\n status = stepInternal();\n }",
"public void doit() {\n // Do nothing\n }",
"@Override\n\tpublic void step() {\n\t}",
"@Override\n\tpublic void step() {\n\t}",
"public void unExecute()\n\t{\n\t}",
"public void doNothing(){\n\t}",
"@Override\n\tpublic void step() {\n\t\t\n\t}",
"@Override\n\tpublic void step() {\n\t\t\n\t}",
"public void run() {\n super.executeStep();\n }",
"public static void doNothing(){\n\t}",
"@Override\n\tpublic void execute() {\n\t\tSystem.exit(0);\n\t}",
"public void step();",
"public void step();",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tno();\n\t\t\t\t}",
"@Override\r\n\tpublic void execute() throws InstructionExecutionException {\n\t\tthis.robot.requestQuit();\r\n\t}",
"protected void doExecute(String[] arguments, ContextStatus contextStatus) {\n // no action to do\n }",
"protected abstract void doExecute() throws IOException, MojoExecutionException;",
"private void runOneStepInScenario(HttpServletRequest request, HttpServletResponse response) throws InterruptedException, QueryExecutionException, IOException {\n String ifNextTick = SimApi.ifNextTick();\n if (!\"false\".equals(ifNextTick)) {\n SimApi.nextTick();\n response.getWriter().write(ifNextTick);\n } else {\n response.getWriter().write(\"false\");\n }\n }",
"@Override\n\t\tpublic boolean shouldContinueExecuting() {\n\t\t\treturn false;\n\t\t}",
"public void intialRun() {\n }",
"@Override\n\t\t\tpublic String run() {\n\t\t\t\treturn null;\n\t\t\t}",
"public void execute() {\n // empty\n }",
"protected Step() {\n this(null);\n }",
"@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}",
"public void execute() throws MojoExecutionException, MojoFailureException {\n\n\t\tif (super.isSkip()) {\n\t\t\tlogger.info(\"Skipping\");\n\t\t\treturn;\n\t\t}\n\n\t\tLogger logger = LogManager.getLogger(FlowHookMojo.class);\n\n\t\ttry {\n\t\t\t\n\t\t\tinit();\n\n\t\t\tif (buildOption == OPTIONS.none) {\n\t\t\t\tlogger.info(\"Skipping Flow Hooks (default action)\");\n\t\t\t\treturn;\n\t\t\t}\n\n if (serverProfile.getEnvironment() == null) {\n throw new MojoExecutionException(\n \"Apigee environment not found in profile\");\n }\n\n\t\t\tList flowhooks = getEnvConfig(logger, \"flowhooks\");\n\t\t\tif (flowhooks == null || flowhooks.size() == 0) {\n\t\t\t\tlogger.info(\"No flowhooks config found.\");\n return;\n\t\t\t}\n\n\t\t\tdoUpdate(flowhooks);\t\t\t\t\n\t\t\t\n\t\t} catch (MojoFailureException e) {\n\t\t\tthrow e;\n\t\t} catch (RuntimeException e) {\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override\n\tpublic void reallyDoStep() {\n\t\tif(!(this.isFinished())) this.timeRemaining--; \n\t\treturn;\n\t}",
"public void onTestSkipped(ITestResult arg0) {\n\t\ttest.log(LogStatus.SKIP, \"test case skipped as runmode No \");\r\n\t\trep.endTest(test);\r\n\t\trep.flush();\r\n\t}",
"public void prePerform() {\n // nothing to do by default\n }",
"public void afterMojoExecutionAlways()\n throws MojoExecutionException;",
"public void perform() {\n\t\tlog.info(\"begin to play the drum\");\n\t\tthrow new RuntimeException();\n\t}",
"@Override\r\n\tpublic void clearStepHandlers() {\n\t\t\r\n\t}",
"@Override\n public void onStepStopping(FlowStep flowStep) {\n }",
"public void halt() {\n\t\t// Task can not currently be halted.\n\t}",
"@Override public void action() {\n //Do Nothing\n assert(checkRep());\n }",
"@Override\n public void abort(RuntimeStep exe) {\n }",
"@Override\n public void action() {\n while (turn.getPlayer().getFightDecision() == null){\n ;\n }\n FightDecision decision = turn.getPlayer().getFightDecision();\n if (decision== FightDecision.IGNORE){\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new MovePhase(y));\n }else{\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new FightPhase());\n }\n }",
"private static void no(final Command cmd, final Session session) {\n try {\n session.execute(cmd);\n fail(\"Command was supposed to fail.\");\n } catch(final IOException ex) {\n Util.debug(ex);\n }\n }",
"@Override\n\tpublic void step(int actionType) {\n\n\t}",
"@Override\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\tSystem.out.println(\"on test skipped\");\n\t\t\n\t}",
"@Override\n\tprotected Object run() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}",
"@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}",
"public static void main(String[] args) {\n\r\n // action\r\n // - nothing\r\n\r\n // check\r\n // - nothing\r\n }",
"public void execute() {\n setExecuted(true);\n }",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"protected void doManaged() {\n // default is no-op\n }",
"@Override\n\tpublic String execute() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String execute() {\n\t\treturn null;\n\t}",
"@Override\n public void stopExecute() {\n\n }",
"public void undo() {\n setExecuted(false);\n }",
"@Override\n public StepResult undoStep(FlightContext context) throws InterruptedException {\n return StepResult.getStepResultSuccess();\n }",
"@Override\n public void execute() {\n if(!manipulatorController.getRawButton(button)){\n shooter.shooterMotorsOff();\n hopper.hopperMotorOff();\n isDone = true;\n end(false);\n }\n\n }",
"@When(\"the game result is not yet final\")\n\tpublic void the_game_result_is_not_yet_final() {\n\t}",
"protected TeststepRunner() {}",
"@Test\n\t\tpublic void applyOnceGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; x ∈ ℤ ;; y ∈ ℤ |- x↦y ∈ id\", rm(\"\", empty));\n\t\t}",
"@Quando(\"criar os steps\")\n\tpublic void criarOsSteps() {\n\t throw new cucumber.api.PendingException();\n\t}",
"@When(\"^I execute my test case$\")\n public void iExecuteMyTestCase() throws Throwable {\n throw new PendingException();\n }",
"public void doInitialAction(){}",
"public void nop() throws IOException {\n simpleCommand(\"NOP\\0\");\n }",
"public void Execute() {\n\n }",
"@Given(\"prepare to Analysis\")\npublic void preanalysis(){\n}",
"public void run() {\n // no-op.\n }",
"@Override\r\n\tpublic boolean runAgain(CompilationUnit unit) {\n\t\treturn false;\r\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tsetPath(null);\n\t\t\t\t}",
"static public void order66() {\n System.exit(0);\n }",
"void Step(String step);",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\tSystem.out.println(\"THE TEST CASE HAS BEEN SKIPPED\");\n\t}",
"public void __noop() {\n __send(__buildMessage(FTPCommand.getCommand(32), null));\n __getReplyNoReport();\n }",
"public void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"@Override\n\tpublic String process() {\n\t\treturn null;\n\t}",
"protected void markUnstable() {\n if (this.step == null || this.step.markUnstable) {\n if (this.run != null) {\n this.run.setResult(Result.UNSTABLE);\n }\n }\n }",
"@Override\r\n\tpublic void stepn(Robot robot, int n)\r\n\t{\r\n\t\trobot.runProgramStep(n);\r\n\t}",
"public boolean execute(){\n return false;\n }",
"@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }",
"@Override\n public boolean continueExecuting()\n {\n return !this.entity.getNavigator().noPath();\n }",
"private void int_to_void_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 // Get the operand value\r\n long x = getIntOperand( nd, vms, 0 ) ;\r\n \r\n // Compute the value\r\n switch( op_code ) {\r\n case SRAND :\r\n if( random == null ) random = new java.util.Random(1) ;\r\n random.setSeed( x ) ;\r\n case ASSERT :\r\n if( x== 0 ) {\r\n // Assertion tripped.\r\n // The TM will throw an error.\r\n SourceCoords sc = vms.getCurrentCoords() ;\r\n vms.getConsole().putString(\"Assertion failed at \"+sc.toString()+\"\\n\") ;\r\n vms.setEvaluationState( vms.EVALUATION_STATE_TERMINATED ) ;\r\n }\r\n break ;\r\n default: Assert.check(false) ;\r\n }\r\n/* \r\n // New datum on scratch\r\n Clc_ASTUtilities util\r\n = (Clc_ASTUtilities) vms.getProperty(\"ASTUtilities\") ;\r\n AbstractDatum d\r\n = util.scratchDatum(nd.get_type(), vms) ;\r\n \r\n vms.top().map(nd, d) ; */\r\n putVoidResult(nd, vms);\r\n }",
"public int step() {\n // PUT YOUR CODE HERE\n }",
"public void postPerform() {\n // nothing to do by default\n }",
"protected void after( boolean successful ) throws Throwable\n {\n // do nothing\n }",
"void execute() {\n deleteNextEntry();\n }",
"public Builder clearStep() {\n bitField0_ = (bitField0_ & ~0x00000002);\n step_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStep() {\n bitField0_ = (bitField0_ & ~0x00000002);\n step_ = 0;\n onChanged();\n return this;\n }",
"public void halt();",
"public void postProcessing() {\n //empty\n }",
"@Override\n public void exitFirstRun() {\n FirstRunStatus.setFirstRunSkippedByPolicy(true);\n\n launchPendingIntentAndFinish();\n }",
"@Override\n public WorkflowStep fail() {\n this.boardChangeDetected = 0;\n this.missingFutures = 0;\n this.missingTetromino = 0;\n return INITIAL_BOARD.execute(false);\n }",
"public static void beginStep() {\n\t\tTestNotify.log(STEP_SEPARATOR);\n\t TestNotify.log(GenLogTC() + \"is being tested ...\");\n\t}",
"@Test\n public void emptyTreeConsumedByLocalAction() throws Exception {\n addOptions(\"--modify_execution_info=Genrule=+no-remote-exec\");\n addOptions(\"--verbose_failures\");\n setDownloadToplevel();\n writeOutputDirRule();\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {},\", // no files\n \")\",\n \"genrule(\",\n \" name = 'foobar',\",\n \" srcs = [':foo'],\",\n \" outs = ['foobar.txt'],\",\n \" cmd = 'touch $@',\",\n \")\");\n\n buildTarget(\"//:foobar\");\n waitDownloads();\n }",
"public void intermediateProcessing() {\n //empty\n }",
"@Override\r\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"@Override\n\tpublic void doExecute(Runnable action) {\n\t\t\n\t}"
] | [
"0.67741406",
"0.6613015",
"0.66005427",
"0.64736044",
"0.6420864",
"0.63921064",
"0.63873464",
"0.6307337",
"0.6295142",
"0.6243571",
"0.6243571",
"0.62058544",
"0.61770636",
"0.6152938",
"0.6152938",
"0.61463094",
"0.61138594",
"0.61073655",
"0.6041435",
"0.6041435",
"0.59771353",
"0.59400946",
"0.59200907",
"0.5874675",
"0.5867649",
"0.5839788",
"0.5805452",
"0.57635224",
"0.5748855",
"0.57458603",
"0.5737754",
"0.5737754",
"0.5731685",
"0.5724638",
"0.57016975",
"0.5696581",
"0.5679748",
"0.5631023",
"0.5621916",
"0.56094116",
"0.55896086",
"0.5548698",
"0.5541611",
"0.55339956",
"0.5529396",
"0.552824",
"0.55250156",
"0.55018973",
"0.54968506",
"0.54887676",
"0.5485045",
"0.54622424",
"0.54571086",
"0.5445706",
"0.54432684",
"0.54432684",
"0.5430483",
"0.5424512",
"0.54140955",
"0.54099894",
"0.5407348",
"0.54072124",
"0.5399282",
"0.53974986",
"0.5396408",
"0.5385185",
"0.53753084",
"0.53731513",
"0.53611964",
"0.5351276",
"0.5351106",
"0.53448486",
"0.53431505",
"0.5342304",
"0.53337324",
"0.53297424",
"0.53294003",
"0.5320564",
"0.5315326",
"0.53111553",
"0.53039014",
"0.5303019",
"0.5299654",
"0.52979696",
"0.5297783",
"0.5297183",
"0.5293506",
"0.5290759",
"0.52886826",
"0.52886826",
"0.52851576",
"0.52843773",
"0.5279792",
"0.52770543",
"0.52742404",
"0.5273335",
"0.5272074",
"0.52708113",
"0.52708113",
"0.5266109"
] | 0.56406075 | 37 |
Abort Step: Do nothing | @Override
public void abort(RuntimeStep exe) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void abort() { \n abortFlag = true ;\n }",
"@Override\n\tpublic void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {\n\t}",
"public void abort() {\n isAborted = true;\n cancelCommands();\n cancel(true);\n }",
"public void halt();",
"public void halt() {\n\t\t// Task can not currently be halted.\n\t}",
"public void aborted() {\n System.out.println(\"Aborted\");\n }",
"public void abort() throws IOException;",
"@Override\n public void abort() {\n giocoinesecuzione = null;\n }",
"@Override\n\tpublic void stateMachineAbort() {\n\t}",
"@Override\n\tpublic void stateMachineAbort() {\n\n\t}",
"@Override\n\tpublic void stateMachineAbort() {\n\n\t}",
"@Override\n\tpublic void stateMachineAbort() {\n\n\t}",
"@Override\n\tpublic void stateMachineAbort() {\n\n\t}",
"public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}",
"public void abort() {\n reservedSpace.clear();\n this.abortRequested = true;\n stop();\n }",
"public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\n }",
"public void abortBuilding() {\n buildTarget = null;\n buildStep = 0;\n buildInstructions = null;\n buildLocation = null;\n buildHeight = null;\n\n knowledge.myState = RobotState.IDLE;\n }",
"public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n }",
"@Override\n public StepResult undoStep(FlightContext context) throws InterruptedException {\n return StepResult.getStepResultSuccess();\n }",
"void abortChallenge();",
"public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\t}",
"@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n }",
"public void halt ( )\n\t{\n\t\tthis.running = false;\n\t}",
"private void cancel() {\n\t\tfinish();\n\t}",
"@java.lang.Override\n public boolean hasAbort() {\n return stepInfoCase_ == 14;\n }",
"public void halt(ServiceResult result);",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"void abort() {\n\n // Revision number = 0 indicates an aborted transaction.\n this.targetRevisionNumber.set( 0L );\n\n // Clean up aborted revisions ...\n for ( AbstractVersionedItem versionedItem : this.versionedItemsWritten ) {\n versionedItem.removeAbortedRevision();\n }\n\n this.versionedItemsRead.clear();\n this.versionedItemsWritten.clear();\n\n // Trigger any clean up that is possible from no longer needing our source version.\n this.cleanUpOlderRevisions();\n\n }",
"@java.lang.Override\n public boolean hasAbort() {\n return stepInfoCase_ == 14;\n }",
"public static void abort(Exception e, String msg) {\r\n e.printStackTrace();\r\n System.err.println(\"Transformation process terminated abnormally. \" + msg);\r\n System.exit(1); //Issue signal to the operation system that execution terminated abnormally\r\n }",
"@Override\r\n\t\tpublic void abort(Executor executor) throws SQLException {\n\t\t\t\r\n\t\t}",
"public void onAbort() {\n releaseInitialRef.run();\n }",
"public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }",
"public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}",
"void cancelProduction();",
"@Override\n public boolean step() {\n return false;\n }",
"public void abort()\n\t{\n\t\tif(process != null)\n\t\t\tprocess.destroy();\n\t}",
"final private static void abort (final String message) {\n\t\tSystem.out.println(message) ;\n\t\tSystem.exit (1) ;\n }",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"public void abort() throws StreamingException, TxnBatchFailure, InterruptedException {\n synchronized (txnBatchLock) {\n abortTxn();\n nextTxn(true); // roll to next\n }\n }",
"public void cancel() {\n\t}",
"@Override\r\n public void abortJob(JobContext context, int runState) \r\n throws IOException {\n cleanupJob(context);\r\n }",
"@Override\n\tpublic void reallyDoStep() {\n\t\tif(!(this.isFinished())) this.timeRemaining--; \n\t\treturn;\n\t}",
"@Override\n public void onStepStopping(FlowStep flowStep) {\n }",
"void cancelOriginal();",
"public void cancel();",
"@Test\n public void abortSisImportTest() {\n String accountId = null;\n String id = null;\n // SisImport response = api.abortSisImport(accountId, id);\n\n // TODO: test validations\n }",
"public void halt(final String errorMessage);",
"public void cancel() {\n/* 170 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void filesAbortTest() throws ApiException {\n String owner = null;\n String repo = null;\n String identifier = null;\n FilesAbort data = null;\n api.filesAbort(owner, repo, identifier, data);\n\n // TODO: test validations\n }",
"public void cancel()\n\t{\n\t}",
"public synchronized void cancel() {\n }",
"public synchronized void writeAbort(Transaction t) {\n\t\tflush();\n\t\tpw.println(t.transactionId() + \" abort\");\t\n\t\tflush();\n\t}",
"public void cancel() {\n\t\tcancel(false);\n\t}",
"public boolean cancel();",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"public void cancelarIniciarSesion(){\n System.exit(0);\n }",
"private void abortTxn() throws InterruptedException {\n LOG.info(\"Aborting Txn id {} on End Point {}\", txnBatch.getCurrentTxnId(), endPoint);\n try {\n callWithTimeout(new CallRunner<Void>() {\n @Override\n public Void call() throws StreamingException, InterruptedException {\n txnBatch.abort(); // could block\n return null;\n }\n });\n } catch (InterruptedException e) {\n throw e;\n } catch (TimeoutException e) {\n LOG.warn(\"Timeout while aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n } catch (Exception e) {\n LOG.warn(\"Error aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n // Suppressing exceptions as we don't care for errors on abort\n }\n }",
"@DISPID(10)\r\n\t// = 0xa. The runtime will prefer the VTID if present\r\n\t@VTID(14)\r\n\tboolean aborted();",
"public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }",
"public void unExecute()\n\t{\n\t}",
"@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}",
"protected abstract void abortTxn(Txn txn) throws PersistException;",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"public void cancel() {\n\t\tcancelled = true;\n\t}",
"private void abortOrder() {\n OrderDataService.cancelOrder(eventUid, isMarkedSeats, order);\n\n String orderInvalidMessage = \"שים לב! לא נותרו כרטיסים בכמות שבחרת. במידה ולא אזלו הכרטיסים, נסה שוב\";\n Toast.makeText(PaymentActivity.this, orderInvalidMessage, Toast.LENGTH_LONG).show();\n final Intent detailActivityIntent = new Intent(this, EventDetailsActivity.class);\n detailActivityIntent.putExtra(\"eventUid\", eventUid);\n\n // Send user back to event details activity after toast was shown for long enough\n Thread thread = new Thread(){\n @Override\n public void run() {\n try {\n Thread.sleep(2500);\n startActivity(detailActivityIntent);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n };\n\n thread.start();\n }",
"public boolean isAbortable();",
"@Override\n public void cancel() {\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"public void killExecution() {\n \n \t\tcancelOrKillExecution(false);\n \t}",
"public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {\n executable.getParent().checkAbortPermission();\n interrupt();\n rsp.forwardToPreviousPage(req);\n }",
"public void abort() throws IOException {\n\t\t\tcompleteEdit(this, false);\n\t\t}",
"public void cancel(){\n cancelled = true;\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"private void cancelHeavyLifting()\n {\n }",
"void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }",
"public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}",
"@Override\n\tpublic void cancel() {\n\t\t\n\t}",
"public void flowAbrupted() {\n prevInstruction = null;\n }",
"public void m33491b() {\n Action<String> aVar = f26278b;\n if (aVar != null) {\n aVar.mo21403a(\"User canceled.\");\n }\n f26277a = null;\n f26278b = null;\n finish();\n }",
"protected void runAfterStep() {}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\t\t\n\t\tSystem.out.println(\"entry abort work item====\");\n\t\t\n\t\tmanager.abortWorkItem(workItem.getId());\n\t\t\n\t\tSystem.out.println(\"aborting process====\");\n\t\t\n\t}",
"public synchronized void abort() throws IOException {\n ensureOpen();\n // need check again .\n //\tif(isDone) {\n //\t throw new IOException(\"Operation has already ended\");\n //\t}\n\n //no compatible with sun-ri\n if ((isDone) && (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE)) {\n throw new IOException(\"Operation has already ended\");\n }\n\n exceptionMessage = \"Operation aborted\";\n if ((!isDone) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n isDone = true;\n /*\n * Since we are not sending any headers or returning any headers then\n * we just need to write and read the same bytes\n */\n parent.sendRequest(0xFF, null, replyHeaders, null);\n\n if (replyHeaders.responseCode != ResponseCodes.OBEX_HTTP_OK) {\n throw new IOException(\"Invalid response code from server\");\n }\n\n exceptionMessage = null;\n }\n\n close();\n }",
"public void cancel() {\r\n\t\tbStop = true;\r\n\t}",
"private void onCancel() {\n System.exit(0);\r\n dispose();\r\n }",
"public Builder clearAbort() {\n if (abortBuilder_ == null) {\n if (stepInfoCase_ == 14) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n onChanged();\n }\n } else {\n if (stepInfoCase_ == 14) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n }\n abortBuilder_.clear();\n }\n return this;\n }"
] | [
"0.746227",
"0.72248214",
"0.7033402",
"0.69554317",
"0.695081",
"0.68294674",
"0.68218297",
"0.6817698",
"0.6769618",
"0.675364",
"0.675364",
"0.675364",
"0.675364",
"0.67507887",
"0.6726022",
"0.6588114",
"0.65870726",
"0.6572392",
"0.65625775",
"0.65291244",
"0.6518296",
"0.6506656",
"0.647207",
"0.6466233",
"0.645584",
"0.64300317",
"0.64197445",
"0.63456255",
"0.63456255",
"0.63456255",
"0.63456255",
"0.63456255",
"0.63456255",
"0.63453895",
"0.63223934",
"0.6271691",
"0.6253217",
"0.624338",
"0.6195045",
"0.6190186",
"0.6187613",
"0.6181295",
"0.6176995",
"0.6133942",
"0.6129103",
"0.6129103",
"0.6129103",
"0.6129103",
"0.6129103",
"0.6114506",
"0.6106401",
"0.60952234",
"0.6048445",
"0.60454106",
"0.60429674",
"0.6030842",
"0.60168713",
"0.601284",
"0.6008904",
"0.60086423",
"0.6003152",
"0.59857124",
"0.59782445",
"0.5956978",
"0.5943692",
"0.59358203",
"0.59336483",
"0.5932226",
"0.5898645",
"0.58942735",
"0.5883781",
"0.58731097",
"0.587045",
"0.5865654",
"0.5862712",
"0.58474386",
"0.5841505",
"0.58375686",
"0.5830297",
"0.5830297",
"0.5830297",
"0.5823954",
"0.58188444",
"0.581775",
"0.58130443",
"0.58125496",
"0.5812254",
"0.58114165",
"0.5801226",
"0.5800289",
"0.5798283",
"0.5795842",
"0.57873756",
"0.5785555",
"0.5785555",
"0.5784385",
"0.5784286",
"0.57797456",
"0.5778839",
"0.5770888"
] | 0.8011418 | 0 |
save an user to the database | public User saveUser(User user) {
return userRepository.save(user);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveUser(User user);",
"void save(User user);",
"public boolean save(User user);",
"public int saveUser(User user);",
"@Override\r\n\tpublic int saveUser(User user) {\n\t\tString sql = \"insert into user values(?,?,?,?)\";\r\n\t\treturn this.update(sql,user.getId(), user.getUsername(),user.getPassword(),user.getEmail());\r\n\t}",
"User saveUser(User user);",
"public User saveUser(User user);",
"@Override\r\n\tpublic void save(User user) {\n\t\t\r\n\t}",
"@Override\n public void saveUser(User user) {\n }",
"public void saveUser(User user) {\n\t\tpersist(user);\r\n\t\t\r\n\t}",
"void saveUserData(User user);",
"@Override\n\tpublic void save(User user) \n\t{\n\t\tuserDAO.save(user);\n\t}",
"@Override\n\tpublic void save(User u) {\n\t\tSystem.out.println(\"a user saved\");\n\t}",
"@Override\r\n\tpublic void save() {\n\t\tSystem.out.println(\"UserServiceImplÍ┤đđ┴╦\");\r\n\t\tuserDao.save();\r\n\t}",
"@Override\n\tpublic void save(Connection conn, User user) throws SQLException {\n\t\t\n\t}",
"public User save(User user);",
"User save(User user);",
"boolean saveUser(User entity) throws UserDaoException;",
"@Override\n\tpublic void saveUser(User user) {\n\t\tuser.setPassword(MD5.getInstance().getMd5(user.getPassword(),\"UTF-8\"));\n\t\tuserDao.insertUser(user);\n\t}",
"public void saveUser(IUser user);",
"@RolesAllowed({ RoleEnum.ROLE_ADMIN, RoleEnum.ROLE_GUEST })\n\tpublic Integer saveUser(User user);",
"@Override\n\tpublic int save(User user) {\n\t\treturn dao.save(user);\n\t}",
"public User saveUser(User user){\n return userRepository.save(user);\n }",
"private void saveUserDetails() {\n UserModel userModel = new UserModel();\n userModel.setUserName(editUserName.getText().toString());\n userModel.setPassword(editPassword.getText().toString());\n\n /* if (db.insertUserDetils(userModel)) {\n //Toast.makeText(LoginActivity.this, \"Successfully save\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Data not Saved\", Toast.LENGTH_SHORT).show();\n }*/\n }",
"@Override\n public void saveUser(User user){\n try {\n runner.update(con.getThreadConnection(),\"insert into user(username,address,sex,birthday) values(?,?,?,?)\",user.getUsername(),user.getAddress(),user.getSex(),user.getBirthday());\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic void saveUser(User user) {\n\t\tmongoTemplate.save(user);\n\t}",
"public void save(User user) {\n\t\tuserDetails.setUserName(user.getUserName());\n\t\tuserDetails.setPassword(user.getPassword());\n\t\tuserDetails.setFname(user.getFname());\n\t\tuserDetails.setLname(user.getLname());\n\t\tuserDetails.setAge(user.getAge());\n\t\tuserDetailsRepositroy.save(userDetails);\n\t}",
"public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@RequestMapping(value=\"/user\", method = RequestMethod.POST) \n\tpublic void saveUser(@RequestBody Users user) {\n\t\tlogger.debug(\"Add a new user: {}\", user.getUsername());\n\t\tauthService.saveUser(user);\n\t}",
"public void save(SystemUser user);",
"public boolean saveUser(Owner user) {\r\n boolean f = false;\r\n try {\r\n //user -->database\r\n\r\n String query = \"insert into Owner(name,email,password) values (?,?,?)\";\r\n PreparedStatement pstmt = this.con.prepareStatement(query);\r\n pstmt.setString(1, user.getName());\r\n pstmt.setString(2, user.getEmail());\r\n pstmt.setString(3, user.getPassword());\r\n pstmt.executeUpdate();\r\n f = true;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return f;\r\n\r\n }",
"void save(KingdomUser user);",
"@Override\n\tpublic boolean saveUser(User user) {\n\t\tString sql=\"insert into users(uname,upassword,type) values(?,?,?)\";\n\t\tList<Object> params=new ArrayList<Object>();//泛型\n\t\tparams.add(user.getUname());\n\t\tparams.add(user.getUpassword());\n\t\tparams.add(user.getType());\n\t\treturn this.MysqlUpdate(sql, params);\n\t}",
"public void saveUser(User user) {\n\t\tuserRepo.save(user);\n\t}",
"public User save(User usuario);",
"void save(UserDetails userDetails);",
"@Override\n\tpublic void save(User entity) {\n\t\t\n\t}",
"public boolean saveUser(User user )\r\n\t{\r\n\t\tboolean f = false;\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//user --> database\r\n\t\t\tString query=\"insert into user(first_name,last_name,bdate,email,password,gender,about) values (?,?,?,?,?,?,?)\";\r\n\t\t\tPreparedStatement pstmt = this.con.prepareStatement(query);\r\n\t\t\tpstmt.setString(1, user.getFirst_name());\r\n\t\t\tpstmt.setString(2, user.getLast_name());\r\n\t\t\tpstmt.setString(3, user.getBdate());\r\n\t\t\tpstmt.setString(4, user.getEmail());\r\n\t\t\tpstmt.setString(5, user.getPassword());\r\n\t\t\tpstmt.setString(6, user.getGender());\r\n\t\t\tpstmt.setString(7, user.getAbout());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\tf=true;\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn f;\r\n\t\t\r\n\t\t\r\n\t}",
"void saveOrUpdate(User user);",
"@Override\n\tpublic boolean save(User user) {\n\t\tString userHash = UUID.randomUUID().toString();\n\t\tuser.setUserHash(userHash);\n\t\tboolean status = userRepository.save(user);\n\t\tif (status) {\n\t\t\tSystem.out.println(\"USER ID : \" + user.getId());\n\t\t\tSystem.out.println(\"User has been inserted!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"User has not been inserted!.\");\n\t\t}\n\t\treturn status;\n\t}",
"public void save(Connection conn, User user) throws SQLException {\n\t\tString saveSql=\"insert into tbl_user (name,password,email)values(?,?,?)\";\n\t\tPreparedStatement ps=conn\n\t\t\t\t.prepareCall(saveSql);\n\t\tps.setString(1, user.getName());\n\t\tps.setString(2, user.getPassword());\n\t\tps.setString(3, user.getEmail());\n\t\tps.execute();\n\t}",
"@Override\n\tpublic boolean saveUser(User user) {\n\t\treturn userRepository.saveUser(user);\n\t}",
"public void save(User use) {\n jdbcTemplate.update(\"insert into user (id,name) values(?,?)\", use.getName());\n }",
"public Long saveUser(User user, User modifiedBy);",
"public int persistUser(User user) {\n\n\t\tEntityManager entityManager = factory.createEntityManager();\n\t\t// User user = new User(\"someuser2\",\"password2123\");\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(user);\n\t\tentityManager.getTransaction().commit();\n\t\tSystem.out.println(\"added user\");\n\n\t\treturn 0;\n\t}",
"public void insertUser() {}",
"private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }",
"public boolean saveUser(UserModel userModel) {\t\t\r\n\t\tUser user = this.toUser(userModel);\r\n\t\t/*if(userModel.getPassword() != null){\r\n\t\t\tuser.setPassword(bCryptPasswordEncoder.encode(userModel.getPassword()));\r\n\t\t}*/\r\n\t\tconfigDao.saveUser(user);\r\n\t\treturn true;\r\n\t}",
"@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }",
"public User save(User user) {\n user.setRegisterDate(new Date());\n user.setConfirmed(false);\n \n String sha1 = Hash.sha1(user.getPassword());\n user.setPassword(sha1);\n \n vp.basicValidate(user);\n \n User newUser = repository.save(user);\n \n postfixUser(newUser);\n \n return newUser;\n }",
"public String saveUser(User user) {\n id = user.getId();\n firstName = user.getFirstName();\n lastName = user.getLastName();\n phoneNumber = user.getPhoneNumber();\n email = user.getEmail();\n address = user.getAddress();\n idCity = user.getIdCity();\n currentUser = user;\n return \"operator\";\n }",
"public boolean saveUser(User user) {\n\t\treturn userDao.saveUser(user);\n\t}",
"public boolean saveUser(User user) {\n\t\tboolean f = false;\n\t\ttry {\n\t\t\t// user --> database query\n\n\t\t\tString query = \"insert into user(email, password, country_code, mobile,\"\n\t\t\t\t\t+ \"title, first_name, last_name, date_of_birth, gender, country)\" + \" values(?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tPreparedStatement pstmt = this.con.prepareStatement(query);\n\t\t\tpstmt.setString(1, user.getEmail());\n\t\t\tpstmt.setString(2, user.getPassword());\n\t\t\tpstmt.setString(3, user.getCountryCode());\n\t\t\tpstmt.setLong(4, user.getMobile());\n\t\t\tpstmt.setString(5, user.getTitle());\n\t\t\tpstmt.setString(6, user.getFname());\n\t\t\tpstmt.setString(7, user.getLname());\n\t\t\tpstmt.setString(8, user.getDateOfBirth());\n\t\t\tpstmt.setString(9, user.getGender());\n\t\t\tpstmt.setString(10, user.getCountry());\n\n\t\t\tpstmt.executeUpdate();\n\t\t\tf = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn f;\n\t}",
"@Override\r\n\tpublic int save(SpUser t) {\n\t\treturn 0;\r\n\t}",
"public UserEntity save(UserEntity userEntity);",
"@Override\n\tpublic User save(User user) {\n\t\treturn user;\n\t}",
"Boolean registerNewUser(User user);",
"public void registerUser(User newUser) {\r\n userRepo.save(newUser);\r\n }",
"@Transactional(readOnly=false)\r\n\tpublic void saveUser(User user) {\n\t\tthis.userDao.saveEntry(user);\r\n\t}",
"public void saveUserData(UserData userData){\n userDataRepository.save(userData);\n }",
"public int insertUser(final User user);",
"public void createUser(User user);",
"private void SaveUserToFirebase(FirebaseUser user)\n {\n\n }",
"public User save(User user) {\n\n mapper.save(user);\n\n return user;\n }",
"public static void SaveUser(StandardUserModel user, Context context) {\n\t\tfilename = userprofile;\n\t\tString modelJson = gson.toJson(user);\n\t\t\n\t\twriteuser(modelJson, context);\n\t}",
"public User saveUser(User user) {\n\t\t\n\t\tRSA rsaUser = encript.generateKeys();\n\t\t\n\t\tString nameEncript = encript.criptografa(user.getName(), rsaUser.getPublicKey()).toString();\n\t\t\n\t\tString emailEncript = encript.criptografa(user.getEmail(), rsaUser.getPublicKey()).toString();\n\t\t\n\t\tuser.setEmail(emailEncript);\n\t\tuser.setName(nameEncript);\n\t\t\n\t\tUser userSalvo = repository.save(user);\n\t\t\n\t\trsaUser.setIdUser(userSalvo.getId());\n\t\t\n\t\trsaRepository.save(rsaUser);\n\t\t\n\t\treturn userSalvo;\n\t}",
"public void insert(User user);",
"public static int save(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into t_user(user_name,nama_lengkap,password,hak_akses) values(?,?,?,?)\"); \n ps.setString(1,u.getUserName()); \n ps.setString(2,u.getNamaLengkap()); \n ps.setString(3,u.getPassword()); \n ps.setString(4,u.getHakAkses()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }",
"public String saveUser(User entity) {\n\t\treturn null;\r\n\t}",
"@Transactional\n\tpublic User save(User user) {\n\t\tuser.setPassword(passwordEncoder.encode(user.getPassword()));\n\t\tentityManager.persist(user);\n\t\treturn user;\n\t}",
"public void insertUser(User user) {\n mUserDAO.insertUser(user);\n }",
"public void saveUser(String name, String username, String password) {\n new User(name, username, password).saveUser(getCurrentUser().getIDNumber());\n }",
"public void storeUser(User user) {\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n datastore.put(userEntity);\n }",
"public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }",
"@Override\n\tpublic void save(UserEntity theUser) {\n\t\t\n\t\temploiDao.findById(theUser.getEmploi().getId()).ifPresent(emploi -> theUser.setEmploi(emploi));\n\t\tif(theUser.getEntite() != null){entityDao.findById(theUser.getEntite().getId()).ifPresent(entite -> theUser.setEntite(entite));}\n\t\t\n\t\tuserDao.save(theUser);\n\n\t}",
"private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}",
"@PostMapping(\"/saveUser\")\n\tpublic String saveUser(@ModelAttribute(\"user\") User user) {\n\t\tuserService.saveUser(user);\n\t\t\n\t\treturn \"redirect:/user/list\";\n\t}",
"public void saveNewUser(String username) {\r\n\r\n\t\ttry {\r\n\t Statement statement = connection.createStatement();\r\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t statement.executeUpdate(\"insert into users values(null, '\" + username + \"')\");\r\n\t\t}\r\n\t catch(SQLException e)\r\n\t {\r\n\t // if the error message is \"out of memory\", \r\n\t // it probably means no database file is found\r\n\t System.err.println(e.getMessage());\r\n\t \r\n\t }\r\n\r\n\t}",
"@Override\r\n public void usersave(User user) {\n if (user.getu_id() != null) {\r\n userMapper.userupdate(user);\r\n } else {\r\n userMapper.usersave(user);\r\n }\r\n }",
"@Override\r\n\tpublic void guardar(Usuario usuario) {\n\t\tString pw = usuario.getPassword();\r\n\t\tBCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder(4);\r\n\t\tusuario.setPassword(bCryptPasswordEncoder.encode(pw));\r\n\t\tiUsuario.save(usuario);\r\n\t}",
"public void createUser(User user) {\n\n\t}",
"private static void saveNewUserTest(Connection conn) {\n\n\t\tUser user1 = new User();\n\t\tuser1.setUsername(\"john\");\n\t\tuser1.setPassword(\"123\");\n\t\tuser1.setEmail(\"[email protected]\");\n\t\ttry {\n\t\t\tuser1.saveToDB(conn);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public Integer save(User user) {\n System.out.println(\" save user ()\");\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n Integer userID = null;\n try {\n tx = session.beginTransaction();\n userID = (Integer) session.save(user);\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return userID;\n }",
"@Override\n public boolean userRegister(User user) \n { \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO users (firstname,lastname,username,password,city,number) \"\n + \"values ('\"+ user.getFirstname()+\"',\" \n + \"'\" + user.getLastname() + \"',\" \n + \"'\" + user.getUsername() + \"',\" \n + \"'\" + user.getPassword() + \"',\" \n + \"'\" + user.getCity() + \"',\"\n + \"'\" + user.getNumber() + \"')\";\n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n }",
"public User saveUser(final User user) {\n return userRepository.save(user);\n }",
"public String saveUserRecord() {\n\t\tSystem.out.println(\"Calling saveUserRecord() Method To Save User Record\");\n\t\tuserDAO.addUser(user);\n\t\t\n\t\treturn \"index.xhtml?faces-redirect=true\";\n\t}",
"void registerUser(User newUser);",
"private void writeNewUser(String userId, String name, String email) {\n User user = new User(name, email);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Name\").setValue(name);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Email\").setValue(email);\n\n\n }",
"@Override\n @Transactional\n public ResponseEntity<?> saveUser(User user) {\n user.setPassword(new BCryptPasswordEncoder().encode(user.getPassword()));\n return new ResponseEntity<>(this.user.save(user), HttpStatus.CREATED);\n }",
"@Override\n\tpublic void createUser(User user) {\n\t\tSystem.out.println(\"INSIDE create user function\");\n\t\tem.persist(user);\n\t\t\t\n\t}",
"public boolean saveUser() {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\t\tTransaction txn = datastore.beginTransaction();\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\tList<Entity> list = pq.asList(FetchOptions.Builder.withDefaults());\n\t\tSystem.out.println(\"Size = \" + list.size());\n\t\t\n\t\ttry {\n\t\tEntity employee = new Entity(\"users\", list.size() + 2);\n\n\t\temployee.setProperty(\"name\", this.name);\n\t\temployee.setProperty(\"email\", this.email);\n\t\temployee.setProperty(\"password\", this.password);\n\t\t\n\t\tdatastore.put(employee);\n\t\ttxn.commit();\n\t\treturn true;\n\t\t}catch(Exception e)\n\t\t{\n\t\t\treturn false;\t\t\n\t\t}\n\t\t\n\t\tfinally{\t\t\t\n\t\t\t if (txn.isActive()) {\n\t\t txn.rollback();\n\t\t }\n\t\t\t\n\t\t}\n\t\t\n\n\t}",
"public User saveUser(User user) {\n\t\treturn userRepository.save(user);\n\t}",
"@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}",
"public void postUser(User u) throws DBException\n {\n String sqlString = \"INSERT INTO user (username, password, email, firstName, \" +\n \"lastName, gender, person_id) VALUES(?,?,?,?,?,?,?)\";\n\n try(PreparedStatement sqlStatement = conn.prepareStatement(sqlString))\n {\n sqlStatement.setString(1, u.getUserName());\n sqlStatement.setString(2, u.getPassword());\n sqlStatement.setString(3, u.getEmail());\n sqlStatement.setString(4, u.getFirstName());\n sqlStatement.setString(5, u.getLastName());\n sqlStatement.setString(6, u.getGender());\n sqlStatement.setString(7, u.getPersonID());\n\n sqlStatement.executeUpdate();\n }\n catch(SQLException ex)\n {\n throw new DBException(\"Unable to insert User\");\n }\n }",
"private void saveUserInPreferences(String userName, String password, User user) {\n mUserManager.setUsername(userName);\n mUserManager.setPassword(password);\n mUserManager.saveUser(user);\n }",
"public void save(User user) {\n user.setPassword(user.getPassword());\n user.setRoles((Set<SecurityRole>)roleRepository.findAll());\n userRepository.save(user);\n }",
"@Override\n\tpublic int save(Users t) {\n\t\treturn usersDAO.save(t);\n\t}",
"private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }",
"public User save (User user) {\n\t\tif(user.getId() == null) {\n\t\t\tuser.setId(++userCount);\n\t\t}\n\t\t users.add(user);\n\t\t return user;\n\t}",
"@Transactional\n\tpublic User save(User user) {\n\t\treturn userRepository.save(user);\n\t}"
] | [
"0.8371134",
"0.82545733",
"0.8137273",
"0.8122306",
"0.80577874",
"0.8013841",
"0.7973027",
"0.790793",
"0.7856885",
"0.7834047",
"0.7791332",
"0.7790805",
"0.7775419",
"0.7688465",
"0.76876205",
"0.7663023",
"0.7650871",
"0.761281",
"0.75703204",
"0.7563522",
"0.75369066",
"0.7533032",
"0.75054973",
"0.7449938",
"0.7445089",
"0.74323225",
"0.74254036",
"0.74097484",
"0.7405707",
"0.7403982",
"0.73953795",
"0.7363921",
"0.7357499",
"0.7352388",
"0.73398364",
"0.732607",
"0.72999007",
"0.7283494",
"0.72661394",
"0.72559124",
"0.72420275",
"0.7241371",
"0.7196623",
"0.71925944",
"0.7189286",
"0.71749896",
"0.7160342",
"0.71600986",
"0.71137184",
"0.7105567",
"0.7087107",
"0.7076461",
"0.7051703",
"0.704413",
"0.70234454",
"0.7019081",
"0.7011446",
"0.7009782",
"0.70036405",
"0.6988306",
"0.698798",
"0.69863105",
"0.69827586",
"0.6976836",
"0.6976088",
"0.69559723",
"0.69508946",
"0.6948546",
"0.694849",
"0.6944084",
"0.6942292",
"0.69324726",
"0.69247997",
"0.6923978",
"0.69220215",
"0.6911861",
"0.69117206",
"0.6893866",
"0.6887842",
"0.68814754",
"0.68766403",
"0.6875539",
"0.68680495",
"0.68672854",
"0.6867074",
"0.6861249",
"0.6859348",
"0.68590796",
"0.68534636",
"0.68330306",
"0.6831791",
"0.68275124",
"0.6825522",
"0.6818468",
"0.68096334",
"0.6809403",
"0.68063855",
"0.67904806",
"0.6788061",
"0.67855144"
] | 0.71991885 | 42 |
find all users in the database | public List<User> findAll() {
return userRepository.findAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}",
"public Users findAll() {\n\tthis.createConnection();\n try {\n Connection con = this.getCon();\n PreparedStatement stmnt = con.prepareStatement(this.getAllQuery());\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQL Exception\" + e.getErrorCode() + e.getMessage());\n e.getStackTrace();\n return new Users();\n }\n }",
"public static List<User> all() \n {\n return find.all();\n }",
"@Override\n public List<User> findAll() {\n try {\n return runner.query(con.getThreadConnection(),\"select * from user\",new BeanListHandler<User>(User.class));\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public List<User> findAll() \n\t{\n\t\tString sql = \"SELECT * FROM VIDEOGAMESTORE.USERS\";\n\t\t\n\t\t// Instantiate a new list of Users.\n\t\tList<User> userList = new ArrayList<User>();\n\t\t\n\t\ttry {\n\t\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(sql);\n\t\t\twhile(srs.next())\n\t\t\t{\n\t\t\t\t// Add a new User to the list for every row that is returned\n\t\t\t\tuserList.add(new User(srs.getString(\"USERNAME\"), srs.getString(\"PASSWORD\"), srs.getString(\"EMAIL\"),\n\t\t\t\t\t\tsrs.getString(\"FIRST_NAME\"), srs.getString(\"LAST_NAME\"), srs.getInt(\"GENDER\"), srs.getInt(\"USER_PRIVILEGE\"), srs.getInt(\"ID\")));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn userList;\n\t}",
"@Override\n\tpublic ArrayList<User> findAll() {\n\t\t\n\t\treturn userDao.querydAll();\n\t}",
"public List getAllUsers();",
"@Override\n public List<User> selectAllUsers() {\n\n List<User> userList = new ArrayList<>();\n\n try (Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {\n\n String sql = \"SELECT * FROM ers_users\";\n\n PreparedStatement ps = connection.prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n userList.add(\n new User(\n rs.getInt(1)\n , rs.getString(2)\n , rs.getString(3)\n , rs.getString(4)\n , rs.getString(5)\n , rs.getString(6)\n , rs.getInt(7)\n )\n );\n }\n }\n\n catch (SQLException e) {\n\n e.printStackTrace();\n }\n\n return userList;\n }",
"@Override\r\n\tpublic List<User> findAllUsers() {\n\t\treturn userDAO.findAllUsers();\r\n\t}",
"Iterable<User> getAllUsers();",
"public void getAllUsers() {\n\t\t\n\t}",
"@Override\n public List<User> findAll() throws DaoException {\n log.info(\"Get all users\");\n return userDao.findAll();\n }",
"@Override\n\tpublic List<User> getAllUsers() {\n\t\tlog.info(\"get all users!\");\n\t\treturn userRepository.findAll();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"public List<User> getAllUsers();",
"public ArrayList findAll() {\n String query = \"SELECT * FROM SilentAuction.Users\";\n ArrayList aUserCollection = selectUsersFromDB(query);\n return aUserCollection;\n }",
"public List<User> getAllUsers() {\n\t\tTypedQuery<User> query = em.createNamedQuery(\"User.findAll\", User.class);\n\n\t\tList<User> result = query.getResultList();\n\t\tlog(\"got all users, result size: \" + result.size());\n\t\treturn result;\n\t}",
"public static List<UserDB> getAllUsers() {\n\n\t\tUserDB newUser = new UserDB();\n\n\t\treturn newUser.getAllUsers();\n\t}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"public ResultSet fetchSelectAllUsers() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_USERS_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}",
"public static ArrayList<User> findAllUsers() {\n\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findAllUsers = \"SELECT * FROM public.member where type = 0\";\n PreparedStatement stmt = DBConnection.prepare(findAllUsers);\n ArrayList<User> userList = new ArrayList<User>();\n\n try {\n ResultSet rs = stmt.executeQuery();\n\n while(rs.next()) {\n User user = load(rs);\n\n targetUser = userIdentityMap.get(user.getId());\n if (targetUser == null) {\n userList.add(user);\n userIdentityMap.put(user.getId(), user);\n } else {\n userList.add(targetUser);\n }\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n return userList;\n }",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }",
"public void findUsers() throws SQLException {\r\n\t\t// Query to get all users and ids.\r\n\t\t\r\n\t\t// Clear existing list\r\n\t\tusersList.clear();\r\n\t\tuseridsList.clear();\r\n\t\t\r\n\t\t Statement statement = connection.createStatement();\r\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t ResultSet rs = statement.executeQuery(\"select * from users\");\r\n\t while(rs.next())\r\n\t {\r\n\t // read the result set\r\n\t\t\t usersList.add(rs.getString(\"name\"));\r\n\t\t\t useridsList.add(rs.getInt(\"id\"));\r\n\t }\r\n\t\t// For loop to add each result to list.\r\n\r\n\t}",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}",
"List<User> getAllUsers();",
"List<User> getAllUsers();",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAll() {\n\t\treturn this.userMapper.findAll();\n\t}",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\tList<User> users = null;\n\t\ttry {\n\t\t\tusers = client.queryForList(\"selectAllUser\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn users;\n\n\t}",
"@Override\r\n\tpublic List findAll() {\n\t\treturn usermaindao.findAll();\r\n\t}",
"List<User> getAll() throws SQLException;",
"public List<User> findAll() {\n return store.findAll();\n }",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\r\n\tpublic List<Users> findAll() {\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Users\").list();\r\n\t}",
"public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}",
"public ArrayList<String> findallusers() {\n\t\tArrayList<String> answer = new ArrayList<String>();\n\t\ttry {\n\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT * FROM users \");\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile(rs.next()) {\n\t\t\t\tanswer.add(rs.getString(1));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\treturn answer;\n\t}",
"@Override\r\n public Collection getAllUsers() throws SQLException {\r\n Session session = null;\r\n List users = new ArrayList<Users>();\r\n try {\r\n session = HibernateSessionFactory.getSessionFactory().openSession();\r\n users = session.createCriteria(Users.class).list();\r\n } catch (Exception ex) {\r\n log.error(\"Error in getAllUsers\", ex);\r\n } finally {\r\n if (session != null && session.isOpen())\r\n session.close();\r\n }\r\n return (Collection) users;\r\n }",
"@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"List<User> findAll() throws UserDaoException;",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public void selectAllUser() {\n String sql = \"SELECT id, user, publickey, password, salt FROM users\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // loop through the result set\n while (rs.next()) {\n System.out.println(rs.getInt(\"id\") + \"\\t\" + rs.getString(\"user\") + \"\\t\" + rs.getDouble(\"publickey\")\n + \"\\t\" + rs.getString(\"password\") + \"\\t\" + rs.getString(\"salt\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"public List<User> retrieveAllUsers() {\n\t\treturn (List<User>) userRepository.findAll();\n\t}",
"@Override\n\tpublic List<Login> findAllUsers() {\n\t\treturn userRepo.findAll();\n\t}",
"@Override\n\tpublic List<User> findAll() {\n\t\treturn userRepository.findAll();\n\t}",
"@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}",
"public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}",
"public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"List<User> findAll();",
"List<User> findAll();",
"List<User> findAll();",
"List<User> findAll();",
"@Override\n\tpublic ArrayList<User> searchUsers() {\n\t\treturn userDao.searchUsers();\n\t}",
"public List<User> findAll();",
"public List<User> findAll();",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"public List<Users> getAllUsers() {\r\n\t\t// return usDao.findAll();\r\n\t\treturn usDao.getAllUsers();\r\n\t}",
"public List<User> getAllUsers() {\n List<User> users = null;\n Session session = null;\n try {\n session = openSession();\n users = session.createCriteria(User.class).list();\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return users;\n }",
"public static List<User> findAll()\n {\n return null;\n }",
"public Collection findAllUsers() throws FinderException;",
"public Set<User> getAll() throws DaoException {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n Set<User> users = new HashSet<User>();\n try {\n connection = dataSourceUtils.getConnection(dataSource);\n preparedStatement = connection.prepareStatement(GET_ALL);\n ResultSet resultSet = preparedStatement.executeQuery();\n\n while (resultSet.next()) {\n User user = new User();\n parseResultSet(resultSet, user);\n users.add(user);\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n DataSourceUtils.releaseConnection(connection, dataSource);\n try {\n preparedStatement.close();\n } catch (SQLException e) {\n LOGGER.error(e);\n }\n }\n return users;\n }",
"List<QnowUser> findAll();",
"public List<User> listAll() throws Exception;",
"@Override\n\tpublic List<User> getAll() {\n\t\treturn userDao.getAll();\n\t}",
"@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }",
"@Override\r\n\tpublic List<Map<String, Object>> findAllUser() {\n\t\treturn userMapper.findAllUser();\r\n\t}",
"public List<User> findUsers() {\n\t\treturn userRepository.findUsers();\n\t}",
"@Override\n\tpublic Iterable<com.example.demo.model.User> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}",
"public List<User> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"List<User> fetchAllUSers();",
"@Override\r\n\tpublic List<User> findAll() throws Exception {\n\t\tList<User> list=userMapper.findAll();\r\n\t\tif(null!=list){\r\n\t\t\treturn list;\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"信息表为空\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public List<User> getAllUsers() {\n\t\tEntityManager entityManager = HandleConnectionToDB.getEntityManager();\n\t\tentityManager.getTransaction().begin();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<User> users = entityManager.createQuery(\"from User\").getResultList();\n\t\tif (users.size() > 0) {\n\t\t\tusers.get(0).getFriendList().size();\n\t\t\tusers.get(0).getUserLobby().size();\n\t\t\tusers.get(0).getFriendList().size();\n\t\t}\n\t\tentityManager.getTransaction().commit();\n\n\t\tHandleConnectionToDB.closeEntityManager();\n\t\treturn users;\n\n\t}",
"@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}",
"@Override\n\tpublic List<User> findAllUsers() {\n\t\treturn userRepo.findAll();\n\t}",
"public List<User> getAll() {\n\t\treturn service.getAll();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n\tpublic List<UserEntity> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"public Collection<User> getAll() throws DataPersistenceException\n {\n PersistenceManagerFactory pmfInstance = PMFHolder.get();\n PersistenceManager pm = pmfInstance.getPersistenceManager();\n try\n {\n List<User> users = new ArrayList<User>();\n\n Extent<User> extent = pm.getExtent(User.class, true);\n for (User user : extent)\n users.add(user);\n extent.closeAll();\n\n return users;\n }\n catch (Throwable e)\n {\n throw new DataPersistenceException(e.getLocalizedMessage(), e);\n }\n finally\n {\n pm.close();\n }\n }",
"public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}",
"public static ArrayList<User> selectUsers() {\n \n ArrayList<User> users = new ArrayList<>();\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n String query = \"SELECT * FROM users \";\n \n try {\n ps = connection.prepareStatement(query);\n rs = ps.executeQuery();\n ResultSetMetaData mD = rs.getMetaData();\n int colCount = mD.getColumnCount();\n User user = null;\n \n for (int i = 0; i < colCount; i++) {\n if (rs.next()) {\n user = new User();\n user.setUserID(rs.getInt(\"userID\"));\n user.setFirstName(rs.getString(\"firstName\"));\n user.setLastName(rs.getString(\"lastName\"));\n user.setEmail(rs.getString(\"email\"));\n user.setAddr1(rs.getString(\"addr1\"));\n user.setAddr2(rs.getString(\"addr2\"));\n user.setCity(rs.getString(\"city\"));\n user.setStateRegion(rs.getString(\"state\"));\n user.setZipcode(rs.getInt(\"zip\"));\n user.setCountry(rs.getString(\"country\"));\n user.setRoleName(rs.getString(\"roleName\"));\n System.out.println(user.getFirstName());\n users.add(user);\n }\n }\n return users;\n } catch (SQLException e) {\n System.out.println(e);\n return null;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"public List<User> getAllUsers() {\n\n\t\tList<User> result = new ArrayList<User>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllUsers);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tString query = \"SELECT IdGlobal, TCELLIP, PUBLICKEY, TCELLPORT from USER\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint UserGID =rs.getInt(1);\n\t\t\t\tString TCellIP = rs.getString(2);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPubKeyBlob = rs.getBlob(3);\n\t\t\t\tbyte[] bPubKey = myPubKeyBlob.getBytes(1, (int) myPubKeyBlob.length());\n\t\t\t\tString pubKey = new String(bPubKey);\n\t\t\t\t\n\t\t\t\tint port = rs.getInt(4);\n\t\t\t\tUser user = new User(UserGID,TCellIP, port, pubKey);\n\t\t\t\tresult.add(user);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\n\t}",
"@Override\n\tpublic List<User> getUsers() {\n\t\treturn mongoTemplate.findAll(User.class);\n\t}",
"public List<Person> findAllUsers(){\n\t\t\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p \");\n\t\tList<Person> users = q.getResultList();\n\t\treturn users;\n\t}",
"@Override\n\tpublic Iterable<User> getAllUser() {\n\t\treturn userRepository.findAll();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> findAllUsers() {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.addOrder(Order.asc(\"firstname\")).setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);\r\n\t\tList<User> users = (List<User>)crit.list();\r\n\t\treturn users;\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public UserRow[] getAllUsers() throws AdminPersistenceException {\n return (UserRow[]) getRows(SELECT_ALL_USERS).toArray(new UserRow[0]);\n }",
"@Override\n\tpublic List<User> findAllUser() throws Exception {\n\t\treturn this.userDao.findAllUser();\n\t}",
"public List<User> fetchAll()\n {\n String query = \"SELECT * FROM user\";\n RowMapper<User> userRowMapper = new BeanPropertyRowMapper<>(User.class); // a collection type that holds the results of the query\n List<User> userList; // list of users that will be returned\n try\n {\n userList = template.query(query, userRowMapper); // call the database and assign the results to the userList\n } catch (EmptyResultDataAccessException e)\n {\n userList = new ArrayList<>(); // return an empty arrayList\n }\n return userList;\n }",
"@GetMapping(path = \"/all\")\n public @ResponseBody\n Iterable<User> getAllUsers() {\n LOG.info(\"Displays all the users from the database\");\n return userRepository.findAll();\n }",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"List<User> selectAll();",
"List<User> selectAll();"
] | [
"0.8064507",
"0.8062169",
"0.8001574",
"0.79771394",
"0.79435796",
"0.7919645",
"0.791317",
"0.78462905",
"0.78246725",
"0.7790758",
"0.77763385",
"0.7751547",
"0.77280825",
"0.77122694",
"0.7699921",
"0.7690665",
"0.7680586",
"0.7663504",
"0.7655758",
"0.7651756",
"0.76496315",
"0.76457626",
"0.76420486",
"0.7636702",
"0.76334685",
"0.7626037",
"0.7624",
"0.7624",
"0.7620608",
"0.7619416",
"0.76140904",
"0.7604556",
"0.7601725",
"0.7587451",
"0.7582665",
"0.7578128",
"0.75768965",
"0.756664",
"0.7559615",
"0.7558899",
"0.75582045",
"0.7555845",
"0.7553211",
"0.7545008",
"0.7542894",
"0.7532319",
"0.7531451",
"0.7527925",
"0.7524139",
"0.75139993",
"0.75104296",
"0.75096387",
"0.75096387",
"0.75096387",
"0.75096387",
"0.7484321",
"0.74818707",
"0.74818707",
"0.74698853",
"0.74695593",
"0.74608064",
"0.7445566",
"0.7436551",
"0.7432714",
"0.74323183",
"0.743213",
"0.7427498",
"0.7416912",
"0.7416217",
"0.740491",
"0.73994917",
"0.73982114",
"0.739698",
"0.73951805",
"0.7379568",
"0.7354957",
"0.73486555",
"0.7344114",
"0.7343848",
"0.7337831",
"0.73348767",
"0.7330634",
"0.73276967",
"0.7318701",
"0.73178667",
"0.73160917",
"0.73132485",
"0.73120916",
"0.73104256",
"0.73087347",
"0.7305793",
"0.7301415",
"0.72950673",
"0.72921455",
"0.7290719",
"0.7290387",
"0.72877145",
"0.72853625",
"0.7284999",
"0.7284999"
] | 0.753845 | 45 |
find an user by his email | public User findByEmail(String email){
return userRepository.findByEmail(email);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"User getUserByEmail(final String email);",
"User getUserByEmail(String email);",
"public User findUserByEmail(final String email);",
"User find(String email);",
"User findUserByEmail(String email) throws Exception;",
"public User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"User findUserByEmail(String userEmail);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n public OpenScienceFrameworkUser findOneUserByEmail(final String email) {\n final OpenScienceFrameworkUser user = findOneUserByUsername(email);\n if (user != null) {\n return user;\n }\n\n // check emails\n try {\n // JPA Hibernate does not support postgres query array operations, use postgres native queries\n // `query.setParameter()` does not work, use string concatenation instead\n final Query query= entityManager.createNativeQuery(\n \"select u.* from osf_osfuser u where u.emails @> '{\" + email + \"}'\\\\:\\\\:varchar[]\",\n OpenScienceFrameworkUser.class\n );\n return (OpenScienceFrameworkUser) query.getSingleResult();\n } catch (final PersistenceException e) {\n LOGGER.error(e.toString());\n return null;\n }\n }",
"public static User findUserByEmail(String email) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByEmail = \"SELECT * FROM public.member \"\n + \"WHERE email = '\" + email + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByEmail);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"public Users findBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n Users registeredUser = (Users) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"public User retrieveUserByEmail(String email) throws ApplicationException;",
"public User getUser(String emailId);",
"@Override\n\tpublic ERSUser getUserByEmail(String email) {\n\t\treturn userDao.selectUserByEmail(email);\n\t}",
"public User getUser(String email) {\n for (User user : list) {\n if (user.getEmail().equals(email))\n return user; // user found. Return this user.\n }\n return null; // user not found. Return null.\n }",
"public User getUser(String email);",
"@Override\n public User getUserByEmail(final String email){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where email = :email\");\n query.setParameter(\"email\", email);\n return (User) query.uniqueResult();\n }",
"public User getUser(String email) {\r\n\t\tOptional<User> optionalUser = null;\r\n\t\tUser user = null;\r\n\t\ttry {\r\n\t\t\toptionalUser = userList().stream().filter(u -> u.getUserEmail().equals(email)).findFirst();\r\n\t\t\tif (optionalUser.isPresent()) {\r\n\t\t\t\tuser = optionalUser.get();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error find user : \" + email + \" \" + e);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"UserEntity findByEmail(String email);",
"@Override\n\tpublic Users findUserByEmail(String email) {\n\t\treturn iUserDao.findUserByEmail(email);\n\t}",
"public User readByEmail(String email) throws DaoException;",
"@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"[email protected]\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }",
"public User get(String emailID);",
"public AppUser findByEmail(String email);",
"public User getUserByEmail(final String email) {\n return em.find(User.class, email.toLowerCase());\n }",
"ServiceUserEntity getUserByEmail(String email);",
"@Override\n\tpublic User getUser(String email){\n\t\tif (userExists(email) == true)\n\t\t\treturn users[searchIndex(email)];\n\t\telse\n\t\t\treturn null;\n\t}",
"@Override\n\tpublic User findByEmail(String email)\n\t{\n\t\tif (email == null) return null;\n\t\n\t\tString property = User.PROP_EMAIL;\n\t\tLabel label = RoostNodeType.USER;\n\t\tUser user = findByUniqueProperty(label, property, email);\n\t\t\n\t\treturn user;\n\t}",
"public static Utente findByEmail(String email) {\n \t\n\t\tSession session = DatabaseManager.getSession();\n Transaction tx = null;\n Utente user = null;\n \n \n try {\n tx = session.getTransaction();\n tx.begin();\n \n CriteriaBuilder builder = session.getCriteriaBuilder();\n CriteriaQuery<Utente> criteria = builder.createQuery(Utente.class);\n Root<Utente> root = criteria.from(Utente.class);\n \n criteria.select(root).where(builder.equal(root.get(Utente_.email), email));\n\n user = session.createQuery(criteria).getSingleResult();\n \n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n \n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return user;\n \n \n }",
"public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }",
"@Override\n public User getByEmail(String email) {\n List<JdbcUser> jdbcUserList = jdbcTemplate.query(\"SELECT * FROM users WHERE email=?\", ROW_MAPPER, email);\n JdbcUser jdbcUser = DataAccessUtils.singleResult(jdbcUserList);\n if (jdbcUser == null) {\n return null;\n }\n return convertToUser(jdbcUser);\n }",
"public User getUserByEmail(String email)throws EntityNotFoundException\n\t{\n\t\treturn userDao.getById(email);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic User getUserByEmail(String email, User user) {\n\t\tSession session = sessionFactory.openSession();\n\t\tList<User> userList = new ArrayList<>();\n\t\tuserList = (List<User>) session.createQuery(\"from User\");\n\t\tfor (User tempUser : userList) {\n\t\t\tif (tempUser.getEmail().equalsIgnoreCase(email)) {\n\t\t\t\tuser = tempUser;\n\t\t\t\tSystem.out.println(\"get uswer by email: \" + user);\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\treturn user;\n\t}",
"User findOneByMail(String mail);",
"Optional<User> findByEmail(String email);",
"Optional<User> findByEmail(String email);",
"public User getUser(String email) {\n\t\tLog.i(TAG, \"return a specific user with email.\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getcurrentUser = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(getcurrentUser, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return null;\n\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\treturn user;\n\t}",
"UserDTO findUserByEmail(String email);",
"@Override\n public final CustomerUser getCustomerUserByEmail(final String email) {\n\treturn (CustomerUser) getEntityManager()\t\n\t\t.createQuery(\"select customer from \"\n\t\t\t+ CustomerUser.class.getName()\n\t\t\t+ \" as customer where customer.email =:email\")\n\t\t.setParameter(\"email\", email)\n\t\t.getSingleResult();\n }",
"Optional<JUser> readByEmail(String email);",
"public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}",
"@Override\n\tpublic User getUser(String email) {\n\t\treturn userDatabase.get(email);\n\t}",
"@Override\n\tpublic UserVO searchEmail(String email) throws Exception {\n\t\treturn dao.searchEmail(email);\n\t}",
"@Override\r\n\tpublic User getByMail(String eMail) {\n\r\n\t\treturn userDao.get(eMail);\r\n\t}",
"public VendorUser findVuserBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n VendorUser registeredUser = (VendorUser) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"public User getUserByEmail(String email) {\r\n\t\treturn usersPersistence.getUserByEmail(email);\r\n\t}",
"public User getUser(String email) {\n\n Query query = new Query(\"User\").setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if (userEntity == null) {\n return null;\n }\n\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n User user = new User(email, aboutMe);\n\n return user;\n }",
"public synchronized User getUser(String email) {\r\n return (email == null) ? null : email2user.get(email);\r\n }",
"private User getUserFromUsersBy(String email, String password){\n \tUser user=null;\n \tfor(User u : users ){\n \t\tif(u.getEmail().equals(email)&&u.getPassword().equals(password)){\n \t\t\tuser = u;\n \t\t}\n \t}\n \treturn user;\n }",
"public User getUserByEmail(String email){\n\t\tif(email == null)\n\t\t\treturn null;\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession session = sf.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry{\n\t\t\tCriteria criteria = session.createCriteria(User.class);\n\t\t\tObject obj = criteria.add(Restrictions.eq(\"email\", email)).uniqueResult();\n\t\t\tif(obj == null)\n\t\t\t\treturn null;\n\t\t\tUser user = (User)obj;\n\t\t\ttx.commit();\n\t\t\treturn user;\t\t\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"public UsersModel getUserById(String userEmail);",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"public static User getUser(String email){\n Connection connect = null;\n ResultSet set = null;\n String getUserSQL = \"SELECT * FROM users WHERE email =?\";\n User user = null;\n\n // Get User Details Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare SQL Statement:\n PreparedStatement statement = connect.prepareStatement(getUserSQL);\n // Set Attributes / Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Results:\n while (set.next()){\n user = new User();\n // Set User Details / Information\n user.setFirst_name(set.getString(\"first_name\"));\n user.setLast_name(set.getString(\"last_name\"));\n user.setEmail(set.getString(\"email\"));\n user.setUser_type(set.getString(\"user_type\"));\n user.setCreated_at(set.getDate(\"created_at\"));\n }\n // End Of Check For Results:.\n }catch (Exception e){\n e.printStackTrace();\n }\n return user;\n }",
"public User existsProfile(String email) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n SuperBooleanBuilder query = new SuperBooleanBuilder();\n query.put(\"email\", email);\n Search search = new Search.Builder(query.toString())\n .addIndex(INDEX_NAME)\n .addType(User.class.toString())\n .build();\n\n User result = null;\n try {\n result = client.execute(search).getSourceAsObject(User.class);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return result;\n }",
"public User findEmail(String email){\n\t\t\n boolean found = false;\t\t\t\t\t\t\t\t\t\t/* ====> Boolean controls while loop */\n User correct = new User();\t\t\t\t\t\t\t\t\t/* ====> Create instance of the correct user*/\n User marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n marker = this.head;\t\t\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n \n // Loop keeps on going until the correct User is not found or until the next User is null\n while(!found){ \n \tif (marker.getEmail().equals(email)){\t\t\t\t\t/* ====> If the marker found the right user based on its email */ \n \t\tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \t\tcorrect = marker;\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the same User as marker */\n \t}\n \n else if (marker.getNext() == null){\t\t\t\t\t\t/* ====> If the marker reaches end of the list */ \n \tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \tcorrect = head;\t\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the head */\n }\n \n else {\n \tmarker = marker.getNext();\t\t\t\t\t\t\t/* ====> Move marker to the next element of the list */\n }\n }\n \n return correct;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return correct User */ \n \n\t}",
"public User getUserFromEmail(final String email) {\n LOG.info(\"Getting user with email {}\", email);\n return userRepo.getUserByEmail(email);\n }",
"public User getUserFromDetails(String email, String username) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"email\", email);\r\n query.append(\"username\", username);\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"public static User getUserByEmail(String email) {\n\t\t// getting user by email\n\t\treturn dao.getUserByEmail(email);\n\t}",
"public Utente retriveByEmail(String email) {\n\t\t\n\t\tTypedQuery<Utente> query = em.createNamedQuery(Utente.FIND_BY_Email, Utente.class);\n query.setParameter(\"email\", email); //parameters by name \n return query.getSingleResult();\n\t}",
"public UserTO getByEmail(String email) {\n\t\treturn getDao().getByEmail(email);\n\t}",
"public String findEmail(String email) {\n\t\tString sql=\"select email from SCOTT.USERS where USERNAME='\"+email+\"'\";\n\t\t\n\t\t Dbobj dj=new Dbobj();\n\t\t JdbcUtils jdbcu=new JdbcUtils();\n\t\t dj=jdbcu.executeQuery(sql);\n\t\t ResultSet rs=dj.getRs(); \n\t\t System.out.println(\"\"+sql);\t\n\t\t String t=\"\";\n\t\t try {\n\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tt=rs.getString(1);\n\t\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t \n\t\t\n\t\treturn t;\n\t\t\n\t}",
"java.lang.String getUserEmail();",
"public boolean findEmail(String email);",
"Optional<User> findOneByEmail(String email);",
"public User getUserByEmail(String email) throws SQLException {\n\t\ttry {\n\n\t\t\tthis.TryConnect();\n\n\t\t\tthis.m_objData.SetStoreName(\"sys_user_getByEmail(?)\");\n\t\t\tthis.m_objData.Parameters.setString(1, email);\n\n\t\t\tResultSetMapper util = new ResultSetMapper<User>();\n\n\t\t\tResultSet lstResult = this.m_objData.ExecToResultSet();\n\n\t\t\tList<User> lstUser = util.mapRersultSetToObject(lstResult,\n\t\t\t\t\tUser.class);\n\n\t\t\tif (lstUser == null)\n\t\t\t\treturn null;\n\n\t\t\tif (lstUser.size() > 0)\n\t\t\t\treturn lstUser.get(0);\n\t\t\treturn null;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tthis.TryDisconnect();\n\t\t}\n\n\t\treturn null;\n\t}",
"public User getUser(String email) {\n\t\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t\t\n\t\t\tCursor cursor = db.query(TABLE_USERS, new String[] { KEY_USER_ID, \n\t\t\t\t\tKEY_PASSWORD, KEY_EMAIL }, KEY_EMAIL + \" = ?\",\n\t\t\t\t\tnew String[] { String.valueOf(email) }, null, null, null, null);\n\t\t\tif (cursor != null)\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\n\t\t\tUser user = new User(\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_PASSWORD)),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_EMAIL)),\n\t\t\t\t\tInteger.parseInt(cursor.getString(0)) );\n\t\t\t// return user\n\t\t\treturn user;\n\t\t\t}",
"public User findByEmail(String email) {\n\t\treturn repo.findByEmail(email);\r\n\t}",
"@Transactional\r\n\tpublic User getUserByEmail(String email) {\n\t\treturn cuser.getUserByEmail(email);\r\n\t}",
"public User findByEmail(String email) {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.add(Restrictions.eq(\"email\", email));\r\n\t\tUser user = (User) crit.uniqueResult();\r\n\t\tif(user != null) {\r\n\t\t\tHibernate.initialize(user.getUserProfiles());\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"public User getUserByEmail(String email, String apikey) throws UserNotFoundException, APIKeyNotFoundException{\n if (authenticateApiKey(apikey)){\n return userMapper.getUserByEmail(email);\n }else throw new UserNotFoundException(\"User not found\");\n }",
"@Nullable\n public User getUserFromDatabase(String email) {\n User userAccount = null;\n try {\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor userAccountCursor = db.query(\n TABLE_USERS,\n new String[]{KEY_USER_NAME, KEY_USER_EMAIL, KEY_USER_PASS, KEY_USER_PROFILE_PICTURE_URL, KEY_USER_HAS_POST_TABLE},\n KEY_USER_EMAIL + \" = ?\",\n new String[]{email},\n null,\n null,\n null\n );\n\n if (userAccountCursor != null && userAccountCursor.getCount() > 0 && userAccountCursor.moveToFirst()) {\n userAccount = new User(\n userAccountCursor.getString(0),\n userAccountCursor.getString(1),\n userAccountCursor.getString(2),\n userAccountCursor.getInt(3),\n userAccountCursor.getInt(4)\n );\n }\n\n if (userAccountCursor != null) {\n userAccountCursor.close();\n }\n\n } catch (SQLiteException e) {\n Log.d(TAG, \"Can get user account\");\n }\n\n return userAccount;\n }",
"@Query(\"select u from User u where u.email = :email\")\n User getUserByEmail(@Param(\"email\") String email);",
"public String searchEmail(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username, email from \" + TABLE_NAME;\n Cursor cursor = db.rawQuery(query,null);\n\n String uname, email;\n email = \"not found\";\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if (uname.equals(username)) {\n email = cursor.getString(1);\n break;\n }\n } while (cursor.moveToNext());\n }\n return email;\n }",
"@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);",
"public UserDTO findByEmail(String email) throws ApplicationException {\n\n\t\tlog.debug(\"Model findByLogin Started\");\n\t\tConnection conn = null;\n\t\tUserDTO dto = null;\n\n\t\tStringBuffer sql = new StringBuffer(\"Select * from st_user where email=?\");\n\n\t\ttry {\n\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sql.toString());\n\t\t\tstmt.setString(1, email);\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tdto = new UserDTO();\n\t\t\t\tdto.setId(rs.getLong(1));\n\t\t\t\tdto.setFirstName(rs.getString(2));\n\t\t\t\tdto.setLastName(rs.getString(3));\n\t\t\t\tdto.setEmail(rs.getString(4));\n\t\t\t\tdto.setPassword(rs.getString(5));\n\t\t\t\tdto.setDob(rs.getDate(6));\n\t\t\t\tdto.setMobileNo(rs.getString(7));\n\t\t\t\tdto.setRoleId(rs.getLong(8));\n\t\t\t\tdto.setGender(rs.getString(9));\n\t\t\t\tdto.setCreatedBy(rs.getString(10));\n\t\t\t\tdto.setModifiedBy(rs.getString(11));\n\t\t\t\tdto.setCreatedDatetime(rs.getTimestamp(12));\n\t\t\t\tdto.setModifiedDatetime(rs.getTimestamp(13));\n\n\t\t\t}\n\t\t\trs.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.error(\"Database Exception\", e);\n\t\t\tthrow new ApplicationException(\"Exception:Exception in getting User by login\");\n\n\t\t} finally {\n\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t}\n\t\tlog.debug(\"Model findByLogin End\");\n\t\treturn dto;\n\t}",
"public User getUserByEmail(String email) throws Exception {\n\t\tSession session = null;\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\tsession = getSessionFactory().openSession();\n\t\t\tif(session != null) {\n\t\t\t\ttx = session.beginTransaction();\n\t\t\t\tQuery query = session.createQuery(\"FROM User u where u.email =:email\");\n\t\t\t\tquery.setParameter(\"email\", email);\n\t\t\t\tList list = query.list();\n\t\t\t\tif(list != null && list.size() >0) {\n\t\t\t\t\treturn (User)list.get(0);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t} finally{\n\t\t\tif(tx != null) {\n\t\t\t\ttx.commit();\n\t\t\t}\n\t\t\tif(session != null) {\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}",
"Account findByEmail(String email);",
"@Override\n\t@Transactional\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\tUserDetails user = null;\n\t\ttry {\n\t\t\t\n\t\t\tuser = searchUser(email);\n\t\t\treturn user;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t}\n\t}",
"public boolean isThereSuchAUser(String username, String email) ;",
"public Optional<User> findByEmail(final String email) {\n return null;\n }",
"public User findByEmail(String email) {\n\t\ttry {\n\t\t\treturn entityManager\n\t\t\t\t\t.createNamedQuery(User.FIND_BY_EMAIL, User.class)\n\t\t\t\t\t.setParameter(\"email\", email).getSingleResult();\n\t\t} catch (PersistenceException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public User getUserByEmail(String email_) {\n User user = new User();\n \n return user;\n }",
"Coach findByEmail(String email);",
"public static User findByEmail(String email) {\n return new User(email, \"\");\n // TODO: find a way to check email against the UBB users database\n //return find(\"email\", email).first();\n }",
"CustomerEntity findByEmail( final String email );",
"List<Member> findByEmail(String email);",
"@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\t// ako se ne radi nasledjivanje, paziti gde sve treba da se proveri email\n\t\tKorisnik user = korisnikService.pronadjiPoMejlu(email);\n\t\t\n\t\tif (user == null) {\n\t\t\tthrow new UsernameNotFoundException(String.format(\"No user found with username '%s'.\", email)); \n\t\t} else {\n\t\t\treturn user;\n\t\t}\n\t}",
"public User findByEmail(String email) {\n\t\treturn null;\n\t}",
"public User getByemailId(String emailId) {\n\t\treturn userDao.getByemailId(emailId);\n\t}"
] | [
"0.842916",
"0.8396041",
"0.8388113",
"0.8383915",
"0.834853",
"0.82367176",
"0.82367176",
"0.80517405",
"0.80070454",
"0.80070454",
"0.80070454",
"0.80070454",
"0.80070454",
"0.80070454",
"0.800134",
"0.79906845",
"0.79682297",
"0.7953833",
"0.7953833",
"0.7953833",
"0.7951688",
"0.7944963",
"0.7939337",
"0.7935684",
"0.7932151",
"0.7929248",
"0.7870927",
"0.785603",
"0.7791954",
"0.7790325",
"0.7786654",
"0.77769315",
"0.77763885",
"0.77721024",
"0.7760061",
"0.77453953",
"0.7725462",
"0.77063173",
"0.769802",
"0.76872796",
"0.76748025",
"0.76497585",
"0.763296",
"0.76307595",
"0.7626463",
"0.7626463",
"0.76238894",
"0.7616073",
"0.76047635",
"0.75870293",
"0.75816756",
"0.75544345",
"0.75475866",
"0.75415653",
"0.75279194",
"0.7513654",
"0.7489849",
"0.74545383",
"0.74055713",
"0.7382083",
"0.7375517",
"0.73751754",
"0.73751754",
"0.73635846",
"0.73633474",
"0.73462456",
"0.73383296",
"0.7335087",
"0.73236597",
"0.73169374",
"0.7307545",
"0.72428644",
"0.72336847",
"0.7224837",
"0.72193635",
"0.72110754",
"0.7201503",
"0.72003794",
"0.71972173",
"0.71929014",
"0.71904486",
"0.71732587",
"0.7165659",
"0.71649164",
"0.71452326",
"0.7142752",
"0.7141812",
"0.7139372",
"0.7076376",
"0.70619947",
"0.7056899",
"0.70426476",
"0.70182884",
"0.700794",
"0.69775295",
"0.695429",
"0.6926997",
"0.69238776",
"0.68833065",
"0.68760663"
] | 0.7745731 | 35 |
find an user by his user Id | public User findById(Long id){
return userRepository.findOne(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"User findUser(String userId);",
"User find(long id);",
"public User findUserById(int id);",
"User findUserById(Long id) throws Exception;",
"User getUserById(Long id);",
"User getUserById(Long id);",
"User getUserById(int id);",
"User getUser(Long id);",
"User findUserById(int id);",
"public User getUserById(Long userId);",
"public User findById(Long id);",
"public User findById(int userId);",
"User findById(Long id);",
"public User getUserById(Long id) throws Exception;",
"User findById(long id);",
"@Override\r\n\tpublic User searchUser(Integer id) {\n\t\treturn userReposotory.getById(id);\r\n\t}",
"Optional<User> findUser(int id) throws ServiceException;",
"public User getUser(Long userId);",
"User findOne(Long id);",
"@Override\r\n\tpublic User findByIdUser(Integer id) {\n\t\treturn userReposotory.findById(id).get();\r\n\t}",
"public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}",
"public User getUser(long id){\n User user = userRepository.findById(id);\n if (user != null){\n return user;\n } else throw new UserNotFoundException(\"User not found for user_id=\" + id);\n }",
"@Override\r\n public IUser getUserByUserId(String id)\r\n {\r\n EntityManager em = getEntityManager();\r\n\r\n try\r\n {\r\n return em.find(User.class, id);\r\n }\r\n finally\r\n {\r\n em.close();\r\n }\r\n }",
"public User findUser(int id) {\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n return allUsers.get(i);\n }\n }\n return null;\n }",
"User findOneById(long id);",
"public static User findUser(int id) {\r\n return null;\r\n }",
"public static User findUserById(int id) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserById = \"SELECT * FROM public.member \"\n + \"WHERE id = '\" + id + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserById);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"public UserEntity findByPrimaryKey(String userId) throws FinderException;",
"public User getUserById(String id){\n\t\tUser e;\n\t\tfor (int i = 0 ; i < users.size() ; i++){\n\t\t\te = users.get(i);\n\t\t\tif (e.getId().equals(id))\n\t\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Userinfo findbyid(int id) {\n\t\treturn userDAO.searchUserById(id);\r\n\t}",
"private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }",
"User selectByPrimaryKey(Long userId);",
"@Override\r\n public Dorm findById(Integer id) {\n return userMapper.findById(id);\r\n }",
"User getOne(long id) throws NotFoundException;",
"User getUser(String userId);",
"public User user(long id) {\n\t\tOptional<User> user = repository.findById(id);\n\n\t\tif (user.isPresent()) {\n\t\t\treturn user.get();\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"User com o Id: \" + id + \" não encontrado em nossa base de dados!\");\n\t\t}\n\n\t}",
"public UserInformation findInformationById(int id);",
"public User read(String id);",
"BaseUser selectByPrimaryKey(String userId);",
"User get(int userId) throws UserNotFoundException, SQLException;",
"@RequestMapping(value = \"/find/{id}\", method = RequestMethod.GET)\n @ResponseBody\n public ResponseEntity findUser(@PathVariable long id) {\n User user = userService.findById(id);\n if (user == null) {\n return new ResponseEntity(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity(user, HttpStatus.OK);\n }",
"public User getUserById(int userId) {\n return this.userDao.selectByPrimaryKey(userId); \r\n }",
"SysUser selectByPrimaryKey(Long userId);",
"public User findUserById (long id){\n if(userRepository.existsById(id)){\n return this.userRepository.findById(id);\n }else{\n throw new UnknownUserException(\"This user doesn't exist in our database\");\n }\n }",
"public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }",
"@Override\r\n\tpublic User findById(int id) {\n\t\treturn userDAO.findById(id);\r\n\t}",
"Userinfo selectByPrimaryKey(String userId);",
"public User findUser(int id)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (id == (users.get(i).getId()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic User findUserById(int id) {\n\t\treturn userDao.findUserById(id);\n\t}",
"@Override\n\tpublic User findUser(int id) {\n\n\t\tUser user = em.find(User.class, id);\n\n\t\treturn user;\n\t}",
"Optional<User> findUserById(Long id);",
"Optional<User> findById(Long userId);",
"public User getUserById(String id) {\n // return userRepo.findById(id);\n\n return null;\n }",
"public User findUserById(Long id) {\n \tOptional<User> u = userRepository.findById(id);\n \t\n \tif(u.isPresent()) {\n return u.get();\n \t} else {\n \t return null;\n \t}\n }",
"@RequestMapping(method=RequestMethod.GET, value=\"{id}\")\n\tpublic User getUser(@PathVariable Long id) {\n\t\treturn RestPreconditions.checkFound(repo.findByUserId(id));\n\t}",
"UserDTO findUserById(Long id);",
"@Override\r\n\tpublic User getUserById(int id) {\n\t\treturn userMapper.selById(id);\r\n\t}",
"User get(Key id);",
"UserDetails get(String id);",
"@Override\n public TechGalleryUser getUser(final Long id) throws NotFoundException {\n TechGalleryUser userEntity = userDao.findById(id);\n // if user is null, return a not found exception\n if (userEntity == null) {\n throw new NotFoundException(i18n.t(\"No user was found.\"));\n } else {\n return userEntity;\n }\n }",
"@Override\r\n\tpublic TbUser findUserById(Long id) {\n\t\tTbUser tbUser = tbUserMapper.selectByPrimaryKey(id);\r\n\t\treturn tbUser;\r\n\t}",
"@Override\r\n public User userfindById(Integer u_id) {\n return userMapper.userfindById(u_id);\r\n }",
"@Override\n public User findById(long id) {\n return dao.findById(id);\n }",
"@Override\n\tpublic User getUser(int id) {\n\t\treturn userRepository.findById(id);\n\t}",
"@Override\n public UserInfo findById(int id) {\n TypedQuery<UserInfo> query = entityManager.createNamedQuery(\"findUserById\", UserInfo.class);\n query.setParameter(\"id\", id);\n return query.getSingleResult();\n }",
"@Override\n\tpublic User findUserByUserId(long id) {\n\t\treturn userDao.getUserByUserId(id);\n\t}",
"@GetMapping(\"/findbyid\")\n\tpublic Optional<User> findUserById (@RequestParam int userId) {\n\t\treturn userRepo.findById(userId);\n\t}",
"public Optional<User> findById(Integer id);",
"UserInfo getUserById(Integer user_id);",
"@Override\n\tpublic User findByUserid(Serializable id) {\n\t\treturn this.userDao.findById(id);\n\t}",
"private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }",
"@Override\n public User findById(Integer id) {\n try {\n return runner.query(con.getThreadConnection(),\"select *from user where id=?\",new BeanHandler<User>(User.class),id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }",
"@Override\n public User getUserById(int userId) {\n return this.userDao.selectByPrimaryKey(userId);\n }",
"RoleUser selectByPrimaryKey(String id);",
"@Override\n\tpublic User findById(int userid) {\n\t\tSystem.out.println(\"Inside findOne of UserService\");\n\t\tOptional<User> user = userdao.findById(userid);\n//\t\treturn dao.findById(id);\n\t\treturn user.get();\n\t}",
"UserEntity selectByPrimaryKey(Integer id);",
"AdminUser selectByPrimaryKey(Integer id);",
"AdminUser selectByPrimaryKey(Integer id);",
"public User getRegUserFromId(int userId){\n for (int i = 0; i < regUsers.size(); i++){\n if (regUsers.get(i).getUserId() == userId){\n return regUsers.get(i);\n }\n }\n\n return null;\n }",
"@Override\r\n\tpublic SpUser findById(String id) {\n\t\treturn null;\r\n\t}",
"User selectByPrimaryKey(String id);",
"public User findById(Long id) {\n return genericRepository.find(User.class, id);\n }",
"public User getUserFromID(String id) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"_id\", new ObjectId(id));\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"RegsatUser selectByPrimaryKey(Long userId);",
"public User getUser(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n User user = null;\n try {\n tx = session.beginTransaction();\n\n // Add restriction to get user with username\n Criterion emailCr = Restrictions.idEq(id);\n Criteria cr = session.createCriteria(User.class);\n cr.add(emailCr);\n user = (User)cr.uniqueResult();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return user;\n }",
"UUID getUserId(String userName) throws UserNotFoundException;",
"@Override\n\tpublic User findById(String id) {\n\t\tUser u= em.find(User.class, id);\n\t\tSystem.out.println(u);\n\t\treturn u;\n\t}",
"WbUser selectByPrimaryKey(Integer userId);",
"Optional<User> findById(long id);",
"public User findById(int id) {\n\t\treturn userRepository.findOne(id);\n\t}",
"User selectByPrimaryKey(Long id);",
"@Override\r\n\tpublic User findById(int id) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic User user(int id) {\r\n\t\tMap<String,String> map = getOne(SELECT_USERS+ WHERE_ID, id);\r\n\t\tif(map!= null){\r\n\t\t\treturn IMappable.fromMap(User.class, map);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public User findUser(int id) {\n\n\t\ttry {\n\t\t\tConnection conn = getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from users where id = ?\");\n\t\t\tps.setInt(1, id);\n\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUser foundUser = new User(id, rs.getString(2), rs.getString(3), rs.getString(5),\n\t\t\t\t\t\trs.getDate(6));\n\t\t\t\tconn.close();\n\t\t\t\treturn foundUser;\n\n\t\t\t}\n\t\t\tconn.close();\n\n\t\t} catch (SQLException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn null;\n\t}",
"public User getUserFromId(int userId){\n for (int i = 0; i < regUsers.size(); i++){\n if (regUsers.get(i).getUserId() == userId){\n return regUsers.get(i);\n }\n }\n\n for (int i = 0; i < adminUsers.size(); i++){\n if (adminUsers.get(i).getUserId() == userId){\n return adminUsers.get(i);\n }\n }\n return null;\n }",
"public User getById(@NotBlank String id){\n System.out.println(\"Sukses mengambil data User.\");\n return null;\n }",
"Optional<QnowUser> findOne(Long id);",
"public User findById(long id) {\n return store.findById(id);\n }",
"@Override\n public Optional<User> find(long userId) throws ServiceException {\n Optional<User> user;\n try {\n manager.beginTransaction(userDao);\n user = userDao.findEntity(userId);\n manager.endTransaction();\n } catch (DaoException exception) {\n try {\n manager.rollback();\n } catch (DaoException rollbackException) {\n logger.error(rollbackException);\n }\n throw new ServiceException(exception);\n }\n return user;\n }",
"@Override\r\n\tpublic User getUserByID(int id) {\n\t\treturn userMapper.getUserByID(id);\r\n\t}"
] | [
"0.82270294",
"0.80368525",
"0.80271417",
"0.8020392",
"0.80134",
"0.80134",
"0.79820925",
"0.7973666",
"0.79319274",
"0.7885722",
"0.7833208",
"0.78098947",
"0.7770052",
"0.776096",
"0.7732062",
"0.77310264",
"0.7646249",
"0.7623208",
"0.76079583",
"0.7597742",
"0.7560258",
"0.7542802",
"0.75405586",
"0.7539413",
"0.75066245",
"0.749441",
"0.7489507",
"0.74886847",
"0.74806273",
"0.74779665",
"0.7472408",
"0.7453444",
"0.74470323",
"0.7445731",
"0.7444472",
"0.7429688",
"0.7422613",
"0.74092424",
"0.74035585",
"0.73882514",
"0.7387603",
"0.7379286",
"0.73780763",
"0.7375405",
"0.73626965",
"0.73609537",
"0.7360754",
"0.7354955",
"0.7347985",
"0.734737",
"0.7320809",
"0.73202014",
"0.731955",
"0.73131704",
"0.73028415",
"0.7301945",
"0.7300054",
"0.72968954",
"0.7294002",
"0.7290061",
"0.7286839",
"0.7279415",
"0.7267476",
"0.7266465",
"0.72585785",
"0.7255164",
"0.7241519",
"0.7239833",
"0.7239118",
"0.7223616",
"0.72192323",
"0.7215713",
"0.72029936",
"0.7201055",
"0.72002965",
"0.7198687",
"0.7192213",
"0.7192213",
"0.71866393",
"0.71829104",
"0.71710694",
"0.7167239",
"0.7158222",
"0.71563214",
"0.7155508",
"0.71543366",
"0.71535367",
"0.7139736",
"0.7139644",
"0.71382415",
"0.7134352",
"0.7112796",
"0.7100369",
"0.70983505",
"0.7089848",
"0.7084628",
"0.707233",
"0.70720077",
"0.70717186",
"0.7068219"
] | 0.7746565 | 14 |
check if the user with queried email has existed already | public boolean isExistingUser(String email){
Long count = userRepository.countByEmail(email);
return count > 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}",
"@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }",
"public boolean checkIfEmailExist(String email){\n // create query to get user with asked email\n TypedQuery<UsersEntity> findUser = entityManager.createQuery(\n \"SELECT user FROM UsersEntity user WHERE user.email=:email\",\n UsersEntity.class);\n\n // set query email parameter\n findUser.setParameter(\"email\", email);\n\n try {\n findUser.getSingleResult();\n FacesMessage msg = new FacesMessage(\"User: \" + email + \" - already exist\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return true;\n } catch (NoResultException e) {\n return false;\n }\n }",
"public boolean checkThisEmailAlreadyExist(String email) {\n\t\tquery = \"select id from guru where email=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{email},BeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public boolean checkUser(String email) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"email\", email);\r\n\r\n // Returns whether at least one user with the given email exists\r\n return users.countDocuments(query) > 0;\r\n }",
"public boolean emailAlreadyUsed(String email){\n \n StringBuilder query = new StringBuilder();\n \n query.append(\"SELECT id FROM userr WHERE email ='\");\n query.append(email);\n query.append(\"';\");\n \n try{\n PreparedStatement sql = conn.prepareStatement(query.toString());\n ResultSet results = sql.executeQuery();\n\n while (results.next()){\n return true;\n } \n\n\n } catch (SQLException e){\n e.printStackTrace();\n }\n \n return false;\n \n }",
"public boolean isUserExisted(String _fbEmail);",
"public static boolean emailAlreadyExists(String email) throws ParseException {\n ParseQuery<TipperUser> query = ParseQuery.getQuery(\"TipperUser\");\n query.whereEqualTo(\"email\", email);\n List<TipperUser> result = query.find();\n if (result.isEmpty()) {\n return false;\n } else return true;\n }",
"private boolean IsUserExist(){\n SignupUser user =roomDB.dao().GetUserData(et_user.getText().toString());\n if(user!=null){\n if(!user.getEmail().isEmpty()){\n Toast.makeText(this, \"User is already registered!\", Toast.LENGTH_SHORT).show();\n return true;\n }\n\n }\n return false;\n }",
"Boolean checkEmailAlready(String email);",
"public boolean checkEmail(TextField email) {\n String emailSQL = \"SELECT * FROM user WHERE email = ?\";\n ResultSet rsEmail;\n boolean email_exists = false;\n\n\n try {\n\n PreparedStatement emailPST = connection.prepareStatement(emailSQL);\n emailPST.setString(1, email.getText());\n rsEmail = emailPST.executeQuery();\n\n if (rsEmail.next()) {\n email_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Email Already Used\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return email_exists;\n\n }",
"public boolean isThereSuchAUser(String username, String email) ;",
"public boolean usercheck(String email_address)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"select email_address from users where email_address = ?\";\r\n\t\t\tpreparedStatement = connect.prepareStatement(query);\r\n\t\t\tpreparedStatement.setString(1, email_address);\r\n\t\t\tresultSet = preparedStatement.executeQuery();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * if there's a returned value for the selected column of the query would be able to be used and passed to other classes\r\n\t\t\t * Here we display a warning message that the current username/email is already registered or taken\r\n\t\t\t */\r\n\t\t\tif(resultSet.next())\r\n\t\t\t{\r\n\t\t\t\tif(resultSet.getString(\"email_address\").equals(email_address))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"User already exists\", \"Error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"public static boolean userExists(String email)\n\t{\n\t\tString sql = \"SELECT COUNT(*) FROM UserInfo u WHERE u.email = ?;\";\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setString(1, email);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tint count = 0;\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\tcount = rs.getInt(1);\n\t\t\t}\n\t\t\tif(count > 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}",
"private boolean isExistUserEmail(String email, String userId) {\n User user = userService.findByEmailAndStatus(email, Constant.Status.ACTIVE.getValue());\n if (user != null && !user.getUserId().equals(userId)) {\n return true;\n }\n return false;\n }",
"public boolean checkUser(String email) {\n db= openHelper.getReadableDatabase();\n String[] columns = {\n COLUMN_USER_ID\n };//coloane de returnat\n String selection = COLUMN_USER_EMAIL + \" = ?\";//criteriul de selectie\n String[] selectionArgs = {email};//argumentul pentru selectie\n // query user table with condition\n //SELECT column_user_id FROM useri WHERE column_user_email = '[email protected]';\n Cursor cursor = db.query(TABLE_USER, //tabel pentru query\n columns, //coloane de returnat\n selection, //coloane pentru clauze WHERE\n selectionArgs, //valori pentru clauza WHERE\n null, //group the rows\n null, //filter by row groups\n null); //ordinea de sortare\n int cursorCount = cursor.getCount();\n cursor.close();\n if (cursorCount > 0) {\n return true;\n }\n return false;\n }",
"public boolean isUserExist(String emailId) {\n\t\tboolean exists = false;\n\n\t\tfor (User user : userVO.getUsers()) {\n\n\t\t\tif (user.getEmail().equals(emailId)) {\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\treturn exists;\n\t}",
"private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }",
"boolean checkEmailExist(String email){\n boolean isEmailExists = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n if(checkEmail.equals(email)){\n isEmailExists = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isEmailExists;\n }",
"public boolean validateRegister(String email) {\n\t\tLog.i(TAG, \"validate current user whether exisits in db\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString val = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(val, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return true;\n\t\treturn false;\n\t}",
"public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n \n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n \n // selection argument\n String[] selectionArgs = {email};\n \n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_USER, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"@Override\n public boolean isUserEmailExists(String email) {\n User user = getUserByEmail(email);\n return user != null && user.getEmail() != null && !user.getEmail().equals(\"\");\n }",
"boolean isUserExists(RegisterData data) throws DuplicateUserException;",
"private boolean check_email_available(String email) {\n // Search the database for this email address\n User test = UserDB.search(email);\n // If the email doesn't exist user will be null so return true\n return test == null;\n }",
"public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {email};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"@Override\n public boolean isUserEmailExists(String email, String exludeUserName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_EMAIL_EXCLUDE_USERNAME);\n params.put(User.PARAM_EMAIL, email);\n params.put(User.PARAM_USERNAME, exludeUserName);\n User user = getRepository().getEntity(User.class, params);\n\n return user != null && user.getEmail() != null && !user.getEmail().equals(\"\");\n }",
"public boolean isUserExist(String email, String Password);",
"public static boolean isEmailExist(User user) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n String query = \"SELECT email FROM auttc_users.users \"\n + \"WHERE email = ?\";\n \n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, user.getEmail());\n rs = ps.executeQuery();\n return rs.next();\n } catch (SQLException e) {\n System.out.println(e);\n return false;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"public boolean isUserIdTaken(String userEmailId);",
"boolean emailTaken(String email) throws SQLException {\n\t\tpst=con.prepareStatement(\"SELECT * FROM utilisateur WHERE email=?;\");\n\t\tpst.setString(1, email);\n\t\t\n\t\trs = pst.executeQuery();\n\t\treturn (rs.next());\n\t}",
"public boolean alreadyRegister(String email) {\n \tfor (User user : list) {\n \t\tif (user.getEmail().equals(email))\n \t\t\treturn true;\n \t}\n \treturn false;\n }",
"public boolean checaExisteEmail(String email){\r\n\t\tfor (Usuario UsuarioTemp : listaDeUsuarios) {\r\n\t\t\tif(UsuarioTemp.getEmail().equals(email)){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn false;\r\n\t}",
"private void showData1(DataSnapshot dataSnapshot) {\n boolean cond = false;\n String emailaddress2 = email.getText().toString();\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n User eid = new User(ds.getValue());\n eid.setEmail(ds.child(\"email\").getValue().toString());\n if (eid.email.equals(emailaddress2)) {\n cond=true;\n break;\n }\n }\n if (cond == false){\n //if user does not exist then go ahead with sign up\n addemail();\n }\n if (cond ==true){\n Toast.makeText(getApplicationContext(),\"User already exists. Please login\",Toast.LENGTH_SHORT).show();\n }\n\n }",
"@Override\n\tpublic void checkDuplicateEmail(String email){\n\t\tif(userRepository.getUserByEmail(email) != null)\n\t\t\tthrow new BookException(HttpStatus.NOT_ACCEPTABLE,\"Email already exist\");\n\t}",
"boolean existsByEmail(String email);",
"@Override\n\tpublic boolean isEmailAlreadyUsed(final String email) {\n\t\treturn null != this.getUserId(email);\n\t}",
"boolean isEmailExist(String email);",
"public synchronized boolean isUser(String email) {\r\n return (email != null) && email2user.containsKey(email);\r\n }",
"public boolean checkEmail(String username) {\n String[] columns = {COL_1};\n SQLiteDatabase db = getReadableDatabase();\n String selection = COL_2 + \"=?\";\n String[] selectionArgs = {username};\n Cursor cursor = db.query(USER_TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n int count = cursor.getCount();\n cursor.close();\n db.close();\n\n if (count > 0)\n return true;\n else\n return false;\n }",
"public boolean existsByEmail(String email);",
"public boolean existsByEmail(String email);",
"public boolean chkmail(String email){\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"Select * from user where email=?\",new String[]{email});\n if (cursor.getCount()>0) return false;\n else return true;\n }",
"public boolean existeEmail(String email) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String sql = \"SELECT email FROM usuario WHERE usuario.email = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, email);\n rs = ps.executeQuery();\n if (rs.next()) {\n return true;\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return false;\n }",
"@Override\n\tpublic User findDuplicateByEmail(String email) {\n\t\tUser dbUser = userRepository.findByEmail(email);\n\t\tif (dbUser != null) {\n\t\t\tthrow new RuntimeException(\"User Already Registered.\");\n\t\t}\n\t\treturn null;\n\t}",
"public Boolean checkEmail(String email){\n return databaseManager.CheckIsDataAlreadyInDBorNot(email);\n }",
"private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}",
"boolean hasUserEmail();",
"public Boolean existsByEmail(String email);",
"public boolean checkmail(String email)\n {\n SQLiteDatabase db=this.getReadableDatabase();\n Cursor cursor=db.rawQuery(\"select * from user where email=?\", new String[]{email});\n if(cursor.getCount()>0)\n return false;\n\n else\n return true;\n\n }",
"public static boolean checkUserEmail(String email)\n\t{\n\t\tSearchResponse response = client.prepareSearch(\"projektzespolowy\")\n\t\t\t\t.setTypes(\"user\")\n\t\t\t\t.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)\n\t\t\t\t.setQuery(QueryBuilders.matchPhraseQuery(\"EMAIL\", email))\n\t\t\t\t.setSize(0).setFrom(0)\n\t\t\t\t.execute()\n\t\t\t\t.actionGet();\n\t\t\n\t\tif(response.getHits().getTotalHits() > 0)\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}",
"@Override\n @SuppressWarnings(\"unchecked\")\n public boolean checkExistsEmail(String emailAddress) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserProfile.class);\n crit.add(Restrictions.eq(\"emailAddress\", emailAddress));\n List<UserProfile> userList = crit.list();\n session.close();\n return !userList.isEmpty();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }",
"public boolean checkEmail(String Email) {\n SQLiteDatabase db = DatabaseHelper.this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"select * from Users where Email=?\", new String[]{Email});\n if (cursor.getCount() > 0) {\n\n return false;\n } else {\n return true;\n }\n }",
"boolean emailExistant(String email, int id) throws BusinessException;",
"public User existsProfile(String email) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n SuperBooleanBuilder query = new SuperBooleanBuilder();\n query.put(\"email\", email);\n Search search = new Search.Builder(query.toString())\n .addIndex(INDEX_NAME)\n .addType(User.class.toString())\n .build();\n\n User result = null;\n try {\n result = client.execute(search).getSourceAsObject(User.class);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return result;\n }",
"public boolean checkUser(String mail) {\n String[] selectionArgs = {mail};\n String selectionString = \"SELECT * FROM \" + UserDBHelper.TABLE_NAME + \" WHERE \" + UserDBHelper.COLUMN_EMAIL + \" = ?\";\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectionString,selectionArgs);\n\n if (cursor.getCount() > 0) {\n cursor.close();\n db.close();\n return true;\n }\n else{\n cursor.close();\n db.close();\n return false;\n }\n\n }",
"private boolean checkEmail() throws IOException {\n String email = getEmail.getText();\n \n if(email.contains(\"@\")) { \n UserDatabase db = new UserDatabase();\n \n if(db.emailExists(email)) {\n errorMessage.setText(\"This email address has already been registered.\");\n return false;\n }\n \n return true;\n }\n else {\n errorMessage.setText(\"Please enter a valid email. This email will be \"+\n \"used for verification and account retrieval.\");\n return false;\n }\n }",
"private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }",
"public String createUserIfNotExist(String email) throws UserNotFoundException {\n List<Profile> users= profileDao.findAll();\n for (Profile profile:users\n ) {\n if(profile.getEmail().equals(email))\n return profile.getUserId();\n }\n Profile tempProfile=new Profile();\n tempProfile.setEmail(email);\n return profileDao.save(tempProfile).getUserId();\n\n }",
"private boolean userExists(Utente checkUser) {\n\t\tDB db = getDB();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente && (((Utente)user.getValue()).getUsername().equals(checkUser.getUsername())))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"boolean userExists(HttpServletRequest request, String userId);",
"public boolean isUsernameExist(String un) {\n\n boolean exist = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collection = db.getCollection(\"registeredUser\");\n\n // ----- get document of given username from registeredData -----\n System.out.println(\"\\nVerifying if username already exists or not\\n--------------------\\n\");\n String colUsername = \"username\"; // set key and value to look for in document\n FindIterable<Document> docOne = collection.find(Filters.eq(colUsername, un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n // cursor1 will only have 1 data if we found a match\n if (cursor1.hasNext()) {\n System.out.println(\"Username already exists\");\n exist = true;\n }\n else {\n System.out.println(\"Username is available to register\");\n }\n } finally {\n cursor1.close();\n }\n\n return exist;\n }",
"public int duplicateEmail(String email) {\n\t\treturn sqlSessionTemplate.selectOne(\"memberInfo.checkEmail\", email);\r\n\t}",
"public boolean existeUsuario(String nickname, String mail);",
"private boolean personAlreadyExists(AddPeopleRequest addPeopleRequest) {\n // query db for this user\n AddPeopleRequest matchingEntry =\n this.addPersonRequestMongoRepository\n .findPersonByFirstAndLastName(\n addPeopleRequest.getFirstName(),\n addPeopleRequest.getLastName());\n // if the value returned is null.. the value did not exist..\n if (matchingEntry == null) {\n return false;\n } else {\n return true;\n }\n }",
"public boolean existUser(String id);",
"@Override\n\tpublic boolean registeringUser(UserDetails userDetails) {\n\t\tfor (UserDetails ud : Repository.USER_DETAILS) {\n\t\t\tif ((ud.getEmailId()).equalsIgnoreCase(userDetails.getEmailId())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tRepository.USER_DETAILS.add(userDetails);\n\t\treturn true;\n\t}",
"public boolean registeredUser(String email, String password)\n {\n for (User user : users) {\n if(user.email.equals(email) && user.password.equals(password)) {\n Log.v(\"DonationApp\", \"Logging in as: \" + user.firstName + \" \" + user.lastName);\n return true;\n }\n }\n return false;\n }",
"public Boolean user_exists (UserWS user) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuery i = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tiniciaOperacion();\r\n\t\t\t\t\ti = sesion.createQuery(\"SELECT u.id_user FROM User u WHERE u.mail = :login\"); \r\n\t\t\t\t i.setString(\"login\", user.getLogin());\r\n\t\t\t\t \r\n\t\t\t\t return (i.uniqueResult() != null);\r\n\t\t\t\t}",
"@Override\n @Transactional(readOnly = true)\n public Boolean existsByEmail(String email) {\n return this.pacienteRepository.existsByEmail(email);\n }",
"@Override\r\n\tpublic int checkEmailDup(String email) {\n\t\treturn mDAO.checkEmailDup(sqlSession, email);\r\n\t}",
"@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}",
"public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}",
"public User userExist(User user);",
"public boolean existeUser(String usuario) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String sql = \"SELECT email FROM usuario WHERE usuario.usuario = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, usuario);\n rs = ps.executeQuery();\n if (rs.next()) {\n return true;\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return false;\n }",
"private void checkDuplicateEntry(Long userId, String email, Boolean isBeneficiary, Boolean isFiduciary) {\n\t\tList<Contact> contactOpt = contactRepository.findByUserIdAndEmailAndIsFiduciaryAndIsBeneficiaryAndDeletedFalse(\n\t\t\t\tuserId, email, isBeneficiary, isFiduciary);\n\t\tif (!contactOpt.isEmpty()) {\n\t\t\tthrow DataAlreadyExistException.of(MessageConstant.EMAIL_ALREADY_EXISTED);\n\t\t}\n\t}",
"boolean loginUser(String email,String password){\n boolean checkUserDetails = checkLoginDetails(email,password);\n boolean userExists = false;\n if(checkUserDetails){\n try{\n userExists =true;\n stmt = con.prepareStatement(\"UPDATE users SET userStatus = ? WHERE email = ?\");\n stmt.setBoolean(1,true);\n stmt.setString(2,email);\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n return userExists;\n }",
"private boolean verificaEmailJaCadastrado(String email) throws SQLException {\n String sql = \"SELECT * from crud_alunos where email=?\";\n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n preparador.setString(1, email);\n ResultSet rs = preparador.executeQuery();\n if(rs.next()){\n JOptionPane.showMessageDialog(null, \"Email já Cadastrado!\");\n return true;\n }\n else {\n return false;\n }\n \n \n }",
"boolean exists(User user);",
"public boolean existUser(String campo1, String campo2);",
"boolean hasEmail();",
"boolean hasEmail();",
"boolean hasEmail();",
"boolean hasEmail();",
"boolean hasEmail();",
"@Override\n public boolean checkEmail(User user) {\n String email = user.getEmail();\n User userEx = findByEmail(email);\n return userEx != null;\n }",
"public boolean isRegisteredEmail(String email);",
"public boolean checkProfileEmail(String email, String password) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USERNAME\n };\n SQLiteDatabase db = this.getReadableDatabase();\n // selection criteria\n String selection = COLUMN_EMAIL + \" = ?\" + \" AND \" + COLUMN_PASSWORD + \" = ?\";\n\n // selection arguments\n String[] selectionArgs = {email, password};\n\n // query user table with conditions\n Cursor cursor = db.query(TABLE_PROFILE, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"public boolean userDuplicateCheck(String username){\n ArrayList<User> users = new ArrayList<>(db.getAllUsers());\n\n for(User user : users){\n if(user.getUsername().equals(username)){\n return false;\n }\n }\n return true;\n }",
"public User validExistingEmail(TextInputLayout tiEmail, EditText etEmail) {\n boolean result = isValidEmail(tiEmail, etEmail);\n User user = null;\n\n if (result) {\n String email = etEmail.getText().toString().trim();\n UserRepository userRepository = new UserRepository(c.getApplicationContext());\n user = userRepository.getUserByEmail(email);\n if (user == null)\n tiEmail.setError(c.getString(R.string.emailNotExist));\n else\n tiEmail.setError(null);\n }\n\n return user;\n }",
"public boolean isExistingUsername(String username) {\n boolean isExistingUser = false; \n \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username)) {\n isExistingUser = true; \n }\n }\n \n return isExistingUser; \n }",
"@When(\"I try to register a new user with existing email\")\n\tpublic void i_try_to_register_a_new_user_with_existing_email() {\n\n\t\tString sql = \"select email from users\\n\" + \"where email is not null\\n\" + \" limit 1;\";\n\t\temail = (String) DBUtils.getCellValue(sql);\n\t\tassertNotNull(email);\n\n\t\tresponce = RestAssured.given().header(\"Authorization\", RestUtils.token).param(\"first-name\", \"Johnny\")\n\t\t\t\t.param(\"last-name\", \"Cage\").param(\"email\", email).param(\"password\", \"subzerobest\")\n\t\t\t\t.param(\"role\", \"student-team-member\").param(\"batch-number\", \"8\").param(\"team-name\", \"CodeHunters\")\n\t\t\t\t.param(\"campus-location\", \"VA\").when().post(RestAssured.baseURI + \"/api/students/student\");\n\n\t}",
"@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }",
"boolean checkEmailExistsForClient(String email) throws RuntimeException;",
"public boolean confirmEmail(String email) {\n return database.emailExists(email);\n }",
"private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}",
"public Boolean signUp(String email, String password) {\n //set uo status flag\n boolean flag = false;\n //check the storage if the credentials exist\n if (users.containsKey(email)) {\n if (users.get(email).getEmail().equalsIgnoreCase(us.getEmail())\n && users.get(email).getPassword().equalsIgnoreCase(password)) {\n flag = true;\n response = \"USER_EXIST\";\n }\n }\n //add the new user to the map\n us.setEmail(email);\n us.setPassword(password);\n synchronized (users) {\n users.put(email, us);\n response = \"CREATED\";\n }\n return flag;\n\n }",
"public static boolean isRegisteredEmail(String email) throws SQLException{\n Connection connect = null;\n ResultSet set = null;\n String isRegisteredEmailSQL = \"SELECT email FROM users where email = ?\";\n\n // Check Email Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare SQL Statement:\n PreparedStatement statement = connect.prepareStatement(isRegisteredEmailSQL);\n // Set Attributes / Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // check for results:\n while (set.next()){\n return true;\n }\n }catch (Exception e){\n e.printStackTrace();\n }finally {\n if(set != null){\n set.close();\n }\n if (connect != null){\n connect.close();\n System.out.println(\"Closing DB Connection!\");\n }\n }\n // End Of Check Email Try Block.\n return false;\n }",
"@Override\n\tpublic Boolean existsByEmail(String email) {\n\t\treturn null;\n\t}",
"public boolean checkUser(String email, String password) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n SQLiteDatabase db = this.getReadableDatabase();\n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\" + \" AND \" + COLUMN_USER_PASSWORD + \" = ?\";\n\n // selection arguments\n String[] selectionArgs = {email, password};\n\n // query user table with conditions\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]' AND user_password = 'qwerty';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"public static String emailValid(String email){\n return \"select u_email from users having u_email = '\" + email + \"'\";\n }"
] | [
"0.8043553",
"0.8036127",
"0.7958721",
"0.79460955",
"0.77453077",
"0.7731493",
"0.75660455",
"0.7540515",
"0.75344217",
"0.75290537",
"0.7527902",
"0.7474591",
"0.74673927",
"0.7451186",
"0.74380493",
"0.74205756",
"0.74151874",
"0.74150467",
"0.7400582",
"0.73812187",
"0.7365785",
"0.7358657",
"0.73566455",
"0.73482937",
"0.7302867",
"0.72940046",
"0.7276027",
"0.72727364",
"0.7272199",
"0.72511625",
"0.72484547",
"0.7194267",
"0.7150319",
"0.71473086",
"0.7130884",
"0.71297884",
"0.7123607",
"0.71105707",
"0.7081737",
"0.70716125",
"0.70716125",
"0.7043552",
"0.7032206",
"0.7006574",
"0.69998264",
"0.6995465",
"0.6992889",
"0.69734573",
"0.69393784",
"0.69320345",
"0.69019",
"0.6886418",
"0.6856647",
"0.68496096",
"0.68404746",
"0.6827504",
"0.6825075",
"0.6816485",
"0.67957443",
"0.67861086",
"0.6785747",
"0.67578137",
"0.6756808",
"0.6740079",
"0.6730212",
"0.6701327",
"0.6693592",
"0.6681697",
"0.6674423",
"0.66720086",
"0.66643924",
"0.66509455",
"0.6632264",
"0.66172737",
"0.6616448",
"0.6613051",
"0.66003114",
"0.6600234",
"0.65613174",
"0.6544323",
"0.6544323",
"0.6544323",
"0.6544323",
"0.6544323",
"0.6510726",
"0.6509889",
"0.6506653",
"0.65018094",
"0.64890426",
"0.6481759",
"0.64735234",
"0.6468309",
"0.6452619",
"0.64474404",
"0.6425422",
"0.6413048",
"0.64085203",
"0.6393166",
"0.63880473",
"0.6384551"
] | 0.7905696 | 4 |
delete an user from database | public void delete(User user){
userRepository.delete(user);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteUserById(Long id);",
"public void deleteUser(User userToDelete) throws Exception;",
"void deleteUserById(Integer id);",
"public void deleteUser(String name);",
"void deleteUser(int id);",
"public void deleteUser(User user) {\n update(\"DELETE FROM user WHERE id = ?\",\n new Object[] {user.getId()});\n }",
"@Override\n\tpublic void deleteUser(User user) {\n\t\topenSession().createQuery(\"DELETE FROM User where userId =\" + user.getUserId()).executeUpdate();\n\t\t\n\t}",
"void deleteUser(String username) throws UserDaoException;",
"public void deleteUser(Integer uid);",
"public boolean delete(User user);",
"void deleteUser(String userId);",
"public void deleteUser(String username);",
"public void deleteUser(long userId);",
"@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}",
"public void deleteUser(long id){\n userRepository.deleteById(id);\n }",
"public User delete(String user);",
"void delete(User user);",
"void delete(User user);",
"void deleteUser(String deleteUserId);",
"boolean delete(User user);",
"void deleteUser( String username );",
"void remove(User user) throws SQLException;",
"@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}",
"public void deleteUser(user user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_NAME, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }",
"public void deleteUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USER, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getId())});\n db.close();\n }",
"@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}",
"@Override\r\n\tpublic void delete(User user) {\n\t\tuserDao.delete(user);\r\n\t}",
"public void deleteUser(int id) {\r\n userRepo.deleteById(id);\r\n }",
"@Override\n\tpublic void delete(Connection conn, User user) throws SQLException {\n\t\tString deleteSql=\"delete from tbl_user where id=?\";\n\t\tPreparedStatement ps=conn\n\t\t\t\t.prepareCall(deleteSql);\n\t\tps.setLong(1, user.getId());\n\t\tps.execute();\n\t\t\n\t}",
"@Override\r\n\tpublic int deleteUser(Users user) {\n\t\treturn 0;\r\n\t}",
"public void deleteUser(User user) {\n\t\t\r\n\t\tsessionFactory.getCurrentSession().delete(user);\t\r\n\t\t\r\n\t}",
"public void deleteUserById(Long userId);",
"public void deleteUser(IndividualUser user) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Users WHERE userName=? AND id=? AND firstName=? AND lastName=?;\");\n s.setString(1, user.getId());\n s.setInt(2,user.getIdNum());\n s.setString(3, user.getFirstName());\n s.setString(4, user.getLastName());\n s.execute();\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }",
"public void deleteUser(User user) {\n\t\tdelete(user);\r\n\t}",
"public void deleteUser(int id) {\n\t\tuserRepository.delete(id);\r\n\t}",
"public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}",
"public void deleteUser(Integer id) throws BadRequestException;",
"@Override\r\n\tpublic boolean delUser(user user) {\n\t\tif(userdao.deleteByPrimaryKey(user.gettUserid())==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}",
"@Override\n public void delete(User user) {\n dao.delete(user);\n }",
"@Override\n\tpublic void delete(User user)\n\t{\n\t\tuserDAO.delete(user);\n\t}",
"public void delete(User user)throws Exception;",
"public void delete(User user) {\n\t\tuserDao.delete(user);\n\t}",
"public User delete(User user);",
"public void delete(User usuario);",
"@Override\n\tpublic void deleteUserById(Integer id) {\n\n\t}",
"@Override\n public boolean deleteUser(User user) {\n return false;\n }",
"@Override\n\tpublic void delete_User(String user_id) {\n\t\tuserInfoDao.delete_User(user_id);\n\t}",
"public void deleteUser(int id){\r\n\t\tconfigDao.deleteUserById(id);\r\n\t}",
"public static int delete(User user) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"DELETE FROM users \"\n + \"WHERE Email = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, user.getEmail());\n\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }",
"@Override\n\tpublic int deleteUser(Integer id) {\n\t\treturn userDao.deleteUser(id);\n\t}",
"@Override\n\tpublic int delete(Users user) {\n\t\t\n\t\treturn userDAO.delete(user);\n\t}",
"@Override\n\tpublic void deleteUser(int id) {\n\t\tuserMapper.deleteUser(id);\n\t}",
"public String deleteUser(){\n\t\tusersservice.delete(usersId);\n\t\treturn \"Success\";\n\t}",
"public void deleteUserById(int id){\n userListCtrl.deleteUser(id);\n }",
"@Override\n public boolean deleteUser(User user) {\n return controller.deleteUser(user);\n }",
"private void deleteUser() throws SQLException {\n System.out.println(\"Are you sure you want to delete your user? Y/N\");\n if (input.next().equalsIgnoreCase(\"n\")) return;\n\n List<Integer> websiteIds = new ArrayList<>();\n try (PreparedStatement stmt = connection.prepareStatement(\"SELECT * FROM passwords \" +\n \"WHERE user_id like (?)\")) {\n stmt.setInt(1, user.getId());\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n websiteIds.add(rs.getInt(\"website_data_id\"));\n }\n }\n\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM passwords \" +\n \"WHERE user_id like (?)\")) {\n stmt.setInt(1, user.getId());\n stmt.executeUpdate();\n }\n\n for (int website : websiteIds) {\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM website_data \" +\n \"WHERE website_data_id like (?)\")) {\n stmt.setInt(1, website);\n stmt.executeUpdate();\n }\n }\n\n try (PreparedStatement stmt = connection.prepareStatement(\"DELETE FROM users \" +\n \"WHERE id like (?)\")) {\n stmt.setInt(1, user.getId());\n stmt.executeUpdate();\n }\n\n System.out.println(\"User \" + user.getUsername() + \" deleted.\");\n System.exit(0);\n }",
"public void delete(User user) {\n repository.delete(user);\n }",
"public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}",
"void deleteUser(User user, String token) throws AuthenticationException;",
"public void deleteUser(String id) {\n\t\tSystem.out.println(\"deleteUser\");\n\t\t personDAO.deleteUser(id);\n\t}",
"public void deleteUser(Userlist user) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_USERLIST, COLUMN_USER_ID + \" = ?\",\n new String[]{String.valueOf(user.getID())});\n db.close();\n }",
"@Override\r\n\tpublic void delete(UserMain user) {\n\t\tusermaindao.delete(user);\r\n\t}",
"@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic Boolean deleteUser(User user) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void deleteUser(User user) {\n\t\tiUserDao.deleteUser(user);\n\t}",
"@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}",
"public void removeUser(){\n googleId_ = User.getDeletedUserGoogleID();\n this.addToDB(DBUtility.get().getDb_());\n }",
"public void deleteUser(User user) {\r\n\t\tusersPersistence.deleteUser(user);\r\n\t}",
"@Override\n public void deleteUser(Integer id){\n try {\n runner.update(con.getThreadConnection(),\"delete from user where id=?\",id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n }",
"public void delete(User u) {\n\t\tUserDao ua=new UserDao();\n\t\tua.delete(u);\n\t\t\n\t}",
"public Boolean DeleteUser(User user){\n\t\t\treturn null;\n\t\t}",
"public void deleteUser(int id) {\n\t\tet.begin();\n\t\tem.remove(em.find(User.class, id));\n\t\tet.commit();\n\t}",
"public static int delete(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from t_user where id=?\"); \n ps.setInt(1,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }",
"@Override\n\tpublic void deleteOne(User u) {\n\t\tdao.deleteOne(u);\n\t}",
"public String deleteUser(){\n\t\ttry{\n\t\t\tnew UtenteDao().deleteUser(utente_target);\n\t\t\treturn \"Utente eliminato con successo!\";\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"@Delete({\r\n \"delete from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n int deleteByPrimaryKey(Integer user_id);",
"@Override\r\n\tpublic int delete(int id) {\n\t\treturn userDAO.DeleteUser(id);\r\n\t}",
"@Override\n\tpublic void deleteUser(int userId) {\n\t\tuserDao.deleteUser(userId);\n\t}",
"public static void deleteUserFromDb(Person person) {\n int id = person.getId();\n\n String query = \"DELETE FROM users WHERE idusers = \" + id + \";\";\n DbConnector.updateValueInDb(query);\n }",
"@Override\n\tpublic void delete(User user) throws DAOException {\n\t\t\n\t}",
"public void deleteUser(int id) throws Exception {\n\t\tSession session = null;\n \t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString sql = \"delete from sys_user where emp_id=\"+id;\n\t\t\tSQLQuery sqlQuery=session.createSQLQuery(sql);\n\t\t\tsqlQuery.executeUpdate();\n\t\t\tsession.flush();\n\t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}",
"public void deleteUser(int userid) {\n\t\t\n\t}",
"public void deleteUser(final Long id) {\n userRepository.deleteById(id);\n }",
"@Override\r\n\tpublic void delete(User user) {\n\t\tint iRet = dao.delete(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"删除失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"删除成功\");\r\n\t}",
"public void deleteUser(String uid) throws Exception {\n\t\tString sql = \"delete from user where uid = ?\";\r\n\t\tObject[] params = { uid };\r\n\t\tdb.doPstm(sql, params);\r\n\t\tdb.closed();\r\n\t}",
"@Override\n\tpublic void deleteUser(String userId) {\n\t\t\n\t}",
"void DeleteCompteUser(int id);",
"public void deleteGuest(User user) throws SQLException {\n PreparedStatement pr = connection.prepareStatement(Queries.deleteGuest);\n pr.setString(1, user.getUserFullName());\n pr.executeUpdate();\n pr.close();\n }",
"void removeUser(Long id);",
"@Override\n\tpublic int delete(int uid) {\n\t\treturn new userDaoImpl().delete(uid);\n\t}",
"@Override\n\tpublic void delete(User entity) {\n\t\tuserlist.remove(String.valueOf(entity.getDni()));\n\t}",
"public void deleteUser(Integer id) {\n UserModel userModel;\n try {\n userModel = userRepository.findById(id).orElseThrow(IOException::new);\n }\n catch (IOException e) {\n System.out.println(\"User not found\");\n userModel = null;\n }\n userRepository.delete(userModel);\n }",
"public void deleteUser(SPUser user, String tableName) { \n try {\n \t\t\tmyCon.execute(\"DELETE FROM \"+tableName+\" WHERE Username= '\"+ user.getUsername()+\"';\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public void delete(User obj) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(String id) {\n\t\tuserDao.delete(id);\n\t\t\n\t}",
"int deleteByPrimaryKey(Integer user);",
"@Delete({\n \"delete from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);",
"@Transactional\n\t@Modifying\n\t@Query(\"DELETE FROM Users t WHERE t.email =:email AND t.password =:password\")\n void deleteUser(@Param(\"email\") String email, @Param(\"password\") String password);",
"public void delete(String username);",
"@Override\r\n\tpublic int deleteByPrimaryKey(Integer id) {\n\t\treturn userDao.deleteByPrimaryKey(id);\r\n\t}"
] | [
"0.8340065",
"0.83326626",
"0.83053344",
"0.82760215",
"0.8205663",
"0.8192728",
"0.81905395",
"0.8156736",
"0.8154711",
"0.8136525",
"0.81118995",
"0.81029135",
"0.8101628",
"0.80966824",
"0.8094775",
"0.80897826",
"0.8077173",
"0.8077173",
"0.8051861",
"0.80474925",
"0.80240947",
"0.80098695",
"0.7995678",
"0.7995198",
"0.7979379",
"0.79756534",
"0.79725933",
"0.79663795",
"0.79627913",
"0.79597133",
"0.7949048",
"0.7948686",
"0.789291",
"0.78885275",
"0.7888345",
"0.7886559",
"0.78809386",
"0.78797334",
"0.7877564",
"0.78756535",
"0.7873841",
"0.78723025",
"0.78551775",
"0.7843104",
"0.7838057",
"0.78357023",
"0.7824042",
"0.7822053",
"0.78196156",
"0.78153825",
"0.780277",
"0.7785249",
"0.77804613",
"0.7775814",
"0.77756214",
"0.7768441",
"0.7761625",
"0.7759126",
"0.775719",
"0.77480936",
"0.7741758",
"0.77312475",
"0.77212757",
"0.7719188",
"0.7710929",
"0.76957947",
"0.76932687",
"0.7689669",
"0.76808405",
"0.7677031",
"0.7676321",
"0.7670619",
"0.7667165",
"0.7663801",
"0.7657552",
"0.7646966",
"0.76467884",
"0.76421",
"0.7641079",
"0.76372313",
"0.7627654",
"0.7620652",
"0.76206005",
"0.7619551",
"0.7614816",
"0.7606725",
"0.7592412",
"0.75800025",
"0.7572154",
"0.75626534",
"0.7558724",
"0.7558203",
"0.7555904",
"0.75477433",
"0.7546802",
"0.7539527",
"0.75342923",
"0.75293905",
"0.7525497",
"0.7524463"
] | 0.8092446 | 15 |
Test cli = new Test(); cli.callService(); System.out.println(257&0x00000100); | public static void main(String[] args) throws Exception{
Date currentTime = new Date(95,7,6);
SimpleDateFormat formatter = new SimpleDateFormat("dd/MMM/YYYY");
String dateString = formatter.format(currentTime);
System.out.println(dateString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int method_2686(int var0) {\r\n return var0 & 7;\r\n }",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n int int0 = JavaCharStream.hexval('b');\n assertEquals(11, int0);\n }",
"public static void test() {\n\t\tbyte[] get = makeACommandByte(1,(byte) 0x01, (byte) 0x03);\n\t\tfor (int i = 0; i < get.length; i++) {\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tint a=0x10017FDC;\n\t\ta=a>>13;\n\t\tSystem.out.println(a);\n\t\tint b=0x0800B;\n\t\tSystem.out.println(b);\n\t}",
"public static void main(String[] args) {\n\t\tint i=10;\n\t\tSystem.out.println(Integer.toBinaryString(i));\n\t\tSystem.out.printf(\"%d --> %s \\n\",i<<1,Integer.toBinaryString(i<<1));\n\t\tSystem.out.printf(\"%d --> %s \\n\",i>>1, Integer.toBinaryString(i>>1));\n\t\t\n\t\tSystem.out.println(i&(1<<0));\n\t}",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n int int0 = JavaCharStream.hexval('a');\n assertEquals(10, int0);\n }",
"@Test(timeout = 4000)\n public void test117() throws Throwable {\n int int0 = JavaCharStream.hexval('7');\n assertEquals(7, int0);\n }",
"public static void main(String[] args) {\n\n\t\tint bitmask = 0xF0F0;\n\t\tint value = 0x0000;\n\t\tSystem.out.println(bitmask ^ value); // Prints 0xF0F0 = 61680\n\n\t\tbitmask = 0xF0F0;\n\t\tvalue = 0x0F0F;\n\t\tSystem.out.println(bitmask ^ value); // Prints 0xFFFF = 65535\n\n\t\tbitmask = 0xF0F0;\n\t\tvalue = 0xF0F0;\n\t\tSystem.out.println(bitmask ^ value); // Prints 0\n\t}",
"public boolean \ngetFlag( int pFlagNumber ) {\n return ( (fFlagBox & (1 << pFlagNumber)) != 0 );\n}",
"@Test(timeout = 4000)\n public void test106() throws Throwable {\n int int0 = JavaCharStream.hexval('B');\n assertEquals(11, int0);\n }",
"void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }",
"public static int method_2711(int var0) {\r\n return var0 & 3;\r\n }",
"void ReadStatusByte(int boardID, short addr, ShortByReference result);",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n int int0 = JavaCharStream.hexval('8');\n assertEquals(8, int0);\n }",
"@Test\n public void testAddress()\n {\n System.out.println(\"address\");\n int addr = 16893;\n System.out.println(N2TCode.address(addr));\n System.out.println(Integer.toBinaryString(addr));\n }",
"@Test(timeout = 4000)\n public void test125() throws Throwable {\n int int0 = JavaCharStream.hexval('0');\n assertEquals(0, int0);\n }",
"static int isolateBit(int n){\n return n & (-n);\n }",
"public static void main(String[] args) {\n\t\tObject obj = \"数据\";\n\t\tint h = obj.hashCode();\n\t\tSystem.out.println(h);\n\t\tSystem.out.println(h >>> 16);\n\n\t}",
"void mo7381b(C1320b bVar) throws RemoteException;",
"@Test(timeout = 4000)\n public void test074() throws Throwable {\n int int0 = JavaCharStream.hexval('c');\n assertEquals(12, int0);\n }",
"public int bitAt(int i) {\n // PUT YOUR CODE HERE\n }",
"void mo7382b(C1320b bVar, String str) throws RemoteException;",
"private int getLowTenBitNumber(int num) {\n return num & 1023;\n }",
"private void sumbit(String ip){\n }",
"@Test(timeout = 4000)\n public void test071() throws Throwable {\n int int0 = JavaCharStream.hexval('f');\n assertEquals(15, int0);\n }",
"@Test(timeout = 4000)\n public void test118() throws Throwable {\n int int0 = JavaCharStream.hexval('6');\n assertEquals(6, int0);\n }",
"void mo7383c(C1320b bVar, String str) throws RemoteException;",
"@Test(timeout = 4000)\n public void test102() throws Throwable {\n int int0 = JavaCharStream.hexval('F');\n assertEquals(15, int0);\n }",
"@Ignore\n @Test\n public void testgetMostSignificantSevenBits() {\n final int v = MidiReceiver.getMsbOf14ValidBits(0b11111111);\n assertEquals(0b1, v);\n }",
"private native int cmdXfer0(byte[] request, byte[] response);",
"@Test\n public void test2(){\n\n String s =\"1000000000000001\";\n //s = BinaryCalculate.BinaryArithmeticalRightShift(s,1);\n s = BinaryCalculate.BinaryLogicRightShift(s,1);\n int a = BitConversion.fromBinaryStringToInt(s);\n System.out.println(a);\n }",
"void mo7386e(C1320b bVar, String str) throws RemoteException;",
"void mo7373a(C1320b bVar) throws RemoteException;",
"@Test(timeout = 4000)\n public void test107() throws Throwable {\n int int0 = JavaCharStream.hexval('A');\n assertEquals(10, int0);\n }",
"@Test(timeout = 4000)\n public void test072() throws Throwable {\n int int0 = JavaCharStream.hexval('e');\n assertEquals(14, int0);\n }",
"@DISPID(1) //= 0x1. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n short count16();",
"public static void main(String[]args){\n \r\n print_binary(15);//Print the integer in binary form using interations\r\n }",
"void mo7378a(C1320b bVar, String str) throws RemoteException;",
"@Test(timeout = 4000)\n public void test119() throws Throwable {\n int int0 = JavaCharStream.hexval('5');\n assertEquals(5, int0);\n }",
"public static void main(String[] args) {\n \r\n\t\tSystem.out.println(new b16().raiseToPower(2, 5));\r\n\t}",
"java.lang.String getServiceCmd();",
"@Test(timeout = 4000)\n public void test105() throws Throwable {\n int int0 = JavaCharStream.hexval('C');\n assertEquals(12, int0);\n }",
"public static int getBit(byte input,int position){\n return (input >> position) & 1;\n }",
"@Test(timeout = 4000)\n public void test121() throws Throwable {\n int int0 = JavaCharStream.hexval('3');\n assertEquals(3, int0);\n }",
"@Override\n public boolean hasServiceCmd() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"@Test(timeout = 4000)\n public void test120() throws Throwable {\n int int0 = JavaCharStream.hexval('4');\n assertEquals(4, int0);\n }",
"@Override\n public boolean hasServiceCmd() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"private static void testShift() {\n for (int a:new int[]{96754441, -206107026, 803362655, Integer.MIN_VALUE+1}) {\n System.out.println(\"<<\");\n for (int i=0;i<=32;i++) {\n System.out.println(intToBin(a<<i) + \" \" + (a<<i));\n }\n System.out.println();\n System.out.println(\">>\");\n for (int i=0;i<=32;i++) {\n System.out.println(intToBin(a>>i) + \" \" + (a>>i));\n }\n System.out.println();\n System.out.println(\">>>\");\n for (int i=0;i<=32;i++) {\n System.out.println(intToBin(a>>>i) + \" \" + (a>>>i));\n }\n System.out.println();\n }\n }",
"public static void main(String[] args) {\n\t\tint n = (18 & 4) * (19 & 5);\r\n\t\tint a = (19 & 5);\r\n\t\tSystem.out.println(n);\r\n\t\tSystem.out.println(a);\r\n\t}",
"@Test\n\tpublic void getByteOf_Test() {\n\t\tfinal short value = 8738;\n\t\t\n\t\t// Should be 0010 0010 = 34\n\t\tfinal byte value0 = FlagUtils.getByteOf(value, 0);\n\t\tassertThat(value0, is((byte) 34));\n\t\t\n\t\t// The same like above\n\t\tfinal byte value1 = FlagUtils.getByteOf(value, 1);\n\t\tassertThat(value1, is((byte) 34));\n\t}",
"@Test(timeout = 4000)\n public void test115() throws Throwable {\n int int0 = JavaCharStream.hexval('9');\n assertEquals(9, int0);\n }",
"int inputBit(){\n if (position == 0)\r\n try{\r\n buf = System.in.read();\r\n if (buf < 0){ return -1;\r\n }\r\n \r\n position = 0x80;\r\n }catch(IOException e){\r\n System.err.println(e);\r\n return -1;\r\n }\r\n int t = ((buf & position) == 0) ? 0 : 1;\r\n position >>= 1; \r\n return t;\r\n }",
"public int getFlags();",
"public int getFlags();",
"public static void main(String[] args) {\n int x = 7;\n System.out.println(new BinaryNumberOfOnes().convert(x));\n }",
"void mo7385d(C1320b bVar, String str) throws RemoteException;",
"@Test(timeout = 4000)\n public void test122() throws Throwable {\n int int0 = JavaCharStream.hexval('2');\n assertEquals(2, int0);\n }",
"public static void main(String[] args) {\n\t\tint num4=0B11111111111111111111111111111011;\r\n\t\tbyte num1=0B00000101;\r\n\t\tint num2=0B1111111111111011;\r\n\t\tSystem.out.println(num4);\r\n\t\tSystem.out.println((short)num2);\r\n\t}",
"@Test(timeout = 4000)\n public void test103() throws Throwable {\n int int0 = JavaCharStream.hexval('E');\n assertEquals(14, int0);\n }",
"long getFlags();",
"@Test(timeout = 4000)\n public void test123() throws Throwable {\n int int0 = JavaCharStream.hexval('1');\n assertEquals(1, int0);\n }",
"public static void main(String[] args) {\n\t\tint num = 8;\n\t\tint a = num & 1;\n\t\tSystem.out.println(a);\n\t\tif(a>0)\n\t\t\tSystem.out.println(\"Odd!\");\n\t\telse\n\t\t\tSystem.out.println(\"Even!\");\n\t}",
"@Test(timeout = 4000)\n public void test104() throws Throwable {\n int int0 = JavaCharStream.hexval('D');\n assertEquals(13, int0);\n }",
"public static void main(String[] args) {\n byte b1=125;\n System.out.println(b1);\n byte b2=(byte)129;\n System.out.println(b2);\t\t\n\t}",
"public static void main(String[] args) {\n int num = 4;\r\n byte b =(byte) num;\r\n System.out.println(b);\r\n\t}",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n int int0 = JavaCharStream.hexval('d');\n assertEquals(13, int0);\n }",
"int getResponsePort();",
"public static void main(String[] args) {\n\t\tbyte c = 20; //0x14\r\n\t\tbyte d = -8; //0xf8\r\n\t\t\r\n\t\tSystem.out.println(\"[시프트 연산 결과]\");\r\n\t\tSystem.out.println(c<<2);//c값을 2비트 왼쪽 시프트\r\n\t\tSystem.out.println(c>>2);//c값을 2비트 오른쪽 시프트, 왼쪽에 최상위 비트 0삽입(양수)\r\n\t\tSystem.out.println(d>>2);//d값을 2비트 오른쪽 시프트, 왼쪽에 최상위 비트 1삽입(음수)\r\n\r\n\t\r\n\t\tSystem.out.printf(\"%04x\\n\", d);//shift이전의 값 00 f \t 8\r\n\t\t\t\t\t\t\t\t\t //\t\t\t \t1111 1000 ->(00삽입)0011 1110(삭제00\r\n\t\t\r\n\t\tSystem.out.printf(\"%x\\n\", (byte)(d>>>2));\r\n\t\t\r\n\t\tSystem.out.printf(\"%x\\n\", (int)d);//fffffff8\r\n\t\tSystem.out.printf(\"%x\\n\", (d>>>2));\r\n\t\tSystem.out.printf(\"%x\\n\", (d>>>2));//d를 2비트 오른쪽 시프트, 왼쪽에 무조건 0이 삽입됨\r\n\t\t// 3 f f f f f f e (int타입으로 변환됨)\r\n\t\t//0011 1111 1111 1111 1111 1111 1111 1110\r\n\t\t//1111\t1111 1111 1111 1111 1111 1111 1000((int)d)\r\n\t\t//0011\t1111 1111 1111 1111 1111 1111 1110(d>>>2)\r\n\t}",
"private static int[] decodeControlByte(byte b) {\n int[] res = new int[4];\n byte slicer = 3;\n for (int i = 3; i >= 0; --i) {\n res[i] = (b & slicer) + 1;\n b >>= 2;\n }\n return res;\n }",
"short getP( byte[] buffer, short offset );",
"static void andOp(){\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Ingrese el primer numero binario: \");\n String bin1 = scanner.nextLine();\n\n System.out.print(\"Ingrese el segundo numero binario: \");\n String bin2 = scanner.nextLine();\n\n int A = Integer.parseInt(bin1,2);\n int B = Integer.parseInt(bin2,2);\n\n System.out.print(\"A & B = \" + (A & B));\n }",
"int getServiceNum();",
"public static void main(String[] args) {\n\t\tSystem.out.println(rangeBitwiseAnd(10, 13));\r\n\t}",
"public static void main(String[] args) {\n\t\tint num = 0B00000101;\t//5의 8비트 2진수\n\t\t\n\t\tSystem.out.println(num<<2);\t//왼쪽으로 2비트 이동 00010100(20)\n\t\tSystem.out.println(num>>2);\t//오른쪽으로 2비트 이동00000001(1)\n\t\tSystem.out.println(num>>>2);\t//오른쪽으로 2비트 이동00000001(1)\n\t\t\n\t\tSystem.out.println(num);\t//num에 아무 값도 대입하지 않았으므로 5 출력\n\t\tnum<<=2;\t//2비트 이동한 값을 num에 대입\n\t\tSystem.out.println(num);\n\t}",
"public static void main(String[] args) {\nshort i = 128;\r\nbyte shortToByte = (byte)i;\r\nSystem.out.println(shortToByte);\r\nbyte t = 127;\r\nt++;\r\nSystem.out.println(t);\r\nt++;\r\nSystem.out.println(t);\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tbyte no;\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"enter no\");\n\t\tno = sc.nextByte();\n\t\tbyte temp;\n\t\t\t\n\t\tfor (byte i = 7; i >=0; i--) {\n\n\t\t\tbyte fb = (byte) ((1) << i);\n\t\t\ttemp = (byte) (no & fb);\n\t\t\tif(temp!=0){\n\t\t\t\tSystem.out.print(\"1\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(\"0\");\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\t short s = 1;\n\t\t byte c = 1;\n\t\t int i = 1;\n\t\t printIntBinary(i);\n\t\t \n\t}",
"public int getTypeArgumentIndex() {\n/* 440 */ return this.value & 0xFF;\n/* */ }",
"public int getAnalysisBits();",
"int mo27483b();",
"void mo7379a(C1320b bVar, String str, String str2) throws RemoteException;",
"private static int colorspaceSh(int s) {\r\n return (s << 16);\r\n }",
"public void grabBits(int n) {\n\t\tproc = data.grabBits(n);\n\t}",
"public void onReadShortBegin(ICPU cpu, int addr) {\n\t}",
"public short getSak() { throw new RuntimeException(\"Stub!\"); }",
"@Test\n public void testListen_int() throws Exception {\n System.out.println(\"listen\");\n int p = 4000;\n instance.listen(p);\n }",
"void mo7303a(C1070b bVar);",
"IntsRef getFlags();",
"byte mo30283c();",
"void mo7374a(C1320b bVar, int i, int i2, int i3, String str) throws RemoteException;",
"public abstract void mo9246b(C0707b bVar);",
"@Test\n\tpublic void getByteOf_Test2() {\n\t\tfinal short value = 8930;\n\t\t\n\t\t// Should be 1110 0010 = -30\n\t\tfinal byte value0 = FlagUtils.getByteOf(value, 0);\n\t\tassertThat(value0, is((byte) -30));\n\t\t\n\t\t// Should be 0010 0010 = 34\n\t\tfinal byte value1 = FlagUtils.getByteOf(value, 1);\n\t\tassertThat(value1, is((byte) 34));\n\t}",
"public static void main(int a) {\n// System.out.println(~43);\n int bit []=new int[8];\n for (int i = 7; i >=0;){\n\n\n\n }\n\n}",
"short getDP1( byte[] buffer, short offset );",
"static void xri_with_acc(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(passed.substring(4));\n\t\tval1 = val1&val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}",
"int getLowBitLength();",
"int getCmd();",
"void mo7354b(C1655s sVar);",
"public char flags_GET()\n { return (char)((char) get_bytes(data, 0, 1)); }",
"public int IMMBYTE() {\n int reg = ROP_ARG(konami.pc);\n konami.pc = konami.pc + 1 & 0xFFFF;\n return reg & 0xFF;//insure it returns a 8bit value\n }",
"@Test(timeout = 4000)\n public void test10() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n fBProcedureCall0.addParam(67, \"%]qQ?:K_R=|u!\\\"\");\n fBProcedureCall0.registerOutParam((-1), (-1));\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.getOutputParam((-1));\n assertEquals(67, fBProcedureParam0.getPosition());\n assertEquals((-1), fBProcedureParam0.getType());\n }"
] | [
"0.55119145",
"0.5383482",
"0.5348717",
"0.5329167",
"0.5228785",
"0.52198",
"0.5196467",
"0.5163856",
"0.512699",
"0.51171464",
"0.50930166",
"0.5085551",
"0.50767475",
"0.5046274",
"0.50055766",
"0.50012326",
"0.4995292",
"0.4975378",
"0.49587783",
"0.49375597",
"0.49214044",
"0.49167812",
"0.49125084",
"0.49020147",
"0.49011502",
"0.48961535",
"0.48839325",
"0.48685578",
"0.48534578",
"0.48497474",
"0.48464623",
"0.48421937",
"0.48364422",
"0.48218316",
"0.48170152",
"0.4815059",
"0.47932926",
"0.47926152",
"0.47881833",
"0.47863045",
"0.47639957",
"0.47599012",
"0.47569844",
"0.47517857",
"0.47477654",
"0.47412458",
"0.47388607",
"0.47351944",
"0.47175232",
"0.4711072",
"0.47072667",
"0.47070414",
"0.47056815",
"0.47056815",
"0.4703274",
"0.4696191",
"0.4695135",
"0.46944046",
"0.46813923",
"0.46676466",
"0.46654242",
"0.46519676",
"0.46491227",
"0.46463442",
"0.46454203",
"0.46450347",
"0.46442437",
"0.46375325",
"0.46306312",
"0.46286467",
"0.46255377",
"0.46245328",
"0.462023",
"0.4604833",
"0.45994458",
"0.45912114",
"0.45876718",
"0.45837748",
"0.45720273",
"0.45712414",
"0.45570767",
"0.4554392",
"0.45523545",
"0.45497957",
"0.45485857",
"0.45483848",
"0.4545917",
"0.45457032",
"0.4543158",
"0.45408195",
"0.45400652",
"0.45391092",
"0.45372677",
"0.45356908",
"0.45279983",
"0.4520524",
"0.45172778",
"0.45144996",
"0.45108464",
"0.45013496",
"0.45012513"
] | 0.0 | -1 |
here it's similar to RequestListener, but with less information (e.g. no model available) | @Override public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> animation) {
super.onResourceReady(resource, animation);
// here you can be sure it's already set
detectLight(BitmapHelper.readBitmapFromImageView(panoramaImageView), 45);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"public interface RequestListener {\n\n /**\n * Called when a request completes with the given response. Executed by a\n * background thread: do not update the UI in this method.\n */\n public void onComplete(Bundle data);\n\n /**\n * Called when a request has a network or request error. Executed by a\n * background thread: do not update the UI in this method.\n */\n public void onException(RequestException e);\n\n public void onCancel();\n}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}",
"public interface OnRequestDetailsListen {\n}",
"public interface IServerResponseListener {\n\n\t/**\n\t * Receive requested \n\t * \n\t * @param requestId the same id number as the request* method that caused\n\t * \tthis request returned\n\t * @param data raw data, allways a List<RequestedModelType>\n\t */\n\tpublic void onServerResponse(int requestId, Object data);\n\t\n}",
"@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}",
"public interface RequestItemListener extends ImageObtainable {\n\n\t\t/**\n\t\t * Request detail information to be presented\n\t\t * about the specific request.\n\t\t * @param request request to get detail \n\t\t */\n\t\tpublic void onRequestSelected(CustomerRequest request);\n\n\t\t/**\n\t\t * Assign the staffmember to handle the request.\n\t\t * @param request request to handle \n\t\t * @param staff staff member to assign to request\n\t\t */\n\t\tpublic void onAssignStaffToRequest(CustomerRequest request, String staff);\n\n\t\t/**\n\t\t * Removes a request. Request is removed completely from this \n\t\t * list. This is a notification method \n\t\t * @param request String\n\t\t */\n\t\tpublic void onRemoveRequest(CustomerRequest request);\n\n\t\t/**\n\t\t * Used to get the most recent up to date list of items to show.\n\t\t * Cannot return null\n\t\t * @return List of requests to show\n\t\t */\n\t\tpublic List<CustomerRequest> getCurrentRequests();\n\n\t}",
"@Override\n public void receiveRequest(final Request request) {\n\n }",
"public RequestListenerMessageEventHandler(RequestListener requestListener) {\n super(Message.STUN_REQUEST, requestListener);\n }",
"public interface IListenModel {\n\n void loadListen(Context context, boolean isFirst, String type, String page, OnListenListener listenListener);\n\n void loadListen(Context context, boolean isFirst, String page, OnListenListener listenListener);\n}",
"@Override\n\tpublic void receiveRequest() {\n\n\t}",
"public interface RequestFailureListener {\n\n /**\n * Gets called when a Request fails.\n *\n * @param e\t\tthe event\n */\n public void requestFailed(RequestFailureEvent e);\n}",
"public void handleRequest(Request req) {\n\n }",
"public void request() {\n }",
"private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}",
"public interface OnInterceptListener {\n\n /**\n * This method is fired when new request comes\n *\n * @param url url of the request\n * @param requestBody request body\n * @param responseBody response body\n */\n void onInterceptRequest(String url, String requestBody, String responseBody);\n\n /**\n * This method is fired if interception failed due to some reasons\n */\n void onInterceptFailed();\n\n}",
"@Override\n\tpublic void getListener(){\n\t}",
"public interface RequestListener {\n\n public static final int EVENT_NETWORD_EEEOR = 1;\n public static final int EVENT_CLOSE_SOCKET = 2;\n public static final int EVENT_GET_DATA_EEEOR = 3;\n public static final int EVENT_NOT_NETWORD = 4;\n public static final int EVENT_GET_DATA_SUCCESS = 5;\n\n\n public void action(int i, Object object);\n\n}",
"public interface EventListener {\n void onMessage(GenericRequest message);\n}",
"public interface IRequest {\n\n void onRequestStart();\n void onRequestEnd();\n}",
"public interface IRequest {\n void onRequestStart();\n\n void onRequestEnd();\n\n}",
"public void setRequestListener(IRequestListener requestListener) {\n this.requestListener = requestListener;\n }",
"private synchronized void onRequest(ObjectMessage message) {\n try {\n Serializable request = message.getObject(); //serializer.requestFromString(message.getText());\n activeRequests.put(request, message);\n requestListener.receivedRequest(request);\n } catch (JMSException ex) {\n Logger.getLogger(AsynchronousReplier.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public interface OnApiRequestListener {\n\n void onApiRequestBegin(final String action);\n void onApiRequestSuccess(final String action, final Object result);\n void onApiRequestFailed(final String action, final Throwable t);\n}",
"void onHTTPRequest(HTTPRequest request, HTTPResponse response);",
"protected void onBeginRequest()\n\t{\n\t}",
"private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}",
"public interface RequestCallbackListener {\n public void notifyToCaller(boolean isExecuted,Object obj);\n}",
"public interface ModelListener {\n\n /**\n * actualise le listener\n * @param src l'Object a actualiser\n */\n public void update(Object src);\n\n}",
"public interface SpiderListener {\n\n public void onSuccess(Request request);\n\n public void onError(Request request, Throwable e);\n \n public void onAddRequestException(int pushResult, Request request);\n\n\tpublic void onExitWhenComplete();\n\n\tpublic void onWaitWhenComplete();\n}",
"@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}",
"private void onPreRequestData(int tag) {\n }",
"@Override\n\tpublic void initRequest() {\n\n\t}",
"public interface IRequest<T, O> {\r\n /**\r\n * Call back interface method for processing the Server Request\r\n *\r\n * @param requestInfo - RequestInfo Object which holds all the required Request Details\r\n */\r\n void processRequest(RequestInfo<T, O> requestInfo, Class<T> TClass, Class<O> OClass, boolean invalidateCache);\r\n\r\n void registerListener(INetworkListener networkListener);\r\n\r\n boolean cancelRequest();\r\n}",
"protected void onPrepareRequest(HttpUriRequest request) throws IOException {\n\t\t// Nothing.\n\t}",
"public interface OnRequestFinishListener {\n void onRequestFinish();\n}",
"@FunctionalInterface\r\npublic interface RequestListener {\r\n\t/**\r\n\t * Called after a request has been handled.\r\n\t * May change the output.\r\n\t * \r\n\t * @param member The user who made the request\r\n\t * @param input The variables that make up the request\r\n\t * @param output The reply to be sent to the user (can be null)\r\n\t */\r\n\tvoid onRequest(Member member, Map<String, ?> input, JSONObject output);\r\n}",
"@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public boolean isRequest() {\n return false;\r\n }",
"public interface RequestListener<T> {\n\n void startScan(BleScanCallback<T> callback, long scanPeriod);\n\n void stopScan();\n\n boolean connect(T device, BleConnectCallback<T> callback);\n\n boolean connect(String address, BleConnectCallback<T> callback);\n\n void notify(T device, BleNotifyCallback<T> callback);\n\n void cancelNotify(T device, BleNotifyCallback<T> callback);\n\n void enableNotify(T device, boolean enable, BleNotifyCallback<T> callback);\n\n void enableNotifyByUuid(T device, boolean enable, UUID serviceUUID, UUID characteristicUUID, BleNotifyCallback<T> callback);\n\n void disconnect(T device);\n\n void disconnect(T device, BleConnectCallback<T> callback);\n\n boolean read(T device, BleReadCallback<T> callback);\n\n boolean readByUuid(T device, UUID serviceUUID, UUID characteristicUUID, BleReadCallback<T> callback);\n\n boolean readRssi(T device, BleReadRssiCallback<T> callback);\n\n boolean write(T device, byte[] data, BleWriteCallback<T> callback);\n\n boolean writeByUuid(T device, byte[] data, UUID serviceUUID, UUID characteristicUUID, BleWriteCallback<T> callback);\n\n void writeEntity(T device, final byte[] data, int packLength, int delay, BleWriteEntityCallback<T> callback);\n\n void writeEntity(EntityData entityData, BleWriteEntityCallback<T> callback);\n\n void cancelWriteEntity();\n\n boolean setMtu(String address, int mtu, BleMtuCallback<T> callback);\n\n}",
"public void onRequestResponse(Response response) { }",
"public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}",
"public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }",
"public interface HttpListener {\r\n /**\r\n * 请求成功\r\n * @param response 响应数据\r\n */\r\n void onSucceed(Response response);\r\n\r\n /**\r\n * 请求失败\r\n * @param e\r\n */\r\n void onFailed(Exception e);\r\n}",
"public void addRequestListener(RequestListener listener) {\n addMessageListener(new RequestListenerMessageEventHandler(listener));\n }",
"private void onRequestData(int tag) {\n \ttry {\n \t data = request.request();\n \t} catch(MatjiException e) {\n \t lastOccuredException = e;\n \t}\n }",
"public interface OnDataRequestListener {\n\n void onDataError();\n void requestData();\n void onCompleted();\n\n}",
"@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}",
"public interface GetMovieListener\n{\n void movieGet(Movie movie);\n}",
"public void get(IRequest request, IHttpListener listener) {\n if (request != null) {\n request.getParams().getGetBuilder().url(request.getUrl()).id(request.getRequestId()).\n build().execute(new HttpResponse(listener, request.getParserType()));\n } else {\n throw new RuntimeException(\"Request param is null\");\n }\n }",
"void requestReceived( C conn ) ;",
"@Override\n\tprotected void setListener() {\n\n\t}",
"@Override\n\tprotected void setListener() {\n\n\t}",
"protected void registerListener() {\r\n\t\t// do nothing\r\n\t}",
"void handleRequest();",
"public interface OnLoadListener {\n void loadSuccess(NewModel newModel);\n\n void loadFailed(String tips);\n}",
"public interface RequestFunction {}",
"public interface IFourModel {\n void getServerData(IHttpCompleteListener iHttpCompleteListener);\n FourBean getFourBean();\n}",
"public interface Request {\n}",
"@Override\n public void onNext(RequestData request) {\n System.out.println(\"Requestor:\" + request.getName());\n System.out.println(\"Request Message:\" + request.getMessage());\n }",
"@Override\r\npublic void requestInitialized(ServletRequestEvent arg0) {\n\t\r\n}",
"@Override\n\tprotected void updateTargetRequest() {\n\t}",
"private void setListener() {\n\t}",
"void load(Request req);",
"public void startApiRequest(Request request, RequestManager.RequestListener listener) {\n mRequestManager.execute(request, listener);\n mRequestList.add(request);\n Log.d(TAG, \"startApiRequest(): list size: \" + mRequestList.size());\n }",
"public void setModel(RequestServerForService m) { this.model = m; }",
"public interface PlacementRequestListener {\n \n void onRequestComplete(boolean isFound, Placement placement);\n\n void onRequestError(String error);\n}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"void addListener(@Nonnull final ServletRequestAttributeListenerInfo info)\n {\n final ServletRequestAttributeListener service = info.getService(bundle);\n if (service != null)\n {\n this.requestAttributeListeners.put(info.getServiceReference(),\n service);\n }\n }",
"@Override\n\tprotected void initListener() {\n\n\t}",
"public void turnOnListenInitialValuesRequest()\n\t{\n\t\tlistenInitialValuesRequest = true;\n\t}",
"private Request() {}",
"private Request() {}",
"public interface UpdateTaskDetailRequestListener {\n void onTaskDetailUpdated(ApiResponseModel response, NicbitException e);\n}",
"public void addListenerNotify(PersistRequestBean<?> request) {\n if (listenerNotify == null) {\n listenerNotify = new ArrayList<>();\n }\n listenerNotify.add(request);\n }",
"@Override\n\tpublic void setListener() {\n\n\t}",
"public void addRequest(Request req) {\n\n }",
"public interface HttpGetHandler {\n void setListener(HttpGetResponseListener listener);\n void execute(String url, String tag);\n void cancelRequest(String tag);\n void unregisterListener();\n}",
"public interface GetPointsListener extends Listener {\n\n public void onGetPointsSucc(PointsInfo info);\n}",
"public void setRequest(GhRequest param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(GhRequest param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }",
"public void setRequest(Request param) {\r\n localRequestTracker = param != null;\r\n\r\n this.localRequest = param;\r\n }"
] | [
"0.6917111",
"0.68642",
"0.6704476",
"0.6568008",
"0.6476404",
"0.646121",
"0.64275384",
"0.64176613",
"0.6266916",
"0.6242223",
"0.61933017",
"0.6144009",
"0.60576206",
"0.6046902",
"0.6029277",
"0.6012329",
"0.59611994",
"0.5940523",
"0.59398454",
"0.5924348",
"0.59199655",
"0.58971494",
"0.5895014",
"0.5889641",
"0.5885862",
"0.588144",
"0.58580875",
"0.5855635",
"0.5833398",
"0.5823003",
"0.5822286",
"0.5817058",
"0.58150864",
"0.58039427",
"0.5791586",
"0.5784746",
"0.577131",
"0.5769256",
"0.57649165",
"0.575987",
"0.5752198",
"0.5750547",
"0.5736227",
"0.5734587",
"0.57287145",
"0.57222706",
"0.5722187",
"0.57163507",
"0.56894594",
"0.56894326",
"0.5688275",
"0.5683666",
"0.5661744",
"0.5661744",
"0.5640613",
"0.5636212",
"0.56106484",
"0.5608867",
"0.5605205",
"0.55888456",
"0.55711955",
"0.55691004",
"0.55651265",
"0.5564616",
"0.5555036",
"0.55476546",
"0.554511",
"0.5539001",
"0.5538284",
"0.5538284",
"0.5536962",
"0.55342436",
"0.55203754",
"0.55180484",
"0.55180484",
"0.55106705",
"0.55086035",
"0.55045927",
"0.54954004",
"0.54897386",
"0.5469042",
"0.54689986",
"0.54689986",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022",
"0.5466022"
] | 0.0 | -1 |
Constructs a new action for the given repository view. | public OpenAction(BasicRepositoryView view) {
super(view);
this.setText("Open Artifact");
this.setToolTipText("Open Artifact");
this.setImageDescriptor(artifactImage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"GrabActionController createGrabActionController(PersistentView view);",
"private View create(PersistedView pView) {\n DsmSorting sorting = nameToSorting.get(pView.dsmSortingName);\n if (null == sorting) {\n sorting = DsmSorting.values()[0];\n }\n\n View view = new View();\n view.setName(decodeString(pView.name));\n view.setSorting(sorting);\n\n return view;\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"View createView();",
"@Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getActionCommand() == \"purchaser\") {\r\n ViewPurchaser viewPurchaser = new ViewPurchaser(purchaserDAO, purchaserBLL);\r\n }\r\n if (e.getActionCommand() == \"product\") {\r\n ViewProduct viewProduct = new ViewProduct(productBLL, productDAO, categoryBLL, categoryDAO, supplierBLL, supplierDAO);\r\n }\r\n if (e.getActionCommand() == \"category\") {\r\n ViewCategory viewCategory = new ViewCategory(categoryDAO, categoryBLL);\r\n }\r\n if (e.getActionCommand() == \"reforder\") {\r\n ViewReforder viewReforder = new ViewReforder(reforderDAO, reforderBLL);\r\n }\r\n if (e.getActionCommand() == \"order\") {\r\n ViewOrder viewOrder = new ViewOrder(orderDAO, orderBLL);\r\n }\r\n if (e.getActionCommand() == \"supplier\") {\r\n ViewSupplier viewSupplier = new ViewSupplier(supplierDAO, supplierBLL);\r\n }\r\n if (e.getActionCommand() == \"create\") {\r\n ViewCreateOrder viewCreateOrder=new ViewCreateOrder(purchaserBLL,purchaserDAO,productBLL,productDAO,orderBLL,orderDAO,reforderBLL,reforderDAO);\r\n }\r\n }",
"public ReuseAction(FragmentRepositoryView view) {\r\n\t\tsuper(view);\r\n\t\tthis.setText(\"Reuse Fragment\");\r\n\t\tthis.setToolTipText(\"Reuse the selected fragment\");\r\n\t\tthis.setImageDescriptor(useFragmentImage);\r\n\t\tthis.setEnabled(true);\r\n\t}",
"View mo73990a(View view);",
"public ViewFinalFixAction() {\n this.viewData = new StudioFinalFixDTO();\n }",
"ViewComponent createViewComponent();",
"protected ViewActionPluginJPFImpl createInstance(IExtension extension) {\n return new ViewActionPluginJPFImpl(editorKit, view, extension);\n }",
"public abstract ArchECoreView newView(ArchECoreArchitecture architecture) throws ArchEException;",
"public void createAction() {\n }",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"public Action newAction(Object data) throws Exception;",
"@Override\r\n\tpublic String getActionURL(String oid, String view, String action) {\n\t\treturn null;\r\n\t}",
"@Override\n protected void commitCreates(ViewImpl view, ObjectInstance oi)\n {\n }",
"@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}",
"WithCreate withRepoUrl(String repoUrl);",
"public DocumentoVinculadoAction() {\n }",
"ViewCreator get(String userName);",
"@objid (\"9a6323cb-12ea-11e2-8549-001ec947c8cc\")\n private static MHandler createAndActivateHandler(MCommand command, IModule module, IModuleAction action, MPart view) {\n Object handler = new ExecuteModuleActionHandler(module, action);\n // Fit it into a MHandler\n MHandler mHandler = MCommandsFactory.INSTANCE.createHandler();\n mHandler.setObject(handler);\n // mHandler.setElementId(command.getElementId().replace(\"command\",\n // \"handler\"));\n // Bind it to the corresponding command\n mHandler.setCommand(command);\n // Define scope of this handler as the browser view.\n view.getHandlers().add(mHandler);\n return mHandler;\n }",
"private Response createActivityView(String scopeName, String roleName, Integer activityId, String tripId, Integer reportId, boolean withHistory, HttpServletRequest request, ActivityViewEnum view) throws ServiceException {\n String username = request.getRemoteUser();\n List<Dataset> datasets = usmService.getDatasetsPerCategory(USMSpatial.USM_DATASET_CATEGORY, username, USMSpatial.APPLICATION_NAME, roleName, scopeName);\n return createSuccessResponse(activityService.getFishingActivityForView(activityId, tripId, reportId, datasets, view, withHistory));\n }",
"DomainAction createDomainAction();",
"public PSActionBar(PSContentExplorerApplet applet, JMenuBar menu, String view,\n PSRelationshipInfoSet relationships, IPSViewChangeListener listener)\n {\n if(applet == null)\n throw new IllegalArgumentException(\"applet may not be null.\");\n\n if(!PSUiMode.isValidView(view))\n throw new IllegalArgumentException(\"view is not valid\");\n\n if(view.equals(PSUiMode.TYPE_VIEW_DT) &&\n (relationships == null || !relationships.getComponents().hasNext()))\n {\n throw new IllegalArgumentException(\n \"relationships may not be null or empty for \" +\n PSUiMode.TYPE_VIEW_DT + \" view\");\n }\n \n m_applet = applet;\n m_view = view;\n m_pathLabelField.setFocusable(true);\n m_resultsLabel.setFocusable(true);\n m_resultsLabel.setEditable(false);\n m_resultsLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n m_resultsLabel.setMinimumSize(new Dimension(0, 0));\n m_resultsLabel.setBorder(null);\n if (listener!=null)\n addViewChangeListener(listener);\n\n init(menu, relationships); \n }",
"public ActivityMenuEditController(final Model model, final View view) {\n\t\tsuper(model, view);\n\t}",
"private View() {}",
"public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}",
"public NewSubclassAction(ClassView view, ClassBrowser classBrowser, InteractionListener interactionListener)\n {\n this();\n this.superclass = view;\n this.classBrowser = classBrowser;\n this.interactionListener = interactionListener;\n }",
"public PutRepositoryRequestBuilder(ElasticsearchClient client, PutRepositoryAction action) {\n super(client, action, new PutRepositoryRequest());\n }",
"private void buildViewMenu(){\n //Create a Run Payroll menu item\n viewItem = new JMenuItem(\"View CS History\");\n viewItem.setMnemonic(KeyEvent.VK_H);\n viewItem.addActionListener(new ViewListener());\n \n //Create a JMenu object for the run menu\n viewMenu = new JMenu(\"View\");\n viewMenu.setMnemonic(KeyEvent.VK_V);\n \n //Add the item to the menu\n viewMenu.add(viewItem);\n }",
"public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}",
"private ViewFactory() {}",
"public AddApplicationReleaseAction() {\r\n }",
"public /* synthetic */ void lambda$new$3(View view) {\n if (this.currentType != 0) {\n this.currentType = 0;\n updateType();\n }\n }",
"CaseAction createCaseAction();",
"public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}",
"public VisitAction() {\n }",
"public ViewAction( View view, SgFrame parent, Session session )\r\n {\r\n super( view.getName(), getIconFromView( view ) );\r\n this.view = view;\r\n this.parent = parent;\r\n buttons = new ArrayList<AbstractButton>();\r\n this.session = session;\r\n notYetAddedViListener = true;\r\n session.addObjectSelectionChangeListener( this );\r\n putValue( \"toolTipText\", view.getShortDescription() );\r\n\r\n createdVIs = new HashMap<ViewInstance,SessionElementDescriptor>();\r\n\r\n setEnabled( view.isAutostartView() || view.canHandle( null ) );\r\n }",
"public void viewReference(ActionEvent actionEvent) {\n }",
"public PutRepositoryRequestBuilder(ElasticsearchClient client, PutRepositoryAction action, String name) {\n super(client, action, new PutRepositoryRequest(name));\n }",
"public GUIController(GUI view) {\n this();\n this.view = view;\n }",
"interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }",
"protected IAction createAction(IEvent event, String label, String assign)\n\t\t\tthrows RodinDBException {\n\t\tIAction action = event.createChild(IAction.ELEMENT_TYPE, null, null);\n\t\taction.setLabel(label, null);\n\t\taction.setAssignmentString(assign, null);\n\t\treturn action;\n\t}",
"public void onClick(View view) {\n View newView = null;\n ArgInfo newModel = new MapEntryArgInfo(componentTypes, activity, controller, view.getPaddingLeft() + padding);\n newModel.createView(\"\");\n subModels.add(newModel);\n newView = newModel.getMainView();\n views.add(newView);\n controller.addItems(newView);\n }",
"public ACTable(Component view) {\r\n super(view);\r\n }",
"public \n UnpackExtFactory\n (\n Path bundlePath, \n String author, \n String view, \n boolean releaseOnError, \n ActionOnExistence actOnExist,\n TreeMap<String,String> toolsetRemap,\n TreeMap<String,String> selectionKeyRemap,\n TreeMap<String,String> licenseKeyRemap,\n TreeMap<String,String> hardwareKeyRemap,\n NodeBundle bundle\n ) \n {\n pPath = bundlePath;\n\n pAuthor = author; \n pView = view; \n\n pReleaseOnError = releaseOnError;\n pActionOnExistence = actOnExist;\n pToolsetRemap = toolsetRemap;\n pSelectionKeyRemap = selectionKeyRemap;\n pLicenseKeyRemap = licenseKeyRemap;\n pHardwareKeyRemap = hardwareKeyRemap;\n\n pBundle = bundle;\n }",
"public DataSourcesPanelController(DataSourcesPanel view)\n {\n this.view = view;\n \n view.on(ViewEvent.COPY_NODE_NAME_TO_CLIPBOARD_MENU_ITEM_CLICK, new _CopyNodeNameToClipboardMenuItemClickHandler());\n view.on(ViewEvent.OPEN_LINKED_DOCUMENT_MENU_ITEM_CLICK, new _OpenLinkedDocumentMenuItemClickHandler());\n view.on(ViewEvent.CREATE_INTOOLS_EXPORT_MANUALLY_MENU_ITEM_CLICK, new _CreateIntoolsExportMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DOCUMENT_MANUALLY_MENU_ITEM_CLICK, new _CreateDocumentMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DCS_VARIABLE_TABLE_MANUALLY_MENU_ITEM_CLICK, new _CreateDcsVariableTableMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_ESD_VARIABLE_TABLE_MANUALLY_MENU_ITEM_CLICK, new _CreateEsdVariableTableMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_FGS_VARIABLE_TABLE_MANUALLY_MENU_ITEM_CLICK, new _CreateFgsVariableTableMannualyMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_MS_EXCEL_LIST_MENU_ITEM_CLICK, new _CreateDataSourceFromMsExcelSheetMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_YOKOGAWA_DCS_BACKUP_MENU_ITEM_CLICK, new _CreateDataSourceYokogawaDcsBackupMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_HONEYWELL_DCS_EXPORT_MENU_ITEM_CLICK, new _CreateDcsVariableTableFromHoneywellDcsExportMenuItemClickHandler());\n view.on(ViewEvent.CREATE_DATA_SOURCE_FROM_HONEYWELL_SCADA_EXPORT_MENU_ITEM_CLICK, new _CreateDcsVariableTableFromHoneywellScadaDatabaseMenuItemClickHandler());\n view.on(ViewEvent.EDIT_SELECTED_SOURCE_DATA_MENU_ITEM_CLICK, new _EditSelectedDataSourceMenuItemClickHandler());\n view.on(ViewEvent.REMOVE_SELECTED_SOURCE_DATA_MENU_ITEM_CLICK, new _RemoveSelectedDataSourceMenuItemClickHandler());\n }",
"public SchemaViewController( SchemaView view )\n {\n this.view = view;\n viewer = view.getViewer();\n \n initActions();\n initToolbar();\n initMenu();\n initContextMenu();\n initProjectsHandlerListener();\n initDoubleClickListener();\n initAuthorizedPrefs();\n initPreferencesListener();\n }",
"public View(Controller contr) {\n this.contr = contr;\n }",
"public View() {\n // (this constructor is here just for the javadoc tag)\n }",
"public Action newAction(Object key) {\n\t\tif (key == null)\n\t\t\tthrow new IllegalArgumentException(\"No legal key passed!\");\n\t\tif (super.containsKey(key))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\tsuper.put(key, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"@Override\n public void onClick(View arg0)\n {\n\n ExtendedNewController extendedNewController = new ExtendedNewController();\n startNewControllerActivity(extendedNewController, 0, 0);\n }",
"ReloadActionController createReloadActionController();",
"private AddNodeAction getAddNodeAction(DiagramView view, ModelElement modelElement, Point location) {\n AddNodeAction action = null;\n if (modelElement instanceof UseCase) {\n action = new AddUseCaseNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_USECASE_SIZE,\n (UseCase) modelElement);\n } else if (modelElement instanceof Actor) {\n action = new AddActorNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_ACTOR_SIZE,\n (Actor) modelElement);\n } else if (modelElement instanceof Subsystem) {\n action = new AddSubsystemNodeContainerAction(mainFrame, view, location,\n HandlerHelper.DEFAULT_SUBSYSTEM_SIZE, (Subsystem) modelElement);\n } else if (modelElement instanceof SimpleState) {\n if (modelElement instanceof com.topcoder.uml.model.activitygraphs.ActionState) {\n action = new AddActionStateAction(mainFrame, view, location, HandlerHelper.DEFAULT_ACTIONSTATE_SIZE,\n (com.topcoder.uml.model.activitygraphs.ActionState) modelElement);\n } else if (modelElement instanceof ObjectFlowState) {\n action = new AddObjectFlowNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_OBJECTFLOW_SIZE,\n (ObjectFlowState) modelElement);\n } else {\n SimpleState state = (SimpleState) modelElement;\n if (DeployHelper.isSendSignal(state)) {\n action = new AddSendSignalActionAction(mainFrame, view, location,\n HandlerHelper.DEFAULT_SENDSIGNAL_SIZE, (SimpleState) modelElement);\n } else {\n action = new AddAcceptEventActionAction(mainFrame, view, location,\n HandlerHelper.DEFAULT_ACCEPTEVENT_SIZE, (SimpleState) modelElement);\n }\n }\n } else if (modelElement instanceof Pseudostate) {\n Pseudostate state = (Pseudostate) modelElement;\n if (state.getKind() == PseudostateKind.CHOICE) {\n action = new AddDecisionNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_DECISION_SIZE,\n (Pseudostate) modelElement);\n } else if (state.getKind() == PseudostateKind.FORK) {\n action = new AddForkNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_FORK_SIZE,\n (Pseudostate) modelElement);\n } else if (state.getKind() == PseudostateKind.INITIAL) {\n action = new AddInitialNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_INITIAL_SIZE,\n (Pseudostate) modelElement);\n } else if (state.getKind() == PseudostateKind.JOIN) {\n action = new AddJoinNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_JOIN_SIZE,\n (Pseudostate) modelElement);\n } else if (state.getKind() == PseudostateKind.JUNCTION) {\n action = new AddMergeNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_MERGE_SIZE,\n (Pseudostate) modelElement);\n }\n } else if (modelElement instanceof FinalState) {\n FinalState state = (FinalState) modelElement;\n if (DeployHelper.isFlowFinal(state)) {\n action = new AddFlowFinalNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_FLOWFINAL_SIZE,\n (FinalState) modelElement);\n } else {\n action = new AddFinalNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_FINAL_SIZE,\n (FinalState) modelElement);\n }\n } else if (modelElement instanceof Object) {\n action = new AddObjectNodeAction(mainFrame, view, location, (Object) modelElement);\n } else if (modelElement instanceof Comment) {\n action = new AddCommentNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_COMMENT_SIZE,\n (Comment) modelElement);\n } else if (modelElement instanceof Package) {\n action = new AddPackageNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_PACKAGE_SIZE,\n (Package) modelElement);\n } else if (modelElement instanceof Interface) {\n action = new AddInterfaceNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_CLASS_SIZE,\n (Interface) modelElement);\n } else if (modelElement instanceof com.topcoder.uml.model.core.classifiers.Class) {\n action = new AddClassNodeAction(mainFrame, view, location, HandlerHelper.DEFAULT_CLASS_SIZE,\n (com.topcoder.uml.model.core.classifiers.Class) modelElement);\n }\n return action;\n }",
"public ProductTypeChangeLabelAction build() {\n Objects.requireNonNull(attributeName, ProductTypeChangeLabelAction.class + \": attributeName is missing\");\n Objects.requireNonNull(label, ProductTypeChangeLabelAction.class + \": label is missing\");\n return new ProductTypeChangeLabelActionImpl(attributeName, label);\n }",
"public View newView(ViewGroup parent, int viewType) {\n ActionModeItemView itemView=null;\n boolean updateFlag=true;\n if (mScrollState!=RecyclerView.SCROLL_STATE_IDLE) {\n updateFlag=false;\n }\n itemView=new ActionModeItemView(getActivity(), updateFlag, true);\n return itemView;\n }",
"public PsiFile createFile(FileViewProvider viewProvider) {\n return new BytemanFileImpl(viewProvider);\n }",
"MoveActionController createMoveActionController();",
"public /* synthetic */ void lambda$new$4(View view) {\n if (this.currentType != 1) {\n this.currentType = 1;\n updateType();\n }\n }",
"LogAction createLogAction();",
"private void ViewActionPerformed(ActionEvent e) {\n\t}",
"public Action newAction(String command) {\n\t\tif (command == null)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"No legal command string passed!\");\n\t\tif (super.containsKey(command))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\taction.putValue(Action.ACTION_COMMAND_KEY, command);\n\t\tsuper.put(command, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"public NewTunnelAction() {\r\n putValue(Action.NAME, \"New Tunnel\");\r\n putValue(Action.SMALL_ICON,\r\n new ResourceIcon(ActiveTunnelsSessionPanel.class,\r\n \"add.png\"));\r\n putValue(Action.SHORT_DESCRIPTION, \"New Tunnel\");\r\n putValue(Action.LONG_DESCRIPTION,\r\n \"Create a new secure tunnel\");\r\n putValue(Action.MNEMONIC_KEY, new Integer('n'));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_T, Keyboard_Modifier));\r\n putValue(Action.ACTION_COMMAND_KEY, \"new-tunnel-command\");\r\n putValue(StandardAction.ON_MENUBAR, new Boolean(true));\r\n putValue(StandardAction.MENU_NAME, \"Tunnel\");\r\n putValue(StandardAction.MENU_ITEM_GROUP, new Integer(50));\r\n putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(10));\r\n putValue(StandardAction.ON_TOOLBAR, new Boolean(true));\r\n putValue(StandardAction.TOOLBAR_GROUP, new Integer(5));\r\n putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(5));\r\n putValue(StandardAction.HIDE_TOOLBAR_TEXT, new Boolean(false));\r\n putValue(StandardAction.ON_CONTEXT_MENU, new Boolean(true));\r\n putValue(StandardAction.CONTEXT_MENU_GROUP, new Integer(5));\r\n putValue(StandardAction.CONTEXT_MENU_WEIGHT, new Integer(5));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_N, Keyboard_Modifier));\r\n }",
"public CakeController(CakeView newCakeView) {\n cakeView = newCakeView;\n cakeModel = cakeView.getCakeModel();\n\n\n }",
"private void newProject(ActionEvent x) {\n\t\tthis.controller.newProject();\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUIViewTransactionHistory h = new GUIViewTransactionHistory(true);\n\t\t\t}",
"public UploadProjectAction() {\n\t\tsuper();\n\t}",
"public /* synthetic */ void lambda$new$0(View view) {\n toggle();\n }",
"public ViewSourceAction(Application app) {\n super(app);\n ResourceBundleUtil labels = ResourceBundleUtil.getBundle(\"org.jhotdraw.samples.svg.Labels\");\n labels.configureAction(this, ID);\n }",
"public interface RepositoriesView extends BaseView {\n\n void onGetRepositories(Repos repos);\n\n void onAddFavorFinish(TrendingRepo repo);\n}",
"private PageAction getNewPaymentAction() {\n return new PageAction() {\n @Override\n public void run() { \n Parameters params = new Parameters();\n BasicMember member = data.getTransfer().getBasicMember();\n // Set if there is a member payment or system payment\n if(member != null) { \n params.set(ParameterKey.ID, member.getId()); \n } else {\n params.set(ParameterKey.IS_SYSTEM_ACCOUNT, true);\n }\n Navigation.get().go(PageAnchor.MAKE_PAYMENT, params);\n }\n @Override\n public String getLabel() { \n return messages.newPayment();\n } \n };\n }",
"ActionDefinition createActionDefinition();",
"ActionNew()\n {\n super(\"New\");\n this.setShortcut(UtilGUI.createKeyStroke('N', true));\n }",
"static Controller makeController(MusicEditorModel model, ViewModel vm, NonGuiViewAdapter view) {\n return new NonGuiController(model, vm, view);\n }",
"NoAction createNoAction();",
"ActionEvent createActionEvent();",
"public void create_new_package(View V) {\n make_request();\r\n progressDialog.show();\r\n }",
"public void actionPerformed(ActionEvent e)\n {\n UpravView v = new UpravView(view.getController());\n JFrame UprFrm = ViewFrame.CreateUpravView(v);\n }",
"public View createView(String viewName,String query,List<String> attributeNames,\n\t\t\tList<String> summaries, List<String> summaryNames, DBConnector connectionType) throws Exception {\n\t\tif(this.viewMap.containsKey(viewName)) throw new Exception(\"view name '\"+viewName+\"' already exists!\");\n\t\tView v = new View(viewName,query, attributeNames, summaries, summaryNames,connectionType);\n\t\tthis.viewMap.put(viewName, v);\n\t\treturn v;\n\t}",
"public void newClicked(View actionView)\n {\n \tclearEditTextBoxes();\n }",
"public NewNetworkAction(IWorkbenchWindow window) {\r\n\t\t// this.window = window;\r\n\t\tsetId(ID);\r\n\t\tsetText(\"&New\");\r\n\t\tsetToolTipText(\"Opens dialog to get network configuration file\");\r\n\t\tActionContainer.add(ID, this);\r\n\t}",
"ViewElement createViewElement();",
"public static /* synthetic */ void lambda$createView$1(View view, int i) {\n }",
"ViewComponentPart createViewComponentPart();",
"public void installView(View new_view, Digest digest) {\n if(digest != null)\n mergeDigest(digest);\n installView(new_view);\n }",
"public AuthorController(AuthorRepository authorRepository) {\n this.authorRepository = authorRepository;\n }",
"public AbstractDockingAction(final Component comp, final String label, final String iconPath, final String viewId)\n {\n this.comp = comp;\n this.viewId = viewId;\n putValue(NAME, label);\n if (iconPath != null) putValue(Action.SMALL_ICON, GuiUtils.loadIcon(iconPath));\n }",
"private Button constructCreationLinkButton(UUID creationID){\n\n CreationControllable cc = (CreationControllable) builder.getControllers()[1];\n if (!cc.containsCreation(creationID)){\n return null;\n }\n\n String[] creationInfo = cc.viewCreationSummary(creationID, viewer);\n Button b = new Button(creationInfo[0] + \" ( \" + creationInfo[1] + \" ) By: \"+ creationInfo[2]);\n\n b.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n stage.close();\n CreationViewController controller = getCreationBrowserController();\n if (controller == null){\n return;\n }\n controller.linkCreationCallback(creationID);\n stage.show();\n }\n });\n\n return b;\n }",
"public abstract HttpResponse<String> buildAction(@Nullable Object object) throws Exception;",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"public CreateIndividualPreAction() {\n }",
"public Action createOperation(int choose) {\n if (choose==0) {\n action = new Addition();\n } else if (choose==1) {\n action = new Subtracting();\n } else if (choose==2) {\n action = new Multiplication();\n } else if (choose==3) {\n action = new Dividing();\n } else {\n action = null;\n }\n return action;\n }",
"public UpcomingContestsManagerAction() {\r\n }",
"public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }",
"public CollaboratorController(Project projectToShare, Application application) {\r\n this.project = projectToShare;\r\n this.application = application;\r\n }",
"private void createToolBarActions() {\r\n\t\t// create the action\r\n\t\tGetMessage<Transport> getMessage = new GetMessage<Transport>(new Transport());\r\n\t\tgetMessage.addParameter(IFilterTypes.TRANSPORT_TODO_FILTER, \"\");\r\n\r\n\t\t// add to the toolbar\r\n\t\tform.getToolBarManager().add(new RefreshViewAction<Transport>(getMessage));\r\n\t\tform.getToolBarManager().update(true);\r\n\t}",
"@Override\r\n\tpublic NodeView<CreatorNodeModel> createNodeView(int viewIndex,\r\n\t\t\tCreatorNodeModel nodeModel) {\n\t\treturn null;\r\n\t}",
"protected ReliedOnView() {}"
] | [
"0.60701716",
"0.5637007",
"0.5526387",
"0.5526387",
"0.5526387",
"0.5412698",
"0.5366801",
"0.53431743",
"0.5268383",
"0.5158297",
"0.5153141",
"0.5142841",
"0.51276976",
"0.5111657",
"0.5097397",
"0.50870067",
"0.50828236",
"0.5050135",
"0.5044929",
"0.50070137",
"0.5004414",
"0.49917147",
"0.4975284",
"0.49689594",
"0.49647772",
"0.4947564",
"0.49337482",
"0.49205473",
"0.4917894",
"0.4914489",
"0.49112818",
"0.48995474",
"0.48906624",
"0.4876029",
"0.4847427",
"0.48200613",
"0.48060945",
"0.47924843",
"0.47915122",
"0.47912124",
"0.47785723",
"0.47736356",
"0.47682017",
"0.47498405",
"0.47470307",
"0.47394487",
"0.47350743",
"0.4729212",
"0.47284102",
"0.47279462",
"0.4709995",
"0.4703605",
"0.4692764",
"0.46721256",
"0.46679094",
"0.4666677",
"0.46565104",
"0.46532056",
"0.46501797",
"0.46422887",
"0.4626696",
"0.46264267",
"0.46191838",
"0.4612142",
"0.4595154",
"0.4589759",
"0.4589098",
"0.45842814",
"0.45839614",
"0.4577864",
"0.45771474",
"0.45743302",
"0.45712608",
"0.45710826",
"0.45695513",
"0.45614946",
"0.45604205",
"0.45602232",
"0.45490956",
"0.4544841",
"0.45447272",
"0.45402616",
"0.4534396",
"0.45210114",
"0.45071864",
"0.45038092",
"0.4494852",
"0.44886976",
"0.4488001",
"0.44868284",
"0.44861606",
"0.4486003",
"0.44793692",
"0.44775596",
"0.44724894",
"0.4471916",
"0.44718733",
"0.4471424",
"0.4469917",
"0.4469864"
] | 0.6531074 | 0 |
Storage methods Determines if a task is done or not from a line read in from the file. | public String determineTaskDoneStatusFromFileLine(String line) {
int indexOfFirstSquareBracket = line.indexOf("[");
String doneStatus = String.valueOf(line.charAt(indexOfFirstSquareBracket + 1));
assert (doneStatus.equals("V") || doneStatus.equals("X")) : "Done status can only be X or V";
return doneStatus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean read(String line);",
"boolean hasCompleteFile();",
"boolean hasTask();",
"protected boolean isFinished() {\r\n if (lineHasBeenFound) {\r\n lineTrackTime = System.currentTimeMillis();\r\n }\r\n if(System.currentTimeMillis()-lineTrackTime > 4000){\r\n return true;\r\n }\r\n return false;\r\n }",
"boolean isDone();",
"public boolean is_completed();",
"public boolean isDone();",
"public boolean isDone();",
"boolean handle(String line);",
"boolean isCompleted();",
"public abstract boolean passes(String line);",
"@Override\r\n\tpublic boolean equals(Object obj) {\r\n\t\treturn (obj instanceof Task && getLine().equals(((Task) obj).getLine()));\r\n\t}",
"public boolean isDone()\n {\n return (this.elapsed >= this.duration);\n }",
"public boolean addNewFinishedTask(Task task){\r\n return finished.add(task);\r\n }",
"public abstract boolean isCompleted();",
"public boolean isDone(String s) {\n return (s.equals(\"V\"));\n }",
"public boolean isDone() { return true; }",
"boolean isComplete();",
"boolean isComplete();",
"boolean isUsedForReading();",
"public boolean isDone()\r\n/* 69: */ {\r\n/* 70:106 */ return isDone0(this.result);\r\n/* 71: */ }",
"public void checkTask(String task){\r\n\t\t\r\n\t}",
"public boolean isDone(){\n return status;\n }",
"public boolean hasLine(){\r\n\t\tif (getLine().equals(\"\"))\r\n\t\t\treturn false;\r\n\t\telse return true;\r\n\t}",
"boolean hasFinished();",
"boolean isDone(){\n\t\t\n\t\treturn (x0==x1 && y0==y1);\n\t}",
"boolean hasIsComplete();",
"boolean hasIsComplete();",
"public boolean isDone(){\n return done;\n }",
"public abstract boolean isComplete();",
"boolean isFileEnded();",
"protected boolean process() {\n BooleanSupplier step = _steps.peek();\n if (step == null) {\n return false;\n }\n if (step.getAsBoolean()) {\n return true;\n } else {\n _steps.remove();\n return !isFinished();\n }\n }",
"boolean completed();",
"public boolean isDone() {\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }",
"public boolean isComplete();",
"public boolean isDone() { return false; }",
"public abstract boolean isLoadCompleted();",
"Boolean isFinished();",
"boolean isFinished();",
"public boolean isDone() {\n\t\t\n\t\treturn done;\n\t}",
"public boolean isCompleted()\n\t{\n\t\treturn pieces.length == existing.cardinality();\n\t}",
"@Override\n\tpublic boolean done() {\n\t\tfor(Task t : details.getPendingTasks()){\n\t\t\tif(!t.isComplete())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean isDone(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase DONE:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean scanLine()\r\n\t{\r\n\t\tboolean isLine=true;\r\n\t\t\r\n\t\t//Implement Filter here.\r\n\t\t\r\n\t\treturn isLine;\r\n\t}",
"boolean isScanDone();",
"public static boolean toggleComplete(Task task) {\n Boolean complete = task.getCompleted(); // Get the current value\n\n // TOGGLE COMPLETE\n if (complete) // store the opposite of the current value\n complete = false;\n else\n complete = true;\n try{\n String query = \"UPDATE TASK SET ISCOMPLETE = ? WHERE (NAME = ? AND COLOUR = ? AND DATE = ?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query); // Setup statement for query\n statement.setString(1, complete.toString()); // Store new isCompleted value\n statement.setString(2, task.getName()); // store values of task\n statement.setString(3, task.getColor().toString());\n statement.setString(4, Calendar.selectedDay.getDate().toString());\n int result = statement.executeUpdate(); // send out the statement\n if (result > 0){ // If swapped successfully, re-load the tasks\n getMainController().loadTasks(); // Reload the task list to update the graphics.\n }\n return (result > 0);\n } catch (SQLException e) {\n e.printStackTrace(); // If task was unable to be edited\n e.printStackTrace(); // Create alert for failing to edit\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to edit task.\");\n alert.showAndWait();\n }\n return false;\n }",
"public void checkOffTask() {\n isDone = true;\n }",
"public boolean isDone() {\n return done;\n }",
"boolean hasRead();",
"protected boolean isFinished() {\n\t\tif (!hasPathStarted) {\n\t\t\treturn false;\n\t\t}\n\t\tboolean leftComplete = status.activePointValid && status.isLast;\n\t\tboolean trajectoryComplete = leftComplete;\n\t\tif (trajectoryComplete) {\n\t\t\tSystem.out.println(\"Finished trajectory\");\n\t\t}\n\t\treturn trajectoryComplete || isFinished;\n\t}",
"protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }",
"public boolean pop() {\r\n\t\ttry {\r\n\t\t\tcurrentString = br.readLine();\r\n\t\t\tif(currentString != null) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\t\t\r\n\t}",
"boolean getFinished();",
"public boolean isDone() {\r\n return isDone;\r\n }",
"boolean hasExecution();",
"protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public boolean isDone() {\n return done;\n }",
"public boolean isDone() {\n return done;\n }",
"public boolean isDone() {\n return isDone;\n }",
"public boolean isDone() {\n return isDone;\n }",
"public boolean isDone() {\n return isDone;\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 }",
"boolean isPendingToRead();",
"public String determineTaskTypeFromFileLine(String line) {\n int indexOfFirstSquareBracket = line.indexOf(\"[\");\n String taskType = String.valueOf(line.charAt(indexOfFirstSquareBracket + 5));\n return taskType;\n }",
"public boolean isDone() {\n return this.done;\n }",
"public void completeTask() {\n completed = true;\n }",
"public boolean checkDone() {\n return this.isDone;\n }",
"public boolean checkTaskExist(CaptureTask task) {\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isDone() {\n // boolean result = true;\n // try {\n // result = !evaluateCondition();\n // } catch (Exception e) {\n // logger.error(e.getMessage(), e);\n // }\n // setDone(true);\n // return result;\n // setDone(false);\n return false;\n }",
"public boolean isFinished();",
"boolean getIsComplete();",
"protected boolean isFinished()\n {\n return timer.get() > driveDuration;\n }",
"protected boolean isFinished() {\n\treturn this.isDone;\n }",
"boolean hasProgress();",
"boolean hasProgress();",
"boolean hasStart();",
"public boolean getDone(){\r\n\t\treturn done;\r\n\t}",
"public void addTask(String wholeLine) {\n String type;\n boolean completionStatus;\n String name;\n String date = null;\n try {\n Scanner currentLine = new Scanner(wholeLine);\n // something like [T][✓]\n if (currentLine.hasNext()) {\n String typeCompletion = currentLine.next();\n switch (typeCompletion.charAt(1)) {\n case ('T'):\n type = \"todo\";\n break;\n case ('E'):\n type = \"event\";\n break;\n case ('D'):\n type = \"deadline\";\n break;\n default:\n // this shouldn't happen\n type = null;\n }\n completionStatus = typeCompletion.charAt(4) != 'X';\n } else {\n throw Ui.DukeException.fileError();\n }\n\n if (currentLine.hasNext()) {\n name = currentLine.nextLine().trim();\n } else {\n throw Ui.DukeException.fileError();\n }\n assert type != null;\n int dateLocation = containsDate(name);\n if (dateLocation >= 0) {\n date = name.substring(dateLocation);\n name = name.substring(0, dateLocation - 5);\n }\n Task taskToAdd = new Task(type, name, completionStatus, date);\n storage.add(taskToAdd);\n if (taskToAdd.hasDate()) {\n if (!dateStorage.containsKey(taskToAdd.getDate())) {\n dateStorage.put(taskToAdd.getDate(), new ArrayList<>());\n }\n dateStorage.get(taskToAdd.getDate()).add(taskToAdd);\n }\n taskAdded(taskToAdd, storage);\n } catch (Ui.DukeException e) {\n echo(e.getMessage());\n }\n }",
"public boolean completed()\r\n {\r\n if(pile.size() == 13)\r\n return true;\r\n return false;\r\n }",
"@Override\n public boolean isDone() {\n return done;\n }",
"private boolean handleSeekAdded(String line){\n if (!(line.startsWith(\"<s> \") || line.startsWith(\"<sn> \")))\n return false;\n \n SeekInfoStruct seekInfo = SeekInfoStruct.parseSeekInfoLine(line);\n\n if (!processSeekAdded(seekInfo))\n processLine(line);\n\n return true;\n }",
"public boolean hasTaskId() {\n return fieldSetFlags()[9];\n }",
"public boolean hasTaskId() {\n return fieldSetFlags()[23];\n }",
"public void checkFinish()\t{\n\t\tif(readCompareResult() == true)\t{\n\t\t\tfinished = true;\n\t\t}\n\t}",
"public boolean isDone(){\r\n\t\tif(worker.getState()==Thread.State.TERMINATED) return true;\r\n\t\treturn false;\r\n\t}",
"public boolean isProcessed();",
"public boolean isProcessed();",
"public boolean isProcessed();",
"public boolean isProcessed();",
"public boolean isProcessed();",
"public boolean isProcessed();",
"protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }",
"private boolean wasTheFileReallyTransferred(SubmittedFile file)\n\t{\n\t\treturn Duration.between(file.getTimeStamp(), Instant.now()).toMillis() >= tailerDelayMillis; \n\t}",
"protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }",
"private boolean isCompletedRow(int row)\n {\n for(int col = 0; col < grid.getNumCols(); col++)\n {\n if(grid.get(new Location(row, col)) == null)\n {\n return false;\n }\n }\n return true;\n }",
"public ArrayList<Task> loadData() throws FileNotFoundException {\n ArrayList<Task> dukeList = new ArrayList<>();\n Scanner sc = new Scanner(file);\n Task t;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n String[] splitBySpace = line.split(\" \");\n String[] splitBySlash;\n String command = splitBySpace[0];\n\n if (command.equals(\"D\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of deadline task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Deadline(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else if (command.equals(\"E\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of event task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Event(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else {\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace.length; i++) {\n getDesc = getDesc + splitBySpace[i] + \" \";\n }\n\n t = new ToDo(getDesc.trim());\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n }\n }\n\n return dukeList;\n }",
"protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }",
"public boolean isDeleteFileWhenComplete() {\r\n\t\treturn deleteFileWhenComplete;\r\n\t}",
"public boolean getDone() {\n return isDone;\n }"
] | [
"0.6265767",
"0.6218766",
"0.6148132",
"0.6115604",
"0.6106502",
"0.6052001",
"0.60247713",
"0.60247713",
"0.5968446",
"0.5896221",
"0.5776483",
"0.57720536",
"0.5763516",
"0.57165027",
"0.5708336",
"0.56469697",
"0.56457",
"0.5634439",
"0.5634439",
"0.5619801",
"0.5604216",
"0.55933535",
"0.55732214",
"0.55491245",
"0.5548509",
"0.55159795",
"0.5515721",
"0.5515721",
"0.5498556",
"0.5498029",
"0.54921603",
"0.54899997",
"0.54768693",
"0.5464253",
"0.5464045",
"0.5426975",
"0.5416604",
"0.5402827",
"0.5394384",
"0.53923285",
"0.53790736",
"0.5371839",
"0.5360675",
"0.5355289",
"0.53471243",
"0.533128",
"0.5330695",
"0.53164905",
"0.5314191",
"0.5308522",
"0.5306719",
"0.52989405",
"0.52963",
"0.52959794",
"0.5294168",
"0.52922285",
"0.5286609",
"0.5279128",
"0.5279128",
"0.52779037",
"0.52779037",
"0.52779037",
"0.5270988",
"0.5263369",
"0.52587396",
"0.52571964",
"0.5253316",
"0.5252303",
"0.5249673",
"0.52401507",
"0.52391416",
"0.5238211",
"0.5225985",
"0.5220842",
"0.52208245",
"0.52208245",
"0.5220503",
"0.5213066",
"0.52116215",
"0.5209858",
"0.520625",
"0.51916057",
"0.51881814",
"0.51879346",
"0.51833224",
"0.5180878",
"0.515157",
"0.515157",
"0.515157",
"0.515157",
"0.515157",
"0.515157",
"0.5149276",
"0.51488966",
"0.51473534",
"0.514702",
"0.51455665",
"0.5145036",
"0.5144349",
"0.5143855"
] | 0.68087626 | 0 |
Determines the type of Task, either a ToDo, Event, or DeadLine. | public String determineTaskTypeFromFileLine(String line) {
int indexOfFirstSquareBracket = line.indexOf("[");
String taskType = String.valueOf(line.charAt(indexOfFirstSquareBracket + 5));
return taskType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getType() {\n return \"Task\";\n }",
"@Override\n public String getTaskType() {\n return this.taskType;\n }",
"@Override\n public String getTaskType() {\n return \"T\";\n }",
"public String getTaskType() {\n return taskType;\n }",
"public String getType() {\n return theTaskType ;\n }",
"public String getTaskType() { return \"?\"; }",
"public TaskType getTaskType() {\n return taskType;\n }",
"static Task identifyType(String input) throws DukeException {\n String command = Parser.getCommand(input);\n String description = Parser.getDescription(input);\n\n switch (command) {\n case \"todo\":\n return new Todo(description);\n case \"deadline\":\n String deadlineDescription = Deadline.getDeadlineDescription(description);\n Deadline deadline = new Deadline(deadlineDescription, Deadline.getDate(input), Deadline.getTime(input)); //todo\n return deadline;\n case \"event\":\n String eventDescription = Event.getEventDescription(description);\n Event event = new Event(eventDescription, Event.getEventDetails(input));\n return event;\n default:\n return new Task(\"NA\");\n }\n }",
"public int getTaskType() {\n\t\treturn fieldTaskType;\n\t}",
"public TaskType getTaskType() {\n return (TaskType) commandData.get(CommandProperties.TASK_TYPE);\n }",
"private static Task createTask(String line) throws DukeException {\n String type=line.split(\"]\")[0];\n String isDone=line.split(\"]\")[1];\n String detail=line.split(\"]\")[2];\n if(type.contains(\"T\")){\n if(isDone.contains(\"✘\")){\n return new ToDo(detail.substring(1),false);\n }else if(isDone.contains(\"✓\")){\n return new ToDo(detail.substring(1),true);\n }\n\n }\n if(type.contains(\"D\")) {\n if (isDone.contains(\"✘\")) {\n int dividerPosition = detail.indexOf(\"do by:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"do by:\", \"\");\n return new Deadline(itemName, DeadlineCommand.convertDeadline(itemName2));\n } else if (isDone.contains(\"✓\")) {\n int dividerPosition = detail.indexOf(\"do by:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"do by:\", \"\");\n return new Deadline(itemName, DeadlineCommand.convertDeadline(itemName2));\n }\n }\n if(type.contains(\"E\")){\n if (isDone.contains(\"✘\")) {\n int dividerPosition = detail.indexOf(\"at:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"at:\", \"\");\n return new Event(itemName, EventCommand.convertEvent(itemName2));\n } else if (isDone.contains(\"✓\")) {\n int dividerPosition = detail.indexOf(\"at:\");\n String itemName = detail.substring(0, dividerPosition);\n String itemName1 = detail.substring(dividerPosition,detail.length());\n String itemName2 = itemName1.replace(\"at:\", \"\");\n return new Event(itemName, EventCommand.convertEvent(itemName2));\n }\n }\n\n else{\n throw new DukeException(\"☹ OOPS!!! Missing type element for CREATE TASK\");\n }\n return new ToDo();\n }",
"private Task makeTask(String taskType, Optional<String> taskDescription, \r\n Optional<LocalDateTime> taskDeadline, \r\n Optional<LocalDateTime> taskStartDateTime,\r\n Optional<LocalDateTime> taskEndDateTime) {\r\n \r\n Task task;\r\n \r\n if (taskDescription.get().isBlank()) {\r\n throw new InvalidTaskArgumentException(\r\n MESSAGE_ADD_COMMAND_INVALID_TASK_DESCRIPTION);\r\n }\r\n \r\n switch(taskType) {\r\n case \"todo\": \r\n task = new ToDos(TaskList.taskIdCounter, taskDescription.get());\r\n break;\r\n case \"deadline\":\r\n if (taskDeadline.isEmpty()) {\r\n throw new InvalidTaskArgumentException(\r\n MESSAGE_ADD_COMMAND_INVALID_TASK_REQUIREMENT_DEADLINES);\r\n }\r\n \r\n task = new Deadlines(TaskList.taskIdCounter, taskDescription.get(), \r\n taskDeadline.get()); \r\n break;\r\n case \"event\":\r\n if (taskStartDateTime.isEmpty() || taskEndDateTime.isEmpty()) {\r\n throw new InvalidTaskArgumentException(\r\n MESSAGE_ADD_COMMAND_INVALID_TASK_REQUIREMENT_EVENTS);\r\n }\r\n task = new Events(TaskList.taskIdCounter, taskDescription.get(), \r\n taskStartDateTime.get(), taskEndDateTime.get());\r\n break;\r\n default:\r\n throw new InvalidTaskArgumentException(MESSAGE_INVALID_TASK_TYPE);\r\n }\r\n return task;\r\n }",
"private EventType getEventType(Transition transition) {\n\t\tEventType result = EventType.COMPLETE;\n\t\t// get associated log event type\n\t\tLogEvent le = transition.getLogEvent();\n\n\t\t// check for invisible tasks\n\t\tif (le != null) {\n\t\t\tString type = le.getEventType();\n\t\t\tif (type.equals(\"schedule\")) {\n\t\t\t\tresult = EventType.SCHEDULE;\n\t\t\t} else if (type.equals(\"start\")) {\n\t\t\t\tresult = EventType.START;\n\t\t\t} else if (type.equals(\"complete\")) {\n\t\t\t\tresult = EventType.COMPLETE;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public String getTaskType(){\n return \"To be overridden by subclass\";\n }",
"private Task readTask(String input) throws DukeException {\n String[] splitInput = input.split(\"\\\\|\", -1);\n String identifier = splitInput[0];\n boolean isComplete = parseInt(splitInput[1]) == 1;\n Task task;\n switch (identifier) {\n case Todo.IDENTIFIER:\n task = new Todo(splitInput[2]);\n break;\n case Deadline.IDENTIFIER:\n task = new Deadline(splitInput[2], parseDate(splitInput[3]));\n break;\n case Event.IDENTIFIER:\n task = new Event(splitInput[2], parseDate(splitInput[3]));\n break;\n default:\n throw new DukeException(\"Imported task with invalid type.\");\n }\n if (isComplete) {\n task.setDone();\n }\n return task;\n }",
"private TaskType getType(String type) {\r\n\t\tfor (TaskType tt : taskTypes) {\r\n\t\t\tif (tt.name.equals(type))\r\n\t\t\t\treturn tt;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private Task readTask(String description, String type, int index, boolean isComplete, String tag)\n throws DukeInvalidTimeException {\n return type.equals(\"D\")\n ? new Deadline(description, index, isComplete, tag)\n : new Event(description, index, isComplete, tag);\n }",
"public interface Task extends Runnable {\n\n /**\n * Get the task name\n *\n * @return\n */\n public String getTaskName();\n\n /**\n *\n * @return true if the task is in active, else false\n */\n public boolean isActive();\n\n /**\n * @return priority of the task\n */\n public int getPriority();\n\n /**\n *\n * @return the sequence number of the task. If two tasks has same priority,\n * then the task with less sequence number executes first.\n */\n public int getSequenceNumber();\n}",
"public String getTaskClass() {\n\t\treturn this.taskClass;\n\t}",
"public JobLog setTaskType(TaskType taskType) {\n this.taskType = taskType;\n return this;\n }",
"private Task getTask(int tasktype, UserInfo userInfo){\n switch(tasktype){\n case Task.TASK_TYPE_BACKUP_CELLLOG:\n return new BackupCallLogTask(mContext, userInfo, BaseTask.TASK_BASETYPE_BACKUP);\n case Task.TASK_TYPE_RESTORE_CALLLOG:\n return new BackupCallLogTask(mContext, userInfo, BaseTask.TASK_BASETYPE_RESTORE);\n case Task.TASK_TYPE_BACKUP_CONTACTS:\n return new BackupContactsTask(mContext, userInfo, BaseTask.TASK_BASETYPE_BACKUP);\n case Task.TASK_TYPE_RESTORE_CONTACTS:\n return new BackupContactsTask(mContext, userInfo, BaseTask.TASK_BASETYPE_RESTORE);\n case Task.TASK_TYPE_BACKUP_SMS:\n return new BackupSmsTask(mContext, userInfo, BaseTask.TASK_BASETYPE_BACKUP);\n case Task.TASK_TYPE_RESTORE_SMS:\n return new BackupSmsTask(mContext, userInfo, BaseTask.TASK_BASETYPE_RESTORE);\n }\n return null;\n }",
"public String getTask() {\n return task;\n }",
"public String getTask() {\n return task;\n }",
"@Override\n\tpublic ActivityTaskType getActivityTaskType() {\n\t\treturn ActivityTaskType.FourTask;\n\t}",
"static Task decodeTaskFromString(String task) {\n String modifiedTask = task.trim();\n String type = modifiedTask.substring(eventTypeIndexStart, eventTypeIndexEnd);\n String done = modifiedTask.substring(eventDoneIndexStart, eventDoneIndexEnd);\n String taskDescription = modifiedTask.substring(taskDescriptionIndexStart).trim();\n switch (type) {\n case \"T\" :\n return new Todo(taskDescription, done);\n case \"D\" :\n DesAndTime deadLineDetails = new DesAndTime(taskDescription);\n deadLineDetails.deadLine();\n return new DeadLine(deadLineDetails.getDes(), deadLineDetails.getTime(), done);\n case \"E\" :\n DesAndTime eventDetails = new DesAndTime(taskDescription);\n eventDetails.event();\n return new Event(eventDetails.getDes(), eventDetails.getTime(), done);\n default:\n return new Task(\"Invalid Task\");\n }\n }",
"public TaskType getDefaultTaskType()\r\n {\r\n return (m_defaultTaskType);\r\n }",
"Object getTaskId();",
"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}",
"public Task parseLine(String line) {\n assert(line != null && !line.equals(\"\"));\n\n String[] x = line.split(\"\\\\|\");\n String taskType = x[0].strip();\n boolean isDone = !x[1].strip().equals(\"0\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d MMM yyyy HH:mm\");\n\n if (taskType.equals(\"T\")) {\n return new ToDo(x[2].strip(), isDone);\n } else if (taskType.equals(\"D\")) {\n String by = x[x.length - 1].strip();\n LocalDateTime byy = LocalDateTime.parse(by, formatter);\n return new Deadline(x[2].strip(), isDone, byy);\n } else { // Event\n String at = x[x.length - 1].strip();\n LocalDateTime att = LocalDateTime.parse(at, formatter);\n return new Event(x[2].strip(), isDone, att);\n }\n }",
"public String getTaskDefinition() {\n return this.taskDefinition;\n }",
"public String getTaskDefinition() {\n return this.taskDefinition;\n }",
"void handleTask(ITaskType pTaskType, Object pParam) throws IllegalArgumentException;",
"static String getReadableTask(int taskTypeRepresentation) {\n return taskDetails.get(taskTypeRepresentation).getDescription();\n }",
"private String formatTask(Task task) {\n String identifier = task.getType();\n String completionStatus = task.isComplete() ? \"1\" : \"0\";\n String dateString = \"\";\n if (task instanceof Deadline) {\n Deadline d = (Deadline) task;\n LocalDateTime date = d.getDate();\n dateString = date.format(FORMATTER);\n }\n if (task instanceof Event) {\n Event e = (Event) task;\n LocalDateTime date = e.getDate();\n dateString = date.format(FORMATTER);\n }\n return String.join(\"|\", identifier, completionStatus, task.getName(), dateString);\n }",
"public Task getTask(Integer tid);",
"@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}",
"public interface Task {\n\n /**\n * Getter for the conversaitonal object concerned with this task.\n * @return the conversational object owning this task\n */\n ConversationalObject getTaskOwner();\n\n /**\n * Stter for the conversaitonal object concerned with this task.\n * @param taskOwner the task owner to set.\n */\n void setTaskOwner(ConversationalObject taskOwner);\n\n /**\n * Getter for the status of this task\n * @return the current status of this task\n */\n TaskStatus getStatus();\n\n /**\n * Setter for the status of this task\n * @param status\n */\n void setStatus(TaskStatus status);\n\n /**\n * Getter for the stage of this task. It is strongly recomended that concrete\n * task classes declare static final string variables to refer to there\n * possible stages.\n * @return The current stage of this task\n */\n String getStage();\n\n /**\n * Getter for the result of this task.\n * @return the result of this task, or {@code null} if the task is not\n * finished.\n */\n TaskResult getResult();\n\n /**\n * Getter for the set of tasks that depend from this task\n * @return The set of dependent tasks (can be null)\n */\n Set<Task> getDependentTasks();\n\n /**\n * Setter for the set of tasks that depend from this task\n * @param dependentTasks the set of dependent tasks to set\n */\n void setDependentTasks(Set<Task> dependentTasks);\n\n /**\n * Getter for the aggregated task this task has generated and is dependent on.\n * @return The aggregated task, if any (can be null)\n */\n Task getAggregatedTask();\n\n /**\n * Setter for the aggregated task this task has generated and is dependent on.\n * @param aggregatedTask the aggregated task to set\n */\n void setAggregatedTask(Task aggregatedTask);\n\n // TODO Other references could be added to extend the tasks model: e.g.\n // (1) subtasks: list of tasks composing this task, i.e. that should be\n // executed\n // in sequence in order to complete this task, and\n // (2) supertask: reversely, task this task is a subtask of.\n\n /**\n * Getter for the set of conversations this task generated and is now\n * dependent on.\n * @return the set of generated conversations\n */\n Set<OnGoingConversation> getGeneratedConversations();\n\n /**\n * Setter for generatedConversations.\n * @param generatedConversations the set of generatedConversations to set\n */\n void setGeneratedConversations(\n Set<OnGoingConversation> generatedConversations);\n\n /**\n * Cuts all references to other objects so that the garbage collector can\n * destroy them after having destroyed this task, if they are not referenced\n * by other objects than this task. Should be executed before removing the\n * last reference to this task (usually before removing this task from the set\n * of tasks of a conversational object)\n */\n void clean();\n\n /**\n * Executes the task. Specific to each concrete task class.\n */\n void execute();\n}",
"public void checkTask(String task){\r\n\t\t\r\n\t}",
"TaskStatus getStatus();",
"public Task getTask() { return task; }",
"public static void printInvalidTaskType() {\n botSpeak(Message.INVALID_TASK_TYPE_ERROR);\n }",
"public interface ITask {\n\n String getId();\n boolean isComplete();\n\n}",
"String getTaskId();",
"public ITask getTask() {\n \t\treturn task;\n \t}",
"public void checkRemainingCases(ArrayList<Task> tasks, Validity taskFormat, String task) throws TaskFormatException {\n String[] words = task.split(\" \");\n switch (words[0].toLowerCase()) {\n case \"done\":\n words = taskFormat.checkDone();\n if (taskFormat.getIsValid()) {\n int index = Integer.parseInt(words[1]);\n markDone(index, tasks);\n } else {\n throw new TaskFormatException(\"\\u2639 OOPS!!! The description of done cannot be empty and must be a digit.\");\n }\n break;\n case \"find\":\n taskFormat.checkFind();\n if (taskFormat.getIsValid()) {\n findTasks(tasks, task.substring(5));\n } else {\n throw new TaskFormatException(\"\\u2639 OOPS!!! The description of find cannot be empty.\");\n }\n break;\n case \"printbydate\":\n taskFormat.checkPrintByDate();\n if (taskFormat.getIsValid()) {\n printByDate(tasks, task.substring(12));\n } else {\n throw new TaskFormatException(\"\\u2639 OOPS!!! The description of printbydate cannot be empty\");\n }\n break;\n case \"delete\":\n words = taskFormat.checkDelete();\n if (taskFormat.getIsValid()) {\n int index = Integer.parseInt(words[1]);\n deleteTask(index, tasks);\n } else {\n throw new TaskFormatException(\"\\u2639 OOPS!!! The description of delete cannot be empty and must be a digit.\");\n }\n break;\n case \"event\":\n words = taskFormat.checkEvent();\n if (taskFormat.getIsValid()) {\n tasks.add(new Event(words[0], words[1]));\n addedTask(tasks);\n } else {\n throw new TaskFormatException(\"\\u2639 OOPS!!! The event description format is wrong.\");\n }\n break;\n case \"deadline\":\n words = taskFormat.checkDeadline();\n if (taskFormat.getIsValid()) {\n tasks.add(new Deadline(words[0], words[1]));\n addedTask(tasks);\n } else {\n throw new TaskFormatException(\"\\u2639 OOPS!!! The deadline description format is wrong.\");\n }\n break;\n case \"todo\":\n if (words.length > 1) {\n tasks.add(new Todo(task));\n addedTask(tasks);\n } else {\n throw new TaskFormatException(\"\\u2639 OOPS!!! The description of a todo cannot be empty.\");\n }\n break;\n default:\n throw new TaskFormatException(\"\\u2639 OOPS!!! I'm sorry, but I don't know what that means :-(\");\n }\n }",
"public T caseTask(Task object) {\n\t\treturn null;\n\t}",
"public boolean isTaskNode()\n\t{\n\t\treturn isTaskNode;\n\t}",
"public abstract String getTaskName();",
"public interface Task {\n\t\t/** Insertion tuples */\n\t\tpublic TupleSet insertions();\n\n\t\t/** Deletion tuples. */\n\t\tpublic TupleSet deletions();\n\n\t\t/** The program name that should evaluate the tuples. */\n\t\tpublic String program();\n\n\t\t/** The name of the table to which the tuples belong. */\n\t\tpublic TableName name();\n\t}",
"private Task createTaskFromGivenArgs(Name name, TaskDate taskStartDate, TaskDate taskEndDate, Status taskStatus) {\n\t if (isEventTask(taskStartDate, taskEndDate)) {\n\t return new EventTask(name, taskStartDate, taskEndDate, taskStatus);\n\t }\n\t if (isDeadline(taskEndDate)) {\n\t return new DeadlineTask(name, taskEndDate, taskStatus);\n\t }\n\t return new Task(name, taskStatus);\n\t}",
"ITaskView getTaskView();",
"boolean hasTask();",
"@Override\n public Optional<Task> getTaskById(UUID id)\n {\n return null;\n }",
"public Task createTask(String taskType) throws BuildException {\n return ComponentHelper.getComponentHelper(this).createTask(taskType);\n }",
"public AddCommand(String taskType, Optional<String> taskDescription, \r\n Optional<LocalDateTime> taskDeadline) {\r\n \r\n this.taskType = taskType;\r\n this.taskDescription = taskDescription;\r\n this.taskDeadline = taskDeadline;\r\n this.taskStartDateTime = Optional.empty();\r\n this.taskEndDateTime = Optional.empty();\r\n this.task = makeTask(taskType, taskDescription, taskDeadline, \r\n taskStartDateTime, taskEndDateTime); \r\n }",
"public void decideTaskType(File myFile) throws FileNotFoundException {\n Scanner myReader = new Scanner(myFile);\n while (myReader.hasNextLine()) {\n String type = myReader.nextLine();\n if (type.contains(\"[T]\")) {\n loadTodo(type);\n } else if (type.contains(\"[D]\")) {\n loadDeadline(type);\n } else if (type.contains(\"[E]\")) {\n loadEvent(type);\n }\n }\n myReader.close();\n }",
"public String getTask(){\n\treturn task;\n}",
"private static void taskProcess(String input)\r\n\t{\r\n\t\tswitch (input.toUpperCase())\r\n\t\t{\r\n\t\t\tcase CREATE:\r\n\t\t\t{\r\n\t\t\t\tPostTaskService postTask = new PostTaskService();\r\n\t\t\t\tpostTask.createTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase GET:\r\n\t\t\t{\r\n\t\t\t\tGetTaskService getTask = new GetTaskService();\r\n\t\t\t\tList<Task> taskList = getTask.getAllTasks();\r\n\t\t\t\tTaskSchedulerUtil.getInstance().printTasks(taskList);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase START:\r\n\t\t\t{\r\n\t\t\t\tStartTaskService startTask = new StartTaskService();\r\n\t\t\t\tstartTask.startTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase END:\r\n\t\t\t{\r\n\t\t\t\tEndTaskService endTask = new EndTaskService();\r\n\t\t\t\tendTask.endTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public Class<? extends Task> taskClass() {\n return AmpoolSourceTask.class;\n }",
"TrackerListTasktype getTrackerListTasktype(final Integer id);",
"public Task getTask() {\n return task;\n }",
"Task createTask();",
"Task createTask();",
"Task createTask();",
"public Optional<PickingRequest> getTask() {\n return Optional.ofNullable(task);\n }",
"@Override\n public int compareTo(TestTask o) {\n assert o != null;\n int result;\n if (this.isEvent()){\n result = o.isEvent() \n ? this.endTime.compareTo(o.endTime) \n : this.endTime.compareTo(o.deadline);\n } else {\n result = o.isEvent() \n ? this.deadline.compareTo(o.endTime) \n : this.deadline.compareTo(o.deadline);\n }\n return result == 0 \n ? this.name.compareTo(o.name)\n : result;\n }",
"public void setTaskType(int taskType) throws java.beans.PropertyVetoException {\n\t\tif (fieldTaskType != taskType) {\n\t\t\tint oldValue = fieldTaskType;\n\t\t\tfireVetoableChange(\"taskType\", new Integer(oldValue), new Integer(taskType));\n\t\t\tfieldTaskType = taskType;\n\t\t\tfirePropertyChange(\"taskType\", new Integer(oldValue), new Integer(taskType));\n\t\t}\n\t}",
"public String getTaskId() {\n Object ref = taskId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskId_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"@Override\n public int compareTo(Task otherTask) {\n if (areDifferentStates(otherTask)) {\n return isDone ? 1 : -1;\n }\n if (this.areDifferentDates(otherTask)) {\n return date.compareTo(otherTask.date);\n }\n return description.compareTo(otherTask.description);\n }",
"abstract boolean shouldTaskActivate();",
"public String getTaskId() {\n return this.taskId;\n }",
"public boolean interestingTask (Task t) { \n if (!super.interestingTask (t))\n return false;\n boolean hasTransport = t.getVerb().equals (Constants.Verb.TRANSPORT);\n\n if (logger.isDebugEnabled())\n logger.debug (\"found \" + t.getUID() + (hasTransport ? \" interesting\" : \" uninteresting\"));\n\n return hasTransport;\n }",
"public String getTaskName();",
"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 }",
"@Override\n public int compareTo(Task task) {\n int r = 0;\n\n if(this.hasStartAndEnd() && task.hasStartAndEnd()) {\n r = this.start.compareTo(task.start);\n if(r == 0) r = this.end.compareTo(task.end);\n } else if(this.hasStartAndEnd()) {\n return -1;\n } else if(task.hasStartAndEnd()) {\n return 1;\n }\n\n if(r == 0) r = this.name.compareTo(task.name);\n if(r == 0) r = this.duration.compareTo(task.duration);\n if(r == 0) r = this.description.compareTo(task.description);\n\n return r;\n }",
"private void loadEvent(String type) {\n String description = parser.parseDeadlineEventDescription(type);\n String timeString = parser.parseDateTimeEvent(type);\n LocalDate time = LocalDate.parse(timeString,\n DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"));\n Task toAdd = new Event(description, time);\n if (type.contains(\"\\u2713\")) {\n toAdd.markAsDone();\n }\n tasks.add(toAdd);\n }",
"TaskFactory getTaskFactory();",
"@Override\n public String getType() {\n return Const.JOB;\n }",
"public int getCustTask()\n\t{\n\t\treturn task;\n\t}",
"static Task createTaskFromFileFormattedString(String fileFormattedString)\r\n throws DukeException {\r\n String type = fileFormattedString.split(\"\\\\s+\\\\|\\\\s+\")[0];\r\n switch (type) {\r\n case \"T\":\r\n return TaskTodo.ofFileFormattedForm(fileFormattedString);\r\n case \"D\":\r\n return TaskDeadline.ofFileFormattedForm(fileFormattedString);\r\n case \"E\":\r\n return TaskEvent.ofFileFormattedForm(fileFormattedString);\r\n default:\r\n throw new DukeException(\"String is in invalid form.\");\r\n }\r\n }",
"public interface Item {\n\n boolean isTask();\n}",
"public boolean interestingTask(Task t) {\n boolean hasTransitVerb = t.getVerb().equals (Constants.Verb.TRANSIT);\n boolean hasTransportVerb = t.getVerb().equals (Constants.Verb.TRANSPORT);\n boolean hasVishnu = prepHelper.hasPrepNamed (t, \"VISHNU\");\n\n if (hasTransitVerb && hasVishnu) {\n if (isDebugEnabled())\n\tdebug (getName () + \".interestingTask - interested in TRANSIT task \" + t.getUID ());\n return true;\n }\n\n if (hasTransportVerb && hasVishnu) {\n if (isDebugEnabled())\n\tdebug (getName () + \".interestingTask - interested in TRANSPORT task \" + t.getUID ());\n return true;\n }\n\n if (isDebugEnabled())\n debug (getName () + \".interestingTask - NOT interested in \" + t.getUID ());\n\n return false;\n }",
"private String getSelectionTask() {\n String selection = \"\";\n\n if (mTypeTask.equals(TaskContract.TypeTask.Expired)) {\n selection = TaskEntry.COLUMN_TARGET_DATE_TIME + \"<?\";\n } else if(mTypeTask.equals(TaskContract.TypeTask.Today)) {\n selection = TaskEntry.COLUMN_TARGET_DATE_TIME + \"=?\";\n } else if(mTypeTask.equals(TaskContract.TypeTask.Future)) {\n selection = TaskEntry.COLUMN_TARGET_DATE_TIME + \">?\";\n }\n\n return selection;\n }",
"public AddCommand(String taskType, Optional<String> taskDescription) { \r\n this.taskType = taskType;\r\n this.taskDescription = taskDescription;\r\n this.taskDeadline = Optional.empty();\r\n this.taskStartDateTime = Optional.empty();\r\n this.taskEndDateTime = Optional.empty();\r\n this.task = makeTask(taskType, taskDescription, taskDeadline, \r\n taskStartDateTime, taskEndDateTime); \r\n }",
"public String getTaskId() {\n Object ref = taskId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskId_ = s;\n return s;\n }\n }",
"int getTask() {\n return task;\n }",
"public interface Task<T> {\r\n /**\r\n * run the task.\r\n *\r\n * @return T a generic type.\r\n */\r\n T run();\r\n}",
"public TaskProvider getTaskProvider();",
"public String getTaskId(){\r\n\t\treturn this.taskId;\r\n\t}",
"String getTaskName();",
"String getTaskName();",
"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 String getTaskName() {\n return this.taskDescription;\n }",
"public String getTaskId() {\n return taskId;\n }",
"public String getTaskId() {\n return taskId;\n }",
"public java.lang.String getTaskId() {\n return taskId;\n }",
"public java.lang.String getTaskId() {\n return taskId;\n }",
"public String getTaskWithoutType() {\n String out = \"\";\n for (int i = 1; i < commandSeparate.length; i++) {\n out += i == commandSeparate.length - 1\n ? commandSeparate[i] : commandSeparate[i] + \" \";\n }\n return out;\n }",
"public boolean hasTaskId() {\n return fieldSetFlags()[23];\n }",
"public Task(String task, boolean isDone) {\n this.task = task;\n this.isDone = isDone;\n }"
] | [
"0.7383763",
"0.70532477",
"0.69824976",
"0.6949126",
"0.69377786",
"0.69178194",
"0.6910966",
"0.6734206",
"0.67199653",
"0.66776943",
"0.62481123",
"0.61771506",
"0.6045911",
"0.6029678",
"0.5919709",
"0.5904985",
"0.5884058",
"0.5820582",
"0.5808819",
"0.5794204",
"0.5770901",
"0.5759488",
"0.5759488",
"0.571928",
"0.56281835",
"0.56051546",
"0.5598765",
"0.5597271",
"0.55709267",
"0.5553122",
"0.5553122",
"0.5531551",
"0.5527859",
"0.5507962",
"0.5504169",
"0.54657555",
"0.5460348",
"0.5445397",
"0.543862",
"0.5432726",
"0.5418019",
"0.541722",
"0.5407339",
"0.53745544",
"0.5371181",
"0.53614956",
"0.53433895",
"0.53250605",
"0.5311694",
"0.5308894",
"0.52856237",
"0.5282593",
"0.5277376",
"0.52499545",
"0.523984",
"0.523915",
"0.52284664",
"0.52265036",
"0.5215992",
"0.52124685",
"0.5209454",
"0.5208697",
"0.5208697",
"0.5208697",
"0.5180275",
"0.51772064",
"0.5172149",
"0.51709676",
"0.5167967",
"0.5153125",
"0.51472104",
"0.5133587",
"0.51227105",
"0.5114407",
"0.5109724",
"0.5101867",
"0.5099376",
"0.50971913",
"0.5095688",
"0.50844467",
"0.50729746",
"0.50720054",
"0.50709134",
"0.50686425",
"0.5066931",
"0.5058853",
"0.5055839",
"0.5049647",
"0.504699",
"0.5042876",
"0.5042876",
"0.5042503",
"0.50418603",
"0.5032182",
"0.5032182",
"0.50319284",
"0.50319284",
"0.5029481",
"0.5026509",
"0.5013491"
] | 0.5271625 | 53 |
Determines the Task Details like date limits or time of happening. | public String determineTaskDetailsFromFileLine(String line) {
int indexOfFirstSquareBracket = line.indexOf("[");
String details = line.substring(indexOfFirstSquareBracket + 8); // from unnecessary info at the front of line.
return details;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTaskTimeRange() {\n return taskTimeRange;\n }",
"@Override\n public String toString() {\n if (timeEnd == null) {\n stop();\n }\n return task + \" in \" + (timeEnd - timeStart) + \"ms\";\n }",
"List<Task> getTaskdetails();",
"public void viewTaskDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"TasksTab\"), \"TasksTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnTaskDetails\"), \"Task Details Button\");\n\n\t}",
"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 }",
"@Override\r\n public String toString()\r\n {\r\n return taskName + \",\" + dueDate + \"\";\r\n }",
"@Override\n\tpublic void run() {\n\t\t\tList<TaskTO> taskTOList = PriortyScheduler.getPriorityList(getEmployeeTO().getTaskTOList());\n\t\t\tfor(TaskTO taskTO : taskTOList){\n\t\t\t\tSystem.out.println(getEmployeeTO().getEmpName()+\">>\"+taskTO.getTaskName()+\">>\"+taskTO.getTimeTake());\n\t\t\t}\n\t\t\n\t}",
"@Override\n public String toString()\n {\n\n // IF TASK IS MARKED AS COMPLETE\n if(task_completion_boolean)\n {\n // IF THERE'S NO TASK DESCRIPTION\n if(task_description.isBlank() || task_description.equals(null))\n {\n return \"*** \" + String.format(\"[%s] %s\", task_due_date, task_title);\n } // END if\n\n return \"*** \" + String.format(\"[%s] %s | %s\", task_due_date, task_title, task_description);\n } // END if\n\n /***********************************************************/\n\n // OTHERWISE, TASK IS NOT COMPLETE\n else\n {\n // IF THERE'S NO TASK DESCRIPTION\n if(task_description.isBlank() || task_description.equals(null))\n {\n return String.format(\"[%s] %s\", task_due_date, task_title);\n } // END if\n\n return String.format(\"[%s] %s | %s\", task_due_date, task_title, task_description);\n } // END else\n\n }",
"public String get_task_description()\n {\n return task_description;\n }",
"@Override\n public String toString()\n {\n if(!isActive()) return \"Task \" + title + \" is inactive\";\n else\n {\n if(!isRepeated()) return \"Task \" + title + \" at \" + time;\n else return \"Task \" + title + \" from \" + start + \" to \" + end + \" every \" + repeat + \" seconds\";\n }\n }",
"int getTaskDetailsCount();",
"TaskDetail(int setTask, Integer setDescription, boolean isBasicControl, boolean canRepeat) {\n task = setTask;\n description = setDescription;\n basicControl = isBasicControl;\n canBeRepeated = canRepeat;\n }",
"private void doViewAllTasks() {\n ArrayList<Task> t1 = todoList.getListOfTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No tasks available.\");\n }\n }",
"TaskStatistics(String name) {\n this.name = name;\n this.taskId = \"\";\n }",
"static String getReadableTask(int taskTypeRepresentation) {\n return taskDetails.get(taskTypeRepresentation).getDescription();\n }",
"public String getTaskName() {\n return this.taskDescription;\n }",
"DurationTracker timeSpentTaskWait();",
"java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();",
"public void printTask() {\r\n\t\tSystem.out.println(\"ID: \" + this.id + \" | Description: \" + this.description + \" | Processor: \" + this.processor);\r\n\t\tSystem.out.println(\"Status: \" + this.status + \" | Fälligkeitsdatum: \" + this.formatedDueDate);\r\n\t\tSystem.out.println(\"----------\");\r\n\t}",
"static TaskDetail correspondsTo(int taskTypeRepresentation) {\n return taskDetails.get(taskTypeRepresentation);\n }",
"@Override\n\tpublic List<StudyTaskInfo> listTaskInfoByOpt(Integer sLogId, String taskName)\n\t\t\tthrows WEBException {\n\t\ttry {\n\t\t\tstDao = (StudyTaskDao) DaoFactory.instance(null).getDao(Constants.DAO_STUDY_TASK_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn stDao.findInfoByOpt(sess, sLogId, taskName);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"根据学习记录编号、学习任务获取学习任务记录列表时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}",
"private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No completed tasks available.\");\n }\n }",
"public String getDescription()\r\n {\r\n return \"Approver of the task \"+taskName();\r\n }",
"Object getTaskId();",
"long getTasksDeterminingBuildDurationMs();",
"public String getTask() {\n return task;\n }",
"public String getTask() {\n return task;\n }",
"public static void printTasks(){\n int totalTime = 0;\n int totalWait = 0;\n for(Task t : taskList){\n\n if(t.isAborted){\n System.out.println(\"TASK \" + t.taskNumber + \" aborted\" );\n }else{\n System.out.println(\"TASK \" + t.taskNumber + \" \" + t.terminateTime + \" \" + t.waitingCount + \" %\" + 100 * ((float)t.waitingCount / t.terminateTime));\n totalTime += t.terminateTime;\n totalWait += t.waitingCount;\n }\n }\n System.out.println(\"TOTAL\" + \" \" + totalTime + \" \" + totalWait + \" %\" + 100 *((float)totalWait / totalTime));\n\n }",
"public static void main(String[] args) {\n Task a = new Task(\"s\", new Date(0), new Date(1000*3600*24*7), 3600);\n a.setActive(true);\n System.out.println(a.getStartTime());\n System.out.println(a.getEndTime());\n System.out.println(a.nextTimeAfter(new Date(0)));\n\n\n\n }",
"@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}",
"public String GiveTask(){\n return \"[\" + getStatusIcon() + \"] \" + this.description;\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 abstract String getTaskName();",
"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}",
"private String getTaskName() {\n \n \t\treturn this.environment.getTaskName() + \" (\" + (this.environment.getIndexInSubtaskGroup() + 1) + \"/\"\n \t\t\t+ this.environment.getCurrentNumberOfSubtasks() + \")\";\n \t}",
"public String toString(){\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(\"dd-MM-yyyy HH:mm\");\n\t\treturn \"Estimated completion: \" + fmt.print(super.getEstimatedEndTime());\n\t}",
"@Override\n public String toString() {\n return \"Task no \"+id ;\n }",
"@Override\n public String toString() {\n return \"[\" + this.getStatusIcon() + \"] \" + this.taskDescription;\n }",
"@Override\n public String toString() {\n return \"[\" + this.getStatusIcon() + \"] \" + this.taskDescription;\n }",
"public String get_task_title()\n {\n return task_title;\n }",
"public String getTaskName();",
"@Override\n public String getTaskType() {\n return \"T\";\n }",
"private String getSelectionTask() {\n String selection = \"\";\n\n if (mTypeTask.equals(TaskContract.TypeTask.Expired)) {\n selection = TaskEntry.COLUMN_TARGET_DATE_TIME + \"<?\";\n } else if(mTypeTask.equals(TaskContract.TypeTask.Today)) {\n selection = TaskEntry.COLUMN_TARGET_DATE_TIME + \"=?\";\n } else if(mTypeTask.equals(TaskContract.TypeTask.Future)) {\n selection = TaskEntry.COLUMN_TARGET_DATE_TIME + \">?\";\n }\n\n return selection;\n }",
"com.google.cloud.aiplatform.v1.PipelineTaskDetail getTaskDetails(int index);",
"@Override\n\tpublic String getExtraInformation() {\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(\"dd-MM-yyyy HH:mm\");\n\t\treturn \"Deadline: \" + fmt.print(this.getDeadLine());\n\t}",
"java.util.List<? extends com.google.cloud.aiplatform.v1.PipelineTaskDetailOrBuilder> \n getTaskDetailsOrBuilderList();",
"int getTask() {\n return task;\n }",
"com.google.cloud.aiplatform.v1.PipelineTaskDetailOrBuilder getTaskDetailsOrBuilder(\n int index);",
"public String getTask(){\n\treturn task;\n}",
"String getTaskName();",
"String getTaskName();",
"public String getTaskDefinition() {\n return this.taskDefinition;\n }",
"public String getTaskDefinition() {\n return this.taskDefinition;\n }",
"@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 }",
"String getTaskId();",
"void refreshTaskInformation();",
"@Override\n public String getEndInfo() {\n return null;\n //return dateFormatter.stringFromDate(checkOutTime!)\n }",
"public void fetchTaskDetailsFromDB() {\n TaskInfo taskInfo = TaskInfo.getOrBadRequest(userTaskUUID);\n taskParams = Json.fromJson(taskInfo.getDetails(), UniverseDefinitionTaskParams.class);\n }",
"private void outputTask(Task[] taskList) throws OutputExecuteException {\n String[][] table = this.initTable(taskList.length + 1,\n MagicNumbersAndConstants.NUMBER_TASK_PROPERTIES);\n int iteration = taskList.length + 1;\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\n table = this.initNullTaskTable(table, 1);\n\n for (int i = 1; i < iteration; i++) {\n // task should be not null\n if (taskList[i - 1] == null) {\n throw new OutputExecuteException(\n OuputExecuteMessage.EXCEPTION_NULL_TASK);\n }\n\n if (taskList[i - 1].getTitle() == null) {\n table[i][0] = \"-\";\n } else {\n table[i][0] = taskList[i - 1].getTitle();\n }\n\n if (taskList[i - 1].getCategory() == null) {\n table[i][1] = \"-\";\n } else {\n table[i][1] = taskList[i - 1].getCategory();\n }\n if (taskList[i - 1].getDescription() == null) {\n table[i][2] = \"-\";\n } else {\n table[i][2] = taskList[i - 1].getDescription();\n }\n if (taskList[i - 1].getStartDate() == null) {\n table[i][3] = \"-\";\n } else {\n table[i][3] = df.format(taskList[i - 1].getStartDate());\n }\n if (taskList[i - 1].getEndDate() == null) {\n table[i][4] = \"-\";\n } else {\n table[i][4] = df.format(taskList[i - 1].getEndDate());\n }\n if (taskList[i - 1].getLocation() == null) {\n table[i][5] = \"-\";\n } else {\n table[i][5] = taskList[i - 1].getLocation();\n }\n\n table[i][6] = String.valueOf(taskList[i - 1].getPriority());\n\n if (taskList[i - 1].getReminder() == null) {\n table[i][7] = \"-\";\n } else {\n table[i][7] = df.format(taskList[i - 1].getReminder());\n }\n\n table[i][8] = taskList[i - 1].getTaskType().toString();\n\n if (taskList[i - 1].getStatus() == true) {\n table[i][9] = \"Done\";\n } else {\n table[i][9] = \"Not Done Yet\";\n }\n }\n this.printTable(table);\n }",
"private Tasks createDurationTask(Tasks task, String descriptionOfTask, ArrayList<String> timeArray) {\n if (timeArray.size() == 3) {\n String date = timeArray.get(0);\n String startTime = timeArray.get(1);\n String endTime = timeArray.get(2);\n task = createDurationTaskForSameDayEvent(task, descriptionOfTask, date, startTime, endTime);\n } else {\n String startDate = timeArray.get(0);\n String startTime = timeArray.get(1);\n String endDate = timeArray.get(2);\n String endTime = timeArray.get(3);\n task = createDurationTaskForFullInputCommand(task, descriptionOfTask, startDate, startTime, endDate, endTime);\n }\n return task;\n }",
"public String getTaskName(){\r\n\t\treturn this.taskName;\r\n\t}",
"public java.lang.Integer getTaskActualEffort() {\n return taskActualEffort;\n }",
"public String taskName() {\n return this.taskName;\n }",
"public String getName()\r\n {\r\n return taskName;\r\n }",
"public Time getTime() {\n return this.time; // returns the time associated with the task\n }",
"@Override\n public String getTaskType() {\n return this.taskType;\n }",
"public TaskDetails getSpecificTask (int position){\n return taskList.get(position);\n }",
"@Override\r\n public int compareTo(Task t)\r\n { \r\n //information of task passed in\r\n String dateTime=t.dueDate;\r\n String[] dateNoSpace1=dateTime.split(\" \");\r\n String[] dateOnly1=dateNoSpace1[0].split(\"/\");\r\n String[] timeOnly1=dateNoSpace1[1].split(\":\");\r\n \r\n //information of task being compared\r\n String[] dateNoSpace=this.dueDate.split(\" \");\r\n String[] dateOnly=dateNoSpace[0].split(\"/\");\r\n String[] timeOnly=dateNoSpace[1].split(\":\");\r\n \r\n //compares tasks by...\r\n \r\n //years\r\n if(dateOnly1[2].equalsIgnoreCase(dateOnly[2])) \r\n { \r\n //months\r\n if(dateOnly1[0].equalsIgnoreCase(dateOnly[0]))\r\n {\r\n //days\r\n if(dateOnly1[1].equalsIgnoreCase(dateOnly[1]))\r\n {\r\n //hours\r\n if(timeOnly1[0].equalsIgnoreCase(timeOnly[0]))\r\n {\r\n //minutes\r\n if(timeOnly1[1].equalsIgnoreCase(timeOnly[1]))\r\n {\r\n //names\r\n if(this.taskName.compareTo(t.taskName)>0)\r\n { \r\n return -1;\r\n } \r\n else return 1;\r\n }\r\n //if minutes are not equal, find the soonest one\r\n else if(Integer.parseInt(timeOnly1[1])<Integer.parseInt(timeOnly[1]))\r\n {\r\n return -1; \r\n } \r\n else return 1;\r\n }\r\n //if hours are not equal, find the soonest one\r\n else if(Integer.parseInt(timeOnly1[0])<Integer.parseInt(timeOnly[0]))\r\n {\r\n return -1; \r\n } \r\n else return 1;\r\n }\r\n //if days are not equal, find the soonest one\r\n else if(Integer.parseInt(dateOnly1[1])<Integer.parseInt(dateOnly[1]))\r\n {\r\n return -1; \r\n }\r\n else return 1;\r\n }\r\n //if months are not equal, find the soonest one\r\n else if(Integer.parseInt(dateOnly1[0])<Integer.parseInt(dateOnly[0]))\r\n {\r\n return -1; \r\n } \r\n else return 1;\r\n }\r\n //if years are not equal, find the soonest one \r\n else if(Integer.parseInt(dateOnly1[2])<Integer.parseInt(dateOnly[2]))\r\n {\r\n return -1;\r\n }\r\n else return 1;\r\n }",
"public String getTaskType() { return \"?\"; }",
"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 }",
"public int getCustTask()\n\t{\n\t\treturn task;\n\t}",
"public TaskDetailDto() {\n\t\tsuper();\n\t\tid = 0;\n\t\tproject = \"\";\n\t\tnameTask = \"\";\n\t\tstatus = \"\";\n\t\tasign = \"\";\n\t\tpriority = \"\";\n\t\tdueDate = null;\n\t\toriginalEstimate = null;\n\t\tdecription = \"\";\n\t\tstartDate = null;\n\t\tendDate = null;\n\t\tcreateBy = \"\";\n\t\tcreateOn = null;\n\t\tmodifyBy = \"\";\n\t\tmodifyOn = null;\n\t\tmodifyById = null;\n\t\tcreateById = null;\n\t\tasignId = null;\n\t}",
"private String formatTask(Task task) {\n String identifier = task.getType();\n String completionStatus = task.isComplete() ? \"1\" : \"0\";\n String dateString = \"\";\n if (task instanceof Deadline) {\n Deadline d = (Deadline) task;\n LocalDateTime date = d.getDate();\n dateString = date.format(FORMATTER);\n }\n if (task instanceof Event) {\n Event e = (Event) task;\n LocalDateTime date = e.getDate();\n dateString = date.format(FORMATTER);\n }\n return String.join(\"|\", identifier, completionStatus, task.getName(), dateString);\n }",
"@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}",
"public java.lang.Integer getTaskEstimatedEffort() {\n return taskEstimatedEffort;\n }",
"public TaskSummary getTask(Long taskId){\n TaskServiceSession taskSession = null;\n try {\n taskSession = jtaTaskService.createSession();\n Task taskObj = taskSession.getTask(taskId);\n TaskSummary tSummary = new TaskSummary();\n tSummary.setActivationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setActualOwner(taskObj.getTaskData().getActualOwner());\n tSummary.setCreatedBy(taskObj.getTaskData().getCreatedBy());\n tSummary.setCreatedOn(taskObj.getTaskData().getCreatedOn());\n tSummary.setDescription(taskObj.getDescriptions().get(0).getText());\n tSummary.setExpirationTime(taskObj.getTaskData().getExpirationTime());\n tSummary.setId(taskObj.getId());\n tSummary.setName(taskObj.getNames().get(0).getText());\n tSummary.setPriority(taskObj.getPriority());\n tSummary.setProcessId(taskObj.getTaskData().getProcessId());\n tSummary.setProcessInstanceId(taskObj.getTaskData().getProcessInstanceId());\n tSummary.setStatus(taskObj.getTaskData().getStatus());\n tSummary.setSubject(taskObj.getSubjects().get(0).getText());\n return tSummary;\n }catch(RuntimeException x) {\n throw x;\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }",
"public java.lang.String getTimeLimitAction();",
"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 }",
"public List<TaskDescription> getActiveTasks();",
"public String getTaskId(){\r\n\t\treturn this.taskId;\r\n\t}",
"public abstract String[] formatTask();",
"public TimedTask(String task) {\n this.task = task;\n timeStart = System.currentTimeMillis();\n }",
"public int getWorkRequired() {\n return time;\n }",
"@ApiModelProperty(\n example = \"00000000-0000-0000-0000-000000000000\",\n value = \"Identifier of the task that time entry is logged against.\")\n /**\n * Identifier of the task that time entry is logged against.\n *\n * @return taskId UUID\n */\n public UUID getTaskId() {\n return taskId;\n }",
"public TaskDefinition() {\n\t\tthis.started = Boolean.FALSE; // default\n\t\tthis.startTime = new Date(); // makes it easier during task creation\n\t\t// as we have a default date populated\n\t\tthis.properties = new HashMap<>();\n\t}",
"public void getSecsDetail( );",
"public void showDetails(View view){\n View parent=(View)view.getParent();\n taskname=(TextView)parent.findViewById(R.id.tname);\n String ts=String.valueOf(taskname.getText());\n ArrayList<String>a = help.getAllTaskDtae( ts);\n if(a.isEmpty() ) {\n // show message\n showMessage(\"Error\",\"Nothing found\");\n return;\n }\n StringBuffer buffer = new StringBuffer();\n if(a.contains(ts)) {\n buffer.append(\"Task Name :- \"+ a.get(0)+\"\\n\");\n buffer.append(\"Task Date :- \"+ a.get(1)+\"\\n\");\n buffer.append(\"Remainder Date :\"+ a.get(2)+\"\\n\\n\");\n }\n\n //Show all data\n showMessage(\"Data\",buffer.toString());\n }",
"public Task(String taskName, String dueDate)\r\n {\r\n this.dueDate=dueDate;\r\n this.taskName=taskName;\r\n }",
"public String getTaskId() {\n return this.taskId;\n }",
"@Override\n\tpublic int getActivityInfo() {\n\t\treturn Constants.ActivityInfo.ACTIVITY_ADDWAITACTIVITY;\n\t}",
"public TaskName getTaskName() {\n return this.taskName;\n }",
"public int getTasks() {\r\n return tasks;\r\n }",
"int getNumberOfTasksDeterminingBuildDuration();",
"public String getTaskType() {\n return taskType;\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 }",
"public Hashtable getTaskDefinitions() {\n return ComponentHelper.getComponentHelper(this).getTaskDefinitions();\n }",
"public int getTaskType() {\n\t\treturn fieldTaskType;\n\t}",
"public String getType() {\n return \"Task\";\n }"
] | [
"0.66196775",
"0.64301443",
"0.6416767",
"0.63667876",
"0.63178205",
"0.6272974",
"0.61885387",
"0.61420214",
"0.6130772",
"0.6110617",
"0.60577774",
"0.6041577",
"0.60200477",
"0.5949283",
"0.59478414",
"0.58965653",
"0.5857895",
"0.58576345",
"0.58432746",
"0.58301073",
"0.58283955",
"0.5827076",
"0.58181715",
"0.5815421",
"0.58109486",
"0.57943386",
"0.57943386",
"0.57713807",
"0.57658005",
"0.5744344",
"0.57423145",
"0.57133853",
"0.57117325",
"0.57115275",
"0.57091635",
"0.570875",
"0.57044345",
"0.5695279",
"0.5695279",
"0.5693767",
"0.5686217",
"0.5678928",
"0.5666234",
"0.5654945",
"0.5646007",
"0.5641664",
"0.5629494",
"0.5622343",
"0.56189775",
"0.56111157",
"0.56111157",
"0.5598221",
"0.5598221",
"0.5592075",
"0.55898106",
"0.5589697",
"0.5588488",
"0.5585917",
"0.55839527",
"0.5578506",
"0.55784315",
"0.55694383",
"0.5557899",
"0.5555601",
"0.55336326",
"0.55092883",
"0.55062413",
"0.5482154",
"0.54789436",
"0.5476104",
"0.5456359",
"0.54515743",
"0.54426783",
"0.54324996",
"0.5424786",
"0.54208887",
"0.5415098",
"0.54097843",
"0.54097843",
"0.54097843",
"0.54097843",
"0.54092336",
"0.5392154",
"0.5382867",
"0.5372811",
"0.5369208",
"0.5360578",
"0.5346996",
"0.53393483",
"0.53361464",
"0.53359616",
"0.53338206",
"0.53323454",
"0.53321534",
"0.532506",
"0.5316799",
"0.53092587",
"0.5282947",
"0.52785033",
"0.52750605",
"0.5272547"
] | 0.0 | -1 |
Checks if the String obtained from lastSavedTasks.txt represents a completed Task. | public boolean isDone(String s) {
return (s.equals("V"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean done() {\n\t\tfor(Task t : details.getPendingTasks()){\n\t\t\tif(!t.isComplete())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean is_completed();",
"public boolean isCompleteSchedule() {\n if (this.getScheduledTask() != null) {\n return this.getScheduledTask().getNode().getId().equals(\"end\");\n } else return false;\n }",
"public boolean determineIfValidDoneCommand(String[] commandWords, int taskListSize) {\n int taskNumber = Integer.parseInt(commandWords[1]);\n return (taskNumber <= taskListSize);\n }",
"public void completeTask()\n throws NumberFormatException, NullPointerException, IndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n int taskNumber = Integer.parseInt(userIn.split(\" \")[TASK_NUMBER]);\n\n int taskIndex = taskNumber - 1;\n\n tasks.get(taskIndex).markAsDone();\n storage.updateFile(tasks.TaskList);\n System.out.println(\"Bueno! The following task is marked as done: \\n\" + tasks.get(taskIndex));\n } catch (NumberFormatException e) {\n ui.printNumberFormatException();\n } catch (NullPointerException e) {\n ui.printNullPtrException();\n } catch (IndexOutOfBoundsException e) {\n ui.printIndexOOBException();\n }\n System.out.println(LINEBAR);\n }",
"public boolean isCompleted()\n\t{\n\t\treturn pieces.length == existing.cardinality();\n\t}",
"public boolean isCompleted() {\n\t\t\n\t\treturn completed;\n\t\t\n\t}",
"public boolean isFinished() { \n // Check how much time has passed\n int passedTime = millis()- savedTime;\n if (passedTime > totalTime) {\n return true;\n } else {\n return false;\n }\n }",
"boolean isCompleted();",
"public boolean isDone()\n {\n return (this.elapsed >= this.duration);\n }",
"public boolean isCompleted() {\n\t\treturn program.getBPCFG().isCompleted();\n\t}",
"private boolean isCompleted(final String stage) {\n return mRegistrationResponse != null && mRegistrationResponse.completed != null && mRegistrationResponse.completed.contains(stage);\n }",
"@Override\n public boolean isCompleted() {\n return time.secondsPassed==finishLevel;\n }",
"public static boolean isDone(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase DONE:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean isValidString(String task) \n\t{\n\t\tfor (int i = 0; i < names.length; i++) \n\t\t{\n\t\t\tif(task.equals(names[i]))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasCompleteFile();",
"boolean isComplete();",
"boolean isComplete();",
"public static boolean isCompleted(){\n return isComplete;\n }",
"public boolean isCompleted() {\r\n return completed;\r\n }",
"public void verifyEngagementOverviewToDoIsComplete() {\n String strStepSuccess = \"Verify engagement overview ToDo is complete\";\n String strStepFail = \"TestScript Failed: Verify engagement overview ToDo is complete\";\n try {\n boolean result;\n String strEngagementOverViewToDo = eleEngagementOverViewToDoText.getText().trim().split(\"%\")[0];\n result = ENGAGEMENT_OVER_VIEW_TODO_COMPLETE.toLowerCase().equals(strEngagementOverViewToDo.toLowerCase());\n Assert.assertTrue(result, \"Engagement overview ToDo does not change\");\n NXGReports.addStep(strStepSuccess, LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(strStepFail, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }",
"public boolean addNewFinishedTask(Task task){\r\n return finished.add(task);\r\n }",
"public boolean isCompleted() {\n return completed;\n }",
"public boolean isCompleted() {\r\n return completed;\r\n }",
"public boolean isComplete()\n {\n return getStatus() == STATUS_COMPLETE;\n }",
"public boolean isCompleted(){\r\n\t\treturn isCompleted;\r\n\t}",
"protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }",
"public boolean isComplete(){\r\n\r\n\t\t// TODO\r\n\t\t\r\n\t\tif(!isValid()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"boolean hasTask();",
"public boolean isComplete()\n\t{\n\t\treturn getStep() == getRepeatCount() * 2 + 1;\n\t}",
"public abstract boolean isCompleted();",
"boolean hasIsComplete();",
"boolean hasIsComplete();",
"public boolean isComplete();",
"public boolean isDone() {\r\n\t\tint count = 0;\r\n\t\t//Checks the movieGuess array for '_' characters. If there are none we can safely assume the player has finished.\r\n\t\tfor(int x = 0; x < movieGuess.length; x++) {\r\n\t\t\tif(movieGuess[x] == '_')\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//used a counter to avoid premature (i.e., before finishing the array traversal) true or false.\r\n\t\tif(count > 0)\r\n\t\t\treturn false;\t\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}",
"@Override\r\n public boolean equals(Object obj) {\r\n if (obj == null) {\r\n return false;\r\n }\r\n\r\n Task otherTask = (Task) obj;\r\n\r\n if (!otherTask.getName().equals(this.getName())) {\r\n return false; // not equal, different task name\r\n }\r\n if (otherTask.isCompleted() != this.isCompleted()) {\r\n return false; // not equal, different completed status\r\n }\r\n \r\n return true;\r\n }",
"public boolean isFinal() {\n\t\tif (targetTaskId.charAt(0) == '$') {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isCompleted() {\n return this.completed;\n }",
"protected boolean isFinished() {\n\t\tif (!hasPathStarted) {\n\t\t\treturn false;\n\t\t}\n\t\tboolean leftComplete = status.activePointValid && status.isLast;\n\t\tboolean trajectoryComplete = leftComplete;\n\t\tif (trajectoryComplete) {\n\t\t\tSystem.out.println(\"Finished trajectory\");\n\t\t}\n\t\treturn trajectoryComplete || isFinished;\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }",
"@Override\n\tpublic boolean isCompleted()\n\t{\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }",
"protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }",
"public String determineTaskDoneStatusFromFileLine(String line) {\n int indexOfFirstSquareBracket = line.indexOf(\"[\");\n String doneStatus = String.valueOf(line.charAt(indexOfFirstSquareBracket + 1));\n assert (doneStatus.equals(\"V\") || doneStatus.equals(\"X\")) : \"Done status can only be X or V\";\n return doneStatus;\n }",
"@Override\n\tpublic boolean isFinished() {\n\t\treturn (this.timeRemaining == 0);\n\t}",
"protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\r\n\tpublic boolean finishCurrentTask() {\r\n\t\treturn finished;\r\n\t}",
"public boolean isIncomplete()\n {\n\treturn toDo.size() > 0;\n }",
"public boolean isCompleted() {\n return currentItemState == ItemProcessingState.COMPLETED;\n }",
"public void checkTask(String task){\r\n\t\t\r\n\t}",
"private void checkForComplete(int topTaskId) throws DAOException\n {\n TransferTask topTask = dao.getTransferTaskByID(topTaskId);\n // Check to see if all the children of a top task are complete. If so, update the top task.\n if (!topTask.getStatus().equals(TransferTaskStatus.COMPLETED))\n {\n long incompleteParentCount = dao.getIncompleteParentCount(topTaskId);\n long incompleteChildCount = dao.getIncompleteChildrenCount(topTaskId);\n if (incompleteChildCount == 0 && incompleteParentCount == 0)\n {\n topTask.setStatus(TransferTaskStatus.COMPLETED);\n topTask.setEndTime(Instant.now());\n log.trace(LibUtils.getMsg(\"FILES_TXFR_TASK_COMPLETE1\", topTaskId, topTask.getUuid(), topTask.getTag()));\n dao.updateTransferTask(topTask);\n }\n }\n }",
"public abstract boolean isComplete();",
"protected boolean isFinished()\n {\n return timer.get() > driveDuration;\n }",
"public boolean isFinished() {\n\t\tif (gameSituation == UNFINISHED) {\n\t\t\treturn false;\n\t\t} // Of if\n\n\t\treturn true;\n\t}",
"boolean completed();",
"public boolean isFinished() {\n\t\tif (getRemaining() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void validateTaskStatus(String strTaskStatus){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"TasksTab\"), \"TasksTab\");\n\t\tif(libManhattanCommonFunctions.verifyElementPresent(\"//span[@id='dataForm:tskLstTbl:_colhdr_id1']\", \"XPATH\")){\n\t\t\tString actualTaskStatus = libManhattanCommonFunctions.getElementByProperty(\"//span[@id='dataForm:tskLstTbl:_colhdr_id1']\", \"XPATH\").getText();\n\t\t\ttry{\n\t\t\t\tif(actualTaskStatus.trim().equals(strTaskStatus))\n\t\t\t\t{\n\t\t\t\t\treport.updateTestLog(\"Task Status verification\", \"Actual task status : \"+actualTaskStatus+ \" is verified\", Status.PASS);\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\treport.updateTestLog(\"Task Status verification\", \"Expected task status :\"+strTaskStatus+\" || Actual task status : \"+actualTaskStatus, Status.FAIL);\n\t\t\t\t}\n\n\t\t\t}catch(Exception e){\n\t\t\t\treport.updateTestLog(\"Element\", \"Element Not Found\", Status.FAIL);\n\t\t\t}\n\t\t}else{\n\t\t\treport.updateTestLog(\"Task Status\", \"Task is not created\", Status.FAIL);\n\t\t}\n\n\t}",
"public boolean isDone();",
"public boolean isDone();",
"public boolean pathCompleted() {\n\t\treturn path == null || path.isEmpty();\n\t}",
"public boolean hasCompleted() {\n return this.tail.value != null && NotificationLite.isComplete(leaveTransform(this.tail.value));\n }",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn (System.currentTimeMillis() > Endtime);\n\t}",
"boolean hasFinished();",
"boolean isFinished() {\n return includedInLastStep() && (end == elementList.size() - 1);\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 }",
"@Override\n public boolean isCompleted() {\n return isAllChildCompleted() || this.completion == 1;\n }",
"protected boolean isFinished() {\n return System.currentTimeMillis() - timeStarted >= timeToGo;\n }",
"protected boolean isFinished() {\n return finished;\n }",
"public boolean isComplete() {\n\t\treturn false;\n\t}",
"public boolean isDone() {\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }",
"protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public boolean isCompleted() {\r\n\r\n\t\treturn (getAmount() - offeredQuantity) == 0 || isAborted();\r\n\r\n\t}",
"protected boolean isFinished() {\n \tTargetTransform tt = Robot.vision_.getLatestGearLiftTargetTransform();\n \t\n \tif ( !isTimedOut() )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( tt == null )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( !tt.targetFound() )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( previousTargetTransform == null )\n \t{\n \t\tRobot.vision_.takeTargetSnapshot( tt );\n\t\t\treturn true;\n \t}\n \t\n \tif ( !tt.equals(previousTargetTransform) )\n \t{\n\t\t\tRobot.vision_.takeTargetSnapshot( tt );\n\t\t\treturn true;\n \t}\n \t\n \treturn false;\n }",
"protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}",
"private synchronized boolean taskIsEmpty() {\n\t\treturn taskList.isEmpty();\n\t}",
"public void completeTask() {\n completed = true;\n }",
"Boolean isFinished();",
"protected boolean isFinished() {\n\t\tif (_timesRumbled == 40) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public Boolean isComplete() {\n return true;\n }",
"public void checkTask() throws InvalidTask {\n\n int incidenceOfTask = (int) TaskList.taskArrayList.stream()\n .filter(task -> task.toString().contains(command))\n .count();\n if (incidenceOfTask == 0) {\n throw new InvalidTask();\n }\n\n }",
"boolean isDone();",
"public boolean isDone(){\n return status;\n }",
"public boolean isDone() {\n\t\t\n\t\treturn done;\n\t}",
"public static boolean toggleComplete(Task task) {\n Boolean complete = task.getCompleted(); // Get the current value\n\n // TOGGLE COMPLETE\n if (complete) // store the opposite of the current value\n complete = false;\n else\n complete = true;\n try{\n String query = \"UPDATE TASK SET ISCOMPLETE = ? WHERE (NAME = ? AND COLOUR = ? AND DATE = ?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query); // Setup statement for query\n statement.setString(1, complete.toString()); // Store new isCompleted value\n statement.setString(2, task.getName()); // store values of task\n statement.setString(3, task.getColor().toString());\n statement.setString(4, Calendar.selectedDay.getDate().toString());\n int result = statement.executeUpdate(); // send out the statement\n if (result > 0){ // If swapped successfully, re-load the tasks\n getMainController().loadTasks(); // Reload the task list to update the graphics.\n }\n return (result > 0);\n } catch (SQLException e) {\n e.printStackTrace(); // If task was unable to be edited\n e.printStackTrace(); // Create alert for failing to edit\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to edit task.\");\n alert.showAndWait();\n }\n return false;\n }",
"protected boolean isFinished() {\n \t//ends \n \treturn isTimedOut();\n }",
"public boolean isDone() { return true; }",
"@Test\n public void deserialize_correct() {\n Task task = Task.deserialize(\"Deadline,false,return book,Dec 02 2019 - 06 00 PM\");\n assertTrue(task instanceof DeadlineTask);\n\n assertTrue(!task.isTaskDone());\n assertEquals(\"return book\", task.getTaskText());\n assertEquals(\"Dec 02 2019 - 06 00 PM\", task.getTaskTime());\n }",
"boolean isFinished() {\n if (completeCount < reserve) {\n return false;\n }\n\n // We need to check if the last entry was used\n final OutboundQueueEntry last = queue[reserve];\n return !last.isCommitted() || last.isCompleted();\n }",
"public boolean completed() {\n return completed;\n }",
"protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }",
"protected boolean isFinished() {\n\t\treturn isTimedOut();\n\t}",
"protected boolean isFinished() {\n\treturn this.isDone;\n }",
"public boolean isFinished() {\n return _steps.isEmpty();\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 }",
"public static String parseDone(String instruction) throws JarvisException, IOException {\n if (instruction.length() < 6) {\n throw new JarvisException(Ui.EMPTY_TASK_DONE);\n } else {\n try {\n int taskNum = Integer.parseInt(instruction.substring(5)) - 1;\n\n // If the task number keyed in by the user is invalid\n if (taskNum >= TaskList.getCounter() || taskNum < 0) {\n throw new JarvisException(Ui.invalidTaskNum(taskNum));\n // If the task number keyed in by the user is valid\n } else {\n return TaskList.markAsDoneAndUpdate(taskNum);\n }\n } catch (NumberFormatException | IOException e) {\n throw new JarvisException(Ui.UNRECOGNISED_COMMAND);\n }\n }\n }",
"public boolean isFinished() {\n\t\treturn (finished);\n\t}",
"public boolean isComplete() {\r\n\t\treturn complete;\r\n\t}",
"public boolean isComplete() {\n return future != null && future.isDone();\n }",
"public boolean isComplete( ) {\n\t\treturn complete;\n\t}"
] | [
"0.6408938",
"0.64088184",
"0.62692523",
"0.62610936",
"0.61985755",
"0.61634934",
"0.6109337",
"0.60801977",
"0.6074419",
"0.6069411",
"0.6040174",
"0.6033828",
"0.5965446",
"0.59620965",
"0.5951066",
"0.59425694",
"0.5932424",
"0.5932424",
"0.59085715",
"0.5874597",
"0.5873552",
"0.5867618",
"0.58574677",
"0.58524066",
"0.58479255",
"0.58019066",
"0.57956254",
"0.57797635",
"0.57794243",
"0.5774597",
"0.5773524",
"0.57720184",
"0.57720184",
"0.57684714",
"0.57274795",
"0.57210284",
"0.571809",
"0.57090706",
"0.5689484",
"0.56892556",
"0.5688202",
"0.5670505",
"0.56603056",
"0.56421083",
"0.5638609",
"0.56356275",
"0.5623801",
"0.56217974",
"0.5613907",
"0.5613474",
"0.56070095",
"0.56018037",
"0.5600058",
"0.5594286",
"0.55840796",
"0.558024",
"0.55768186",
"0.55757785",
"0.55757785",
"0.5574736",
"0.5561867",
"0.55417645",
"0.55297655",
"0.5519786",
"0.55185354",
"0.5510873",
"0.55088407",
"0.5505572",
"0.55005497",
"0.55001813",
"0.5499567",
"0.54995584",
"0.549677",
"0.54951537",
"0.5493564",
"0.5490352",
"0.54863745",
"0.54830205",
"0.5478009",
"0.5463576",
"0.54600614",
"0.54596484",
"0.54595333",
"0.54559827",
"0.5449695",
"0.5448814",
"0.54475296",
"0.5447314",
"0.54468334",
"0.5442728",
"0.54424053",
"0.54377675",
"0.54270923",
"0.54203945",
"0.54195154",
"0.5410521",
"0.5409595",
"0.54066926",
"0.5404448",
"0.5402656"
] | 0.6331015 | 2 |
TaskList methods Gives String representing the command type. | public String findKeywordFromString(String command) {
// Split String command to find the intention of the user (first word)
String[] commandWords = command.split("\\s");
return commandWords[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getType() {\n return theTaskType ;\n }",
"public String getType() {\n return \"Task\";\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}",
"public TaskType getTaskType() {\n return (TaskType) commandData.get(CommandProperties.TASK_TYPE);\n }",
"@Override\n public String getTaskType() {\n return this.taskType;\n }",
"public String getTaskType() {\n return taskType;\n }",
"@Override\n public String getTaskType() {\n return \"T\";\n }",
"public String getTaskWithoutType() {\n String out = \"\";\n for (int i = 1; i < commandSeparate.length; i++) {\n out += i == commandSeparate.length - 1\n ? commandSeparate[i] : commandSeparate[i] + \" \";\n }\n return out;\n }",
"public String getTaskType() { return \"?\"; }",
"CommandTypes(String command) {\n this.command = command;\n }",
"public TaskType getTaskType() {\n return taskType;\n }",
"public interface CommandType {\n\n /** Returns unique identifier for this command type. */\n @NotNull\n String getId();\n\n /** Returns the display name of the command type. */\n @NotNull\n String getDisplayName();\n\n /** Returns the icon used to represent the command type. */\n @NotNull\n SVGResource getIcon();\n\n /** Returns the {@link CommandConfigurationPage}s that allow to configure specific command parameters. */\n @NotNull\n Collection<CommandConfigurationPage<? extends CommandConfiguration>> getConfigurationPages();\n\n /** Returns factory for {@link CommandConfiguration} instances. */\n @NotNull\n CommandConfigurationFactory<? extends CommandConfiguration> getConfigurationFactory();\n\n /** Returns command template that will be used for newly created command. */\n @NotNull\n String getCommandTemplate();\n\n /** Returns template for preview Url. */\n String getPreviewUrlTemplate();\n}",
"public String getCommandType() {\n return commandType;\n }",
"public Vector<String> getTaskTypes() {\r\n\t\tVector<String> v = new Vector<String>();\r\n\r\n\t\tfor (TaskType tt : taskTypes) {\r\n\t\t\tv.add(tt.name);\r\n\t\t}\r\n\r\n\t\treturn v;\r\n\t}",
"List<CommandInfo> list();",
"public int getTaskType() {\n\t\treturn fieldTaskType;\n\t}",
"java.util.List<java.lang.String>\n getCommandList();",
"List<String> getCommandDescription();",
"List<CmdType> getSupportedTypes();",
"@Override\n\tpublic String getCommandType() {\n\t\treturn \"BreakPointCommand\";\n\t}",
"@Override\n public String executeCommand(TaskList taskList, Storage storage) {\n return taskList.findTasks(this.keyword);\n }",
"public String getTaskType(){\n return \"To be overridden by subclass\";\n }",
"public com.google.protobuf.ProtocolStringList\n getTaskIdList() {\n return taskId_;\n }",
"java.util.List<String>\n getTaskIdList();",
"List<String> getCommands();",
"public Command commandType() {\r\n if (command.startsWith(\"push\")) {\r\n return Command.C_PUSH;\r\n } else if (command.startsWith(\"pop\")) {\r\n return Command.C_POP;\r\n } else if (isArithmeticCmd()) {\r\n return Command.C_ARITHMETIC;\r\n } else if (command.startsWith(\"label\")) {\r\n return Command.C_LABEL;\r\n } else if (command.startsWith(\"goto\")) {\r\n return Command.C_GOTO;\r\n } else if (command.startsWith(\"if-goto\")) {\r\n return Command.C_IF;\r\n } else if (command.startsWith(\"function\")) {\r\n return Command.C_FUNCTION;\r\n } else if (command.startsWith(\"call\")) {\r\n return Command.C_CALL;\r\n } else if (command.startsWith(\"return\")) {\r\n return Command.C_RETURN;\r\n } else {\r\n return null;\r\n }\r\n }",
"public CommandResult execute() {\n String message = tasks.listTasks(keyWord);\n return new CommandResult(message);\n }",
"public String listOfTasks() {\n String listOfTasks = Messages.LIST_TASKS_MESSAGE;\n for (int i = 0; i < Parser.getOrderAdded(); i++) {\n listOfTasks += recordedTask.get(i).getTaskNum() + DOT_OPEN_SQUARE_BRACKET\n + recordedTask.get(i).getCurrentTaskType() + CLOSE_SQUARE_BRACKET + OPEN_SQUARE_BRACKET\n + recordedTask.get(i).taskStatus() + CLOSE_SQUARE_BRACKET + Messages.BLANK_SPACE\n + recordedTask.get(i).getTaskName()\n + ((i == Parser.getOrderAdded() - 1) ? Messages.EMPTY_STRING : Messages.NEW_LINE);\n }\n return listOfTasks;\n }",
"@Override\r\n\tpublic List<ExecuteTask> getByMemberByType(int memberId, 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_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_type = ?)\";\r\n\t\treturn getForList(sql,memberId,taskType);\r\n\t}",
"public TaskList addCommand(ListItem task) {\n List<ListItem> tempList = new ArrayList<>(this.listItems);\n tempList.add(task);\n return new TaskList(tempList);\n }",
"public String GiveTask(){\n return \"[\" + getStatusIcon() + \"] \" + this.description;\n }",
"public String[] getTaskList() {\n String[] tasks = {\"export\"};\n\n return tasks;\n }",
"public com.google.protobuf.ProtocolStringList\n getCommandList() {\n return command_;\n }",
"String getTaskId();",
"public static void listAllCommands(){\n printLine();\n System.out.println(\" Hello there! Here are all the available commands and their respective formats:\");\n System.out.println(\" To add a deadline: \\\"deadline {Name of task} /by {date} \\\"\");\n System.out.println(\" To add an event: \\\"event {Name of task} /at {date} \\\" \\\");\");\n System.out.println(\" To add an item in todo: \\\"todo {Name of task}\\\" \");\n System.out.println(\" To list out all tasks that you have entered: \\\"list\\\"\");\n System.out.println(\" To filter task by date: \\\"list {date}\\\"\");\n System.out.println(\" To mark a task as completed: \\\"done {index of task in list}\\\"\");\n System.out.println(\" To delete a task: \\\"delete {index of task in list}\\\"\");\n System.out.println(\" To find a task: \\\"find {keyword to be searched }\\\"\");\n printLine();\n }",
"public String getTaskName();",
"public String getTaskClass() {\n\t\treturn this.taskClass;\n\t}",
"private Integer mapCommandType(String cmd) {\n\n\t\tif (isCommandType(Command.ADD_COMMAND, cmd)) {\n\t\t\treturn Command.ADD_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.CHANGE_STORAGE_COMMAND, cmd)) {\n\t\t\treturn Command.CHANGE_STORAGE_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.DELETE_COMMAND, cmd)) {\n\t\t\treturn Command.DELETE_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.DONE_COMMAND, cmd)) {\n\t\t\treturn Command.DONE_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.EDIT_COMMAND, cmd)) {\n\t\t\treturn Command.EDIT_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.LIST_COMMAND, cmd)) {\n\t\t\treturn Command.LIST_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.UNDO_COMMAND, cmd)) {\n\t\t\treturn Command.UNDO_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.SEARCH_COMMAND, cmd)) {\n\t\t\treturn Command.SEARCH_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.LIST_TODAY_COMMAND, cmd)) {\n\t\t\treturn Command.LIST_TODAY_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.LIST_NEXT_COMMAND, cmd)) {\n\t\t\treturn Command.LIST_NEXT_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.HELP_COMMAND, cmd)) {\n\t\t\treturn Command.HELP_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.SCHEDULE_COMMAND, cmd)) {\n\t\t\treturn Command.SCHEDULE_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.UNDONE_COMMAND, cmd)) {\n\t\t\treturn Command.UNDONE_COMMAND_TYPE;\n\t\t} else if (isCommandType(Command.GOOGLE_ADD_COMMAND, cmd)) {\n\t\t\treturn Command.GOOGLE_ADD_COMMAND_TYPE;\n\t\t} else {\n\t\t\treturn ERROR_COMMAND_TYPE;\n\t\t}\n\n\t}",
"TrackerListTasktype getTrackerListTasktype(final Integer id);",
"java.lang.String getCommand();",
"public abstract String getTaskName();",
"public List<Task> listTasks(String extra);",
"MBeanInfo getCommandDescription(String commandType);",
"String getTaskName();",
"String getTaskName();",
"public String getTask(int position) {\n HashMap<String, String> map = list.get(position);\n return map.get(TASK_COLUMN);\n }",
"private TaskType getType(String type) {\r\n\t\tfor (TaskType tt : taskTypes) {\r\n\t\t\tif (tt.name.equals(type))\r\n\t\t\t\treturn tt;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getCommandClass() {\n\treturn className;\n }",
"TaskList getList();",
"public CommandType commandType() {\n // Logik: Deal with the specific types first, then assume that whatever's left is arithmetic\n\n // Default case\n CommandType type = CommandType.C_ARITHMETIC;\n // Deal with instruction\n switch (instructionChunks[0]) {\n case \"push\":\n type = CommandType.C_PUSH;\n break;\n case \"pop\":\n type = CommandType.C_POP;\n }\n return type;\n }",
"public String getTask() {\n return task;\n }",
"public String getTask() {\n return task;\n }",
"static Task identifyType(String input) throws DukeException {\n String command = Parser.getCommand(input);\n String description = Parser.getDescription(input);\n\n switch (command) {\n case \"todo\":\n return new Todo(description);\n case \"deadline\":\n String deadlineDescription = Deadline.getDeadlineDescription(description);\n Deadline deadline = new Deadline(deadlineDescription, Deadline.getDate(input), Deadline.getTime(input)); //todo\n return deadline;\n case \"event\":\n String eventDescription = Event.getEventDescription(description);\n Event event = new Event(eventDescription, Event.getEventDetails(input));\n return event;\n default:\n return new Task(\"NA\");\n }\n }",
"void addToList(Task task) throws InvalidCommandException;",
"public com.google.protobuf.ProtocolStringList\n getTaskIdList() {\n return taskId_.getUnmodifiableView();\n }",
"public void execute() {\n\n try {\n checkTask();\n Ui.printLines();\n Ui.printMatchingTasks();\n int index = 1;\n\n for (Task task : TaskList.taskArrayList) {\n String task_description = task.toString();\n\n if (task_description.contains(command)) {\n System.out.println(index + \". \" + task);\n index++;\n }\n\n }\n Ui.printLines();\n } catch (InvalidTask invalidTask) {\n Ui.printLines();\n Ui.printInvalidTask();\n Ui.printLines();\n }\n }",
"@Override\n public String execute(TaskList tasks, Storage storage) {\n return \"Here are the tasks in your list:\\n\" + tasks.toString();\n }",
"public com.google.protobuf.ProtocolStringList\n getCommandList() {\n return command_.getUnmodifiableView();\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.LoadCommandType getCommandType();",
"CommandType(String label) {\n this.label = label;\n }",
"Object getTaskId();",
"ResponseEntity<List<Type>> findTaskTypes();",
"String getCommand();",
"@Override\n public String toString() {\n return \"[\" + this.getStatusIcon() + \"] \" + this.taskDescription;\n }",
"@Override\n public String toString() {\n return \"[\" + this.getStatusIcon() + \"] \" + this.taskDescription;\n }",
"List<ReadOnlyTask> getTaskList();",
"List<ReadOnlyTask> getTaskList();",
"ICommandTypeRegistry getCommandTypeRegistry();",
"public static ArrayList<String> commandList() {\n\r\n\t\tArrayList<String> commands = new ArrayList<String>();\r\n\r\n\t\tcommands.add(\"/HELP\");\r\n\t\tcommands.add(\"/QUIT\");\r\n\t\tcommands.add(\"/REMOVE\");\r\n\t\tcommands.add(\"/BAN\");\r\n\t\tcommands.add(\"/BANIP\");\r\n\t\tcommands.add(\"/REMOVEIP\");\r\n\t\tcommands.add(\"/CLEAR\");\r\n\t\tcommands.add(\"/SHOW\");\r\n\t\tcommands.add(\"/WARN\");\r\n\r\n\t\treturn commands;\r\n\t}",
"@Override\n public void executeAction(String command) {\n String[] parts = command.split(\",\");\n Task task = Task.buildTask(parts[0], parts[1], DateSorting.parseDate(\"dd-MM-yyyy\", parts[2]),\n parts[3], parts[4]);\n\n TodoList.tasks.put(task.getId(), task);\n System.out.println(\"IP.TodoListApplication.App.Task successfully added!\");\n\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 }",
"@Override\r\n\tpublic List<ExecuteTask> getByOrgByType(int organizationId, 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_organization_id IN\"\r\n\t\t\t\t+ \"(SELECT org_id FROM organization WHERE org_id = ? OR org_parent_organization_id = ?) \"\r\n\t\t\t\t+ \" AND task_type = ?)\";\r\n\t\treturn getForList(sql,organizationId,organizationId,taskType);\r\n\t}",
"public List<ProgressConfigurationType> getConfigType(String type);",
"public AddCommand(String taskType, Optional<String> taskDescription) { \r\n this.taskType = taskType;\r\n this.taskDescription = taskDescription;\r\n this.taskDeadline = Optional.empty();\r\n this.taskStartDateTime = Optional.empty();\r\n this.taskEndDateTime = Optional.empty();\r\n this.task = makeTask(taskType, taskDescription, taskDeadline, \r\n taskStartDateTime, taskEndDateTime); \r\n }",
"public static String parse(String command) throws IOException {\n assert tasks.size() >= 0;\n\n if (command.equals(\"bye\")) {\n return executeExit();\n } else if (command.equals(\"list\")) {\n return executeList();\n } else if (command.equals(\"yes\") || command.equals(\"no\")) {\n return executeDuplicateHandling(command);\n } else if (command.startsWith(\"done\")) {\n return executeDone(command);\n } else if (command.startsWith(\"delete\")) {\n return executeDelete(command);\n } else if (command.startsWith(\"find\")) {\n return executeFind(command);\n } else {\n return executeTask(command);\n }\n }",
"@Override\n public String execute(MyList taskList, DukeUserInterface ui, DukeStorage storage) {\n return ui.getList(taskList);\n }",
"ListProperty<String> getCommandLine();",
"@Override\r\n\tpublic List<ExecuteTask> getByTypeByTime(String taskType, String time1, String time2) {\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 = ? AND \"\r\n\t\t\t\t+ \" task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,taskType,time1,time2);\r\n\t}",
"private void readCommand(String[] splitRequest, TaskManager taskManager) {\n if (splitRequest.length >= 2) {\n ArrayList list = new ArrayList<Task>();\n switch (splitRequest[1]) {\n case \"all\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskList();\n sendTasks(list);\n break;\n case \"today\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskListForToday();\n sendTasks(list);\n break;\n case \"before\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskListBeforeToday();\n sendTasks(list);\n break;\n case \"after\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskListAfterToday();\n sendTasks(list);\n break;\n default:\n output.println(\"WRONG PARAMETER\");\n output.println(\"To read task enter: 'r all/today/before/after'\");\n }\n } else {\n output.println(\"WRONG PARAMETER\");\n output.println(\"To read task enter: 'r all/today/before/after'\");\n }\n }",
"public interface TaskList {\n\n /**\n * Adds the task into the list.\n *\n * @param task the task to be added into the list\n */\n String addTask(Task task);\n\n /**\n * Setter to change the done status of the task.\n */\n String setDone(int index);\n\n /**\n * Delete the task at a specified index.\n */\n String delete(int index);\n\n /**\n * Prints the list.\n */\n String printList();\n\n /**\n * Prints Tasks on the specified date.\n */\n String printListDate(String date);\n\n /**\n * Returns the number of items in the TaskList.\n *\n * @return listCount\n */\n int count();\n\n /**\n * Prints Tasks containing the specified searchString.\n * @param searchString the string to be used for searching\n */\n String printListSearch(String searchString);\n}",
"public static void listTasks(ArrayList<Task> taskList) {\r\n StringBuilder sb = new StringBuilder();\r\n int i = 1;\r\n sb.append(\"Here are the tasks in your list:\\n\");\r\n for (Task task : taskList) {\r\n sb.append(i++ + \".\" + task.toString() + \"\\n\");\r\n }\r\n CmdUx.printHBars(sb.toString());\r\n }",
"public String getTaskId() {\n Object ref = taskId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskId_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public int getType() {\n return Command.TYPE_QUERY;\n }",
"@Override\r\n\tpublic java.lang.String toString()\r\n\t{\r\n\t\treturn \"DeleteListAsync\";\r\n\t}",
"public abstract String getCommand();",
"String createCommand(String commandType, AttributeList properties);",
"public String getCommand() {\r\n return command;\r\n }",
"public String getTypeName()\n {\n return getArgumentTypeName(type);\n }",
"List<Task> getTaskdetails();",
"static String getReadableTask(int taskTypeRepresentation) {\n return taskDetails.get(taskTypeRepresentation).getDescription();\n }",
"@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();",
"public CommandType parseCommand() {\n try {\n extractCommand();\n extractParameters();\n parameterData = new ParameterParser(commandType, parameters).processParameters();\n executeCommand();\n } catch (IllegalCommandException e) {\n commandUi.printInvalidCommand();\n } catch (IndexOutOfBoundsException e) {\n commandUi.printInvalidParameters();\n } catch (MissingTaskLiteralException e) {\n commandUi.printMissingLiteral(e.getMessage());\n } catch (NumberFormatException e) {\n commandUi.printTaskDoneNotInteger();\n } catch (DateTimeFormatException e) {\n commandUi.printDateTimeFormatIncorrect();\n }\n\n return commandType;\n }",
"public String getCommand() { return command; }",
"public String[] getCommands (int cmdType)\n\t{\n\t\tif (CMD_CREATE_USER == cmdType)\n\t\t\treturn new String[]\n\t\t\t{\n\t\t\t\"CREATE USER compiere;\",\t\t\t\n\t\t\t};\n\t\t//\n\t\tif (CMD_CREATE_DATABASE == cmdType)\n\t\t\treturn new String[]\n\t\t\t{\n\t\t \"CREATE DATABASE compiere OWNER compiere;\",\n\t\t\t\"GRANT ALL PRIVILEGES ON compiere TO compiere;\"\t,\n\t\t\t\"CREATE SCHEMA compiere;\",\n\t\t\t\"SET search_path TO compiere;\"\n\t\t\t};\n\t\t//\n\t\tif (CMD_DROP_DATABASE == cmdType)\n\t\t\treturn new String[]\n\t\t\t{\n\t\t\t\"DROP DATABASE compiere;\"\n\t\t\t};\n\t\t//\n\t\treturn null;\n\t}",
"public String getCommand(){\n return command;\n }",
"public void addCommandMutable(ListItem task) {\n this.listItems.add(task);\n }",
"private void executeCommand() {\n Command command = null;\n\n switch (commandType) {\n case LIST:\n command = new ListCommand(taskManager, parameterData.getDescription());\n break;\n case DONE:\n command = new DoneCommand(taskManager, parameterData.getTaskNumber());\n break;\n case TODO:\n command = new AddCommand(taskManager, TaskType.TODO, parameterData.getDescription());\n break;\n case DEADLINE:\n command = new AddCommand(taskManager,\n TaskType.DEADLINE, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case EVENT:\n command = new AddCommand(taskManager,\n TaskType.EVENT, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case DELETE:\n command = new DeleteCommand(taskManager, parameterData.getTaskNumber());\n break;\n case BYE:\n command = new ByeCommand(taskManager);\n break;\n case FIND:\n command = new FindCommand(taskManager,\n parameterData.getFilterString(),\n parameterData.getMatchDate(),\n parameterData.getTimeSearch());\n break;\n case HELP:\n command = new HelpCommand(taskManager);\n break;\n default:\n commandUi.printNoCommandRan();\n }\n\n try {\n command.execute();\n } catch (IndexOutOfBoundsException e) {\n commandUi.printTaskDoneNotInRange();\n } catch (IllegalStateException e) {\n commandUi.printInvalidParameters();\n }\n }",
"public String getTask(){\n\treturn task;\n}",
"List<ExtDagTask> taskList(ExtDagTask extDagTask);",
"public ListCommand() {\n super();\n }",
"public String getTaskId() {\n Object ref = taskId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskId_ = s;\n return s;\n }\n }"
] | [
"0.71196127",
"0.70734054",
"0.7003877",
"0.69029677",
"0.68627787",
"0.6841545",
"0.68373907",
"0.6650617",
"0.66184527",
"0.6345418",
"0.6297707",
"0.6278918",
"0.6274096",
"0.62312055",
"0.6216222",
"0.61822724",
"0.61480373",
"0.61277795",
"0.61194384",
"0.6041123",
"0.60186917",
"0.59870523",
"0.5977253",
"0.59714943",
"0.5938735",
"0.5914444",
"0.5896363",
"0.5880468",
"0.58741486",
"0.5843485",
"0.5833663",
"0.58301216",
"0.58277464",
"0.57943285",
"0.57855123",
"0.57432324",
"0.5727882",
"0.57064813",
"0.56844074",
"0.5671783",
"0.5668238",
"0.56645876",
"0.56575507",
"0.56434697",
"0.56434697",
"0.56383365",
"0.56162196",
"0.5603159",
"0.5596433",
"0.559636",
"0.55864346",
"0.55864346",
"0.55848414",
"0.55742544",
"0.55701596",
"0.55528855",
"0.5544406",
"0.5538359",
"0.55222833",
"0.5518194",
"0.55073583",
"0.5503412",
"0.5497765",
"0.54952127",
"0.54952127",
"0.54772896",
"0.54772896",
"0.54723537",
"0.5471429",
"0.5470737",
"0.5470507",
"0.54673976",
"0.54627126",
"0.54626644",
"0.5461835",
"0.5456336",
"0.5433026",
"0.5428763",
"0.54214495",
"0.5415447",
"0.5404767",
"0.539549",
"0.53896105",
"0.5388286",
"0.5376982",
"0.5374077",
"0.5364664",
"0.5349733",
"0.5344902",
"0.5342922",
"0.53418326",
"0.53329766",
"0.53307384",
"0.5324814",
"0.5324471",
"0.53242314",
"0.5323357",
"0.5321506",
"0.5319721",
"0.5315998",
"0.5315361"
] | 0.0 | -1 |
Checks if this is capable of being a valid done command based on the criteria of length being more than 1. | public boolean satisfiesMinimumDoneCommandLength(String[] command) {
return (command.length > 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean determineIfValidDoneCommand(String[] commandWords, int taskListSize) {\n int taskNumber = Integer.parseInt(commandWords[1]);\n return (taskNumber <= taskListSize);\n }",
"private boolean isComplete() {\n return redisCommand != null && redisCommand.getAction() != null && !\"\".equals(redisCommand.getAction().trim()) && redisCommand.getArgList().size() == argSize - 1;\n }",
"boolean testLength(Tester t) {\n return t.checkExpect(lob3.length(), 3) && t.checkExpect(los3.length(), 3)\n && t.checkExpect(los1.length(), 1) && t.checkExpect(new MtLoGamePiece().length(), 0);\n }",
"Boolean checkLength(String detail);",
"public boolean done() {\n\t\treturn pos>=program.length();\n }",
"public boolean meetsMinimumLength(){\n\n return alg.meetsMinimumLength(input.getText().toString());\n }",
"public static boolean isDone(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase DONE:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean canSend() {\n\n if (StringUtils.isEmpty(constructedCommand())) return false;\n\n int beginIndex = constructedCommand()\n .indexOf(serialProperties.getCmdBeginMarker());\n int endIndex = constructedCommand()\n .indexOf(serialProperties.getCmdEndMarker());\n\n return beginIndex != -1 && endIndex != -1 && beginIndex < endIndex;\n }",
"@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}",
"private int exitOkIgnoreLength() {\r\n\t\tthis.updateUnitStatus();\r\n\t\tthis.eventLogger.logLine(\" => DEVICE_END\");\r\n\t\treturn iDeviceStatus.INCORRECT_LENGTH_IS_OK | iDeviceStatus.DEVICE_END;\r\n\t}",
"public boolean hasMoreCommands(){\r\n\t\t/*\r\n\t\tif (nextCommand != null)\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t\t*/\r\n\t\treturn (tokenizer.ttype != StreamTokenizer.TT_EOF);\r\n\t}",
"private boolean isLengthCorrect(final String token) {\n return token.length() == VALID_TOKEN_LENGTH;\n }",
"private boolean canRedo() {\n return !frozen && !future.isEmpty();\n }",
"private boolean hasValidLength()\n {\n final int length = mTextInputLayout.getText().length();\n return (length >= mMinLen && length <= mMaxLen);\n }",
"public boolean isComplete(){\r\n\r\n\t\t// TODO\r\n\t\t\r\n\t\tif(!isValid()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public static boolean validateInputLength(String[] args) {\n return args.length == 3;\n }",
"@Override\n protected void checkValidity() throws DukeException {\n\n if (this.descriptionOfTask.isEmpty()) {\n throw new DukeException(\" ☹ OOPS!!! The description of a done cannot be empty.\");\n }\n\n }",
"protected boolean ValidateCommand()\n {\n //Create a new ArrayList object and add the valid commands\n ArrayList<String> validCommands = new ArrayList<>();\n validCommands.add(\"^\");\n validCommands.add(\"$\");\n validCommands.add(\"-\");\n validCommands.add(\"+\");\n validCommands.add(\"a\");\n validCommands.add(\"t\");\n validCommands.add(\"d\");\n validCommands.add(\"l\");\n validCommands.add(\"n\");\n validCommands.add(\"p\");\n validCommands.add(\"q\");\n validCommands.add(\"w\");\n validCommands.add(\"x\");\n validCommands.add(\"=\");\n validCommands.add(\"#\");\n validCommands.add(\"c\");\n validCommands.add(\"v\");\n validCommands.add(\"s\");\n validCommands.add(\"b\");\n \n //Check if the inserted command is valid\n return validCommands.contains(this.Command);\n }",
"public boolean endOfInput() {\n \tif((tmpPosition<totalLength)&&(IsOk)){\n \t//\tSystem.out.println(\"Am returnat ok\");\n \t\treturn false;\n\t\t\t\n \t}\n\t\telse\n\t\t\treturn true;\n \t\n }",
"public boolean checkDescription() {\n int size = description.length();\n return size >= 1 && size <= 256;\n }",
"abstract public boolean argsNotFull();",
"public boolean isFinished() {\n\t\tif (getRemaining() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isCommandValid(Character character, String command)\n\n {\n\n \n\n if(command.length() > 4 && isKill(command))\n { \n HandleKill(character, command);\n return true;\n }\n if(isPossess(command))\n {\n HandlePossess(character);\n return true;\n }\n if(isDontPossess(command))\n {\n HandleDontPossess(character);\n return true;\n }\n if(isJump(command))\n\n {\n\n HandleJump();\n\n return true;\n\n }\n\n if(isSit(command))\n\n {\n\n HandleSit();\n\n return true;\n\n }\n\n if(isSing(command))\n\n {\n\n HandleSing();\n\n return true;\n\n }\n\n if(isDance(command))\n\n {\n\n HandleDance();\n\n return true;\n\n }\n\n if(isDirections(command))\n\n {\n\n HandleDirections(character.currentArea);\n\n return true;\n\n }\n\n if(isExit(command))\n\n {\n\n HandleExit();\n\n return true;\n\n }\n \n if(isHeal(command))\n\n {\n\n HandleHeal(character);\n\n return true;\n\n }\n\n if(isStats(command))\n\n {\n\n HandleStats(character);\n\n return true;\n\n }\n\n \n\n switch(character.currentArea.paths)\n\n {\n\n case Constants.North:\n\n if(isNorth(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.South:\n\n if(isSouth(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.East:\n\n if(isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.West:\n\n if(isWest(command))\n\n return true;\n\n else\n\n return false;\n\n \n\n case Constants.NorthAndSouth:\n\n if(isNorth(command) || isSouth(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthAndEast:\n\n if(isNorth(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthAndWest:\n\n if(isNorth(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.SouthAndEast:\n\n if(isSouth(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.SouthAndWest:\n\n if(isSouth(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.EastAndWest:\n\n if(isEast(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n \n\n case Constants.NorthSouthAndEast:\n\n if(isNorth(command) || isSouth(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthSouthAndWest:\n\n if(isNorth(command) || isSouth(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthEastAndWest:\n\n if(isNorth(command) || isEast(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.SouthEastAndWest:\n\n if(isSouth(command) || isEast(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n \n\n case Constants.NorthSouthEastAndWest:\n\n if(isNorth(command) || isSouth(command) || isWest(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n default:\n\n break;\n\n \n\n }\n\n \n character.canPossess = false;\n return false;\n\n \n\n }",
"public boolean isIncomplete()\n {\n\treturn toDo.size() > 0;\n }",
"protected void checkCommand(String com) throws IllegalArgumentException {\n if (com.length() != PushCacheProtocol.COMMAND_LEN) {\n throw new IllegalArgumentException(\"Command \\\"\" + com + \"\\\" is wrong length\");\n }\n if (com.charAt(3) != '\\0') {\n throw new IllegalArgumentException(\"Command \\\"\" + com + \"\\\" is not null terminated\");\n }\n }",
"protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }",
"public boolean isDone() {\n return done.isTrue() || depth == PSymGlobal.getConfiguration().getMaxStepBound();\n }",
"public boolean isComplete()\n\t{\n\t\treturn getStep() == getRepeatCount() * 2 + 1;\n\t}",
"private static boolean validateInput1(String[] input) {\n\t\tif (input.length != 1) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n return Math.abs(pid.getError()) < 0.25;\n }",
"public boolean checkToProceed(){\n return getGame().getCurrentPlayer().getRemainingActions() > 0;\n }",
"public boolean hasValidArgs() {\r\n // if it has has zero argument, it is valid\r\n boolean zeroArgs = this.getCmd().getArguments().size() == 0;\r\n // return the boolean value\r\n return zeroArgs;\r\n }",
"public boolean isMoveLegal() {\n if (!getGame().getBoard().contains(getFinalCoords())) {\n return false;\n }\n\n // for aero units move must use up all their velocity\n if (getEntity() instanceof Aero) {\n Aero a = (Aero) getEntity();\n if (getLastStep() == null) {\n if ((a.getCurrentVelocity() > 0) && !getGame().useVectorMove()) {\n return false;\n }\n } else {\n if ((getLastStep().getVelocityLeft() > 0) && !getGame().useVectorMove()\n && !(getLastStep().getType() == MovePath.MoveStepType.FLEE\n || getLastStep().getType() == MovePath.MoveStepType.EJECT)) {\n return false;\n }\n }\n }\n\n if (getLastStep() == null) {\n return true;\n }\n\n if (getLastStep().getType() == MoveStepType.CHARGE) {\n return getSecondLastStep().isLegal();\n }\n if (getLastStep().getType() == MoveStepType.RAM) {\n return getSecondLastStep().isLegal();\n }\n return getLastStep().isLegal();\n }",
"public boolean isDone(){\n\t\tif(generated)\n\t\t\treturn curr >= deck.size();\n\t\treturn true;\n\t}",
"@Override\n public boolean isFinished() {\n return !(System.currentTimeMillis() - currentMs < timeMs) &&\n // Then check to see if the lift is in the correct position and for the minimum number of ticks\n Math.abs(Robot.lift.getPID().getSetpoint() - Robot.lift.getEncoderHeight()) < error\n && ++currentCycles >= minDoneCycles;\n }",
"public boolean isDone()\n {\n return (this.elapsed >= this.duration);\n }",
"public native boolean isLengthComputable() /*-{\n\t\treturn this.lengthComputable;\n\t}-*/;",
"public boolean completed()\r\n {\r\n if(pile.size() == 13)\r\n return true;\r\n return false;\r\n }",
"public boolean isFactionsCommand(String check)\n \t{\n \t\tif (check == null || check.isEmpty()) return false;\n \t\treturn this.handleCommand(null, check, true);\n \t}",
"public boolean hasFinished() {\n\n if(!matching) {\n boolean first = true;\n for(S left : slp.getAxioms()) {\n if(slp.length(left, first) == 1) {\n return true;\n }\n first = false;\n }\n }\n\n if(matching) {\n long patternLen = slp.length(patter, true);\n if(patternLen == 1) {\n return true;\n }\n }\n\n return false;\n }",
"public boolean isCompleted()\n\t{\n\t\treturn pieces.length == existing.cardinality();\n\t}",
"public boolean canBeDoneIn(Room r) {\n\t\treturn true;\n\t}",
"public boolean isFinished() {\n\t\t// the word is guessed out only when the unrevealedSlots is 0\n\t\tif (this.unrevealedSlots == 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean canRedo() {\r\n\t\treturn redoCommands.isEmpty();\r\n\t}",
"private boolean scanFrameLength() {\n\n // scan the 2, 3, or 4 characters of the base 64 encoded frame length, terminated by a close...\n StringBuilder frameLengthChars = new StringBuilder( 4 );\n boolean lengthDone = false;\n boolean done = false;\n while( !done & !lengthDone ) {\n\n byte thisByte = buffer.get();\n done = !buffer.hasRemaining();\n\n // if we just scanned a close character, then we need to test for validity of the length...\n if( thisByte == CLOSE ) {\n\n // if we have at least enough characters, we have a possible winner here...\n if( frameLengthChars.length() >= 2 ) {\n frameLength = (int) Base64.decodeLong( frameLengthChars.toString() );\n\n // if the frame is longer than the maximum, reject it...\n if( frameLength > maxMessageSize ) lengthDone = true;\n\n // otherwise, we DID get a winner...\n else {\n frameOpenDetected = true;\n done = true;\n }\n }\n\n // it's not a properly formed frame start, so time to keep scanning if we have any characters left...\n else lengthDone = true;\n }\n\n // if we just scanned a base 64 character, it's potentially part of the length...\n else if( Base64.isValidBase64Char( (char) thisByte ) ){\n\n // if we still could use more base 64 characters, just add it and get out of here...\n if( frameLengthChars.length() < 4 ) {\n frameLengthChars.append( (char) thisByte );\n }\n\n // if this would be the fifth base 64 character, then it's not a properly formed frame...\n else lengthDone = true;\n }\n\n // if we got some other character, then it's not a properly formed frame...\n else {\n buffer.position( buffer.position() - 1 ); // it's possible we just got another open, so back up just in case...\n lengthDone = true;\n }\n }\n return done;\n }",
"protected boolean isFinished() {\n \t//finish if distance >= requried distance\n return (Robot.drive.leftEncoder.getDistance() >= distance || Robot.drive.rightEncoder.getDistance() >= distance);\n }",
"protected boolean correctLength(final CommandSender sender, final int size, final int min, final int max) {\n\t\tif (size < min || size > max) {\n\t\t\tthis.help(sender, false);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean checkLength(Contribution contribution) {\n\t\tint longness= jdbc.queryForObject(\"select lineLength from stories where title=:title\", \n\t\t\t\tnew MapSqlParameterSource(\"title\", contribution.getTitle()), Integer.class);\n\t\tSystem.out.println(\"Your content: \"+contribution.getAddition().length()+\" the max length: \"+longness);\n\t\tif(contribution.getAddition().length() > longness) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n \t//System.out.println(\"FINISHED\");\n \tif(sizeArray.length>0)\n \t\treturn sizeArray[0]>targetSize;\n else\n \treturn noBubbles;\n \t\n \t\n }",
"public abstract boolean isComplete();",
"public static void checkWindowsCommandLineLength(String... commands) throws IOException {\n\t\tint len = 0;\n\t\tfor (String s : commands) {\n\t\t\tlen += s.length();\n\t\t}\n\t\tif (len > WINDOWS_MAX_SHELL_LENGHT) {\n\t\t\tthrow new IOException(String.format(\n\t\t\t\t\t\"The command line has a length of %d exceeds maximum allowed length of %d. \"\n\t\t\t\t\t\t\t+ \"Command starts with: %s\",\n\t\t\t\t\tlen, WINDOWS_MAX_SHELL_LENGHT, join(\"\", commands).substring(0, 100)));\n\t\t}\n\t}",
"public boolean isCompleteFrame(IDdfDataFrame frameSoFar)\n {\n\t return frameSoFar.getFrameSize() > 2 && frameSoFar.getFrameBytes()[ frameSoFar.getFrameSize() - 1 ] == IPacket.EOT;\n }",
"private void checkLength(boolean eof) {\n if (eof) {\n if (dataLength != expectedLength) {\n throw new SdkClientException(\n \"Data read has a different length than the expected: \"\n + diagnosticInfo());\n }\n } else if (dataLength > expectedLength) {\n throw new SdkClientException(\"More data read than expected: \"\n + diagnosticInfo());\n }\n }",
"private boolean isValid(String structure, String command) {\n\t\t// checks to see if the provided structure matches the\n\t\t// command\n\t\t// 'c' = char\n\t\t// 'n' = number (can take up more than one character, and\n\t\t// can be\n\t\t// negative\n\t\t// ' ' = space\n\t\t// 's' = string (that has to go till the end of the command\n\t\t// with no\n\t\t// spaces\n\t\tString[] format = structure.split(\"|\");\n\t\tboolean valid = true;\n\t\tint curIndex = 0;\n\t\tforloop: for (String str : format) {\n\t\t\tswitch (str.charAt(0)) {\n\t\t\tcase 'c':\n\t\t\t\tif (command.length() > curIndex) {\n\t\t\t\t\tif (!Character\n\t\t\t\t\t\t\t.isAlphabetic(command.charAt(curIndex))\n\t\t\t\t\t\t\t&& !Character.isWhitespace(\n\t\t\t\t\t\t\t\t\tcommand.charAt(curIndex))) {\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak forloop;\n\t\t\t\t\t}\n\t\t\t\t\tcurIndex++;\n\t\t\t\t} else {\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak forloop;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'n':\n\t\t\t\tif (command.length() > curIndex) {\n\t\t\t\t\tboolean wait = false;\n\t\t\t\t\tif (!Character.isDigit(command.charAt(curIndex))\n\t\t\t\t\t\t\t&& command.charAt(curIndex) != '-') {\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak forloop;\n\t\t\t\t\t}\n\t\t\t\t\tif (command.charAt(curIndex) == '-') {\n\t\t\t\t\t\twait = true;\n\t\t\t\t\t}\n\t\t\t\t\tcurIndex++;\n\t\t\t\t\twhile (command.length() > curIndex && Character\n\t\t\t\t\t\t\t.isDigit(command.charAt(curIndex))) {\n\t\t\t\t\t\twait = false;\n\t\t\t\t\t\tcurIndex++;\n\t\t\t\t\t}\n\t\t\t\t\tif (wait) {\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak forloop;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak forloop;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ' ':\n\t\t\t\tif (command.length() > curIndex) {\n\t\t\t\t\tif (!Character.isWhitespace(\n\t\t\t\t\t\t\tcommand.charAt(curIndex))) {\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak forloop;\n\t\t\t\t\t}\n\t\t\t\t\tcurIndex++;\n\t\t\t\t} else {\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak forloop;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\tif (command.length() > curIndex) {\n\t\t\t\t\twhile (command.length() > curIndex) {\n\t\t\t\t\t\tif (!Character.isAlphabetic(\n\t\t\t\t\t\t\t\tcommand.charAt(curIndex))\n\t\t\t\t\t\t\t\t&& command\n\t\t\t\t\t\t\t\t\t\t.charAt(curIndex) != '.') {\n\t\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\t\tbreak forloop;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurIndex++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak forloop;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (curIndex != command.length()) {\n\t\t\tvalid = false;\n\t\t}\n\t\treturn valid;\n\t}",
"private boolean isFirstMove(int numberGeneratedSoFarLength) {\n\t\treturn numberGeneratedSoFarLength == 1;\n\t}",
"protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }",
"public boolean isDone() {\r\n\t\tint count = 0;\r\n\t\t//Checks the movieGuess array for '_' characters. If there are none we can safely assume the player has finished.\r\n\t\tfor(int x = 0; x < movieGuess.length; x++) {\r\n\t\t\tif(movieGuess[x] == '_')\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//used a counter to avoid premature (i.e., before finishing the array traversal) true or false.\r\n\t\tif(count > 0)\r\n\t\t\treturn false;\t\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}",
"public boolean possibleNextInput() {\n return _index < _input.length();\n }",
"private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }",
"protected boolean isFinished() {\r\n \tif (i >= 1 || i <= 1){\r\n \treturn true;\r\n \t}\r\n\t\treturn false;\r\n }",
"private boolean isExhausted() {\n return runnableTasks.isEmpty()\n && runnableActions.isEmpty() && runningTasks == 0;\n }",
"public boolean hasMoreCommands() {\r\n return in.hasNextLine();\r\n }",
"public boolean hasRemaining() {\r\n\t\treturn cursor < limit - 1;\r\n\t}",
"@Override\n public boolean isFinished() {\n double[] positions = drivetrain.getPositions();\n\n return Math.abs(positions[0] - targetDistance) <= allowedError && Math.abs(positions[1] - targetDistance) <= allowedError;\n }",
"@Override\n\tpublic boolean isFinished() {\n\t\treturn (this.timeRemaining == 0);\n\t}",
"boolean redoLastCommand() throws Exception;",
"private void checkForSplitRowAndComplete(int length, int index) {\n // For singleton select, the complete row always comes back, even if\n // multiple query blocks are required, so there is no need to drive a\n // flowFetch (continue query) request for singleton select.\n //while ((position_ + length) > lastValidBytePosition_) {\n while (dataBuffer_.readableBytes() > lastValidBytePosition_) {\n // Check for ENDQRYRM, throw SQLException if already received one.\n checkAndThrowReceivedEndqryrm();\n\n // Send CNTQRY to complete the row/rowset.\n int lastValidByteBeforeFetch = completeSplitRow(index);\n\n // If lastValidBytePosition_ has not changed, and an ENDQRYRM was\n // received, throw a SQLException for the ENDQRYRM.\n checkAndThrowReceivedEndqryrm(lastValidByteBeforeFetch);\n }\n }",
"private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }",
"private Boolean validateRequest() {\n\t\tint cell = 2;\n\t\t\n\t\t// If the length is over max_buffer bytes, the message is too long.\n\t\tif (receivePacket.getLength() > TFTPCommons.max_buffer) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// If the first two bytes aren't 0 1 or 0 2, then the message is malformed.\n\t\tif ((receiveData[0] != 0) | !((receiveData[1] == 1) | (receiveData[1] == 2))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Note which cell we're at now.\n\t\tint prev_cell = cell;\n\t\t\n\t\t// Fast-forward through the text to the first separator 0.\n\t\twhile (true) {\n\t\t\t// If cell equals length, the message is invalid,\n\t\t\t// likely because it was malformed.\n\t\t\tif (cell == receivePacket.getLength()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// If this is the first separator 0, break loop and go to next cell\n\t\t\t// Unless the first separator zero is the cell we started at,\n\t\t\t// then the message is invalid\n\t\t\tif (receiveData[cell] == 0) {\n\t\t\t\tif (cell == prev_cell) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcell++;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// Otherwise, go to next cell\n\t\t\t\tcell++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Note which cell we're at now.\n\t\tprev_cell = cell;\n\t\t\t\t\n\t\t// Fast-forward through the text to the second separator 0.\n\t\twhile (true) {\n\t\t\t// If cell equals length, the message is invalid,\n\t\t\t// likely because it was malformed.\n\t\t\tif (cell == receivePacket.getLength()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// If this is the second separator 0, break loop and go to next cell.\n\t\t\t// Unless the first separator zero is the cell we started at,\n\t\t\t// then the message is invalid\n\t\t\tif (receiveData[cell] == 0) {\n\t\t\t\tif (cell == prev_cell) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcell++;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// Otherwise, go to next cell\n\t\t\t\tcell++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// At this point, we should have covered the whole message,\n\t\t// Unless it is malformed.\n\t\tif (cell == receivePacket.getLength()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean validCommand(CommandStack stack) {\r\n\t\treturn true;\r\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }",
"public boolean canUndo() {\n/* 834 */ return !Utils.isNullOrEmpty(getNextUndoAction());\n/* */ }",
"@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}",
"private boolean formComplete(){\r\n return NAME_FIELD.getLength()>0 && ADDRESS_1_FIELD.getLength()>0 &&\r\n CITY_FIELD.getLength()>0 && ZIP_FIELD.getLength()>0 && \r\n COUNTRY_FIELD.getLength()>0 && PHONE_FIELD.getLength()>0; \r\n }",
"boolean canFinish();",
"boolean canFinish();",
"public static void validateToDoInput(String[] words) throws DukeException {\n if(parser.parseToDoCommand(words)) {\n throw new DukeException(\"☹ OOPS!!! The description of a todo cannot be empty.\");\n }\n }",
"String[] checkIfLegalCommand(String strToChck);",
"boolean isComplete();",
"boolean isComplete();",
"public static boolean isValid(byte[] data, int length) {\n\t\tif (data[0] != 0) { // The first byte needs to be 0\n\t\t\tSystem.out.println(\"Invalid Data: First Byte should be 0\");\n\t\t\treturn false;\n\t\t} else if (getOpcode(data, length) == Operation.INVALID) { // The second\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// byte\n\t\t\t// should be the\n\t\t\t// appropriate op\n\t\t\t// code\n\t\t\tSystem.out.println(\"Invalid Data: Opcode should be 1 or 2\");\n\t\t\treturn false;\n\t\t} else if (getFilename(data, length) == \"Invalid Filename\") { // Check the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// filename\n\t\t\tSystem.out.println(\"Invalid Data: Invalid Filename\");\n\t\t\treturn false;\n\t\t} else if (getTransferMode(data, length) == TransferMode.INVALID) { // Check the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mode\n\t\t\tSystem.out.println(\"Invalid Data: Invalid Transfermode\");\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"private boolean checkingAllArguments() {\n\t\t\n\t\t// test if the four player types have been selected\n\t\tfor(int i=0;i<allButtons.size();i++) {\n\t\t\tif(allButtons.get(i)==null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// test if the seed is in the correct format\n\t\tif(!(seed.textProperty().get().isEmpty())){\n\t\t\ttry {\n\t\t\t\tgameSeed = Long.parseLong(seed.getText());\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tmenuMessage.setText(\"Given seed is not a valid number\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t// test if for each of the players the given arguments are correct\n\t\tfor(int i = 0; i < allButtons.size(); ++i) {\n\t\t\tchar playerType = allButtons.get(i).getText().charAt(0);\n\t\t\tString argument = texts.get(2 * i + 1).getText();\n\t\t\t\n\t\t\tif(!argument.isEmpty()) {\n\t\t\t\tswitch(playerType) {\n\t\t\t\t\n\t\t\t\tcase 'S' : \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlong l = Long.parseLong(texts.get(2 * i + 1).getText());\n\t\t\t\t\t\tif(l < 9) {\n\t\t\t\t\t\t\tmenuMessage.setText(\"The iteration value must be at least 9\");\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tmenuMessage.setText(\"One of the iteration number is not a valid number\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'R' :\n\t\t\t\t\t\n\t\t\t\t\tString[] parts = StringSerializer.split(\"\\\\.\", argument); \n\t\t\t\t\t\n\t\t\t\t\tif (parts.length != 4) { \n\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tfor (String str : parts) { \n\t\t\t\t\t\tint j = Integer.parseInt(str); \n\t\t\t\t\t\tif ((j < 0) || (j > 255)) { \n\t\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn true;\n\t}",
"private boolean checkFull() {\n\t\treturn this.array.length - 1 == this.lastNotNull();\n\t}",
"protected boolean isFinished() {\n\t\tboolean beyondTarget = Robot.wrist.getCurrentPosition() > safePosition;\n\t\treturn isSafe || beyondTarget;\n\t}",
"public boolean validateOptions() throws CommandValidationException\n {\n super.validateOptions();\n\n //verify adminpassword is greater than 8 characters\t\n if (!isPasswordValid(newMasterPassword)) {\n throw new CommandValidationException(getLocalizedString(\"PasswordLimit\",\n new Object[]{NEW_MASTER_PASSWORD}));\n }\n \n return true;\n }",
"protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public boolean execute(Command command){\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know what to pick up...\n System.out.println(\"Eat what?\");\n return false;\n }\n String goodItems = \"ChocolateCake,\";//, badItems = \"goo,\";\n String itemName = command.getSecondWord();\n Player currentPlayer = game.getCurrentPlayer();\n Item item = currentPlayer.getCurrentInventory().getItem(itemName);\n if(item != null){\n if(item.isEdible()){\n if(goodItems.indexOf(item.getItemName()) >=0){\n currentPlayer.changeMaxWeight(item.getWeight());\n currentPlayer.getCurrentInventory().removeItem(item);\n System.out.println(\"Your maximum weight capacity went up!: \" +\n currentPlayer.getMaxWeight());\n return false;\n }\n else{\n currentPlayer.changeMaxWeight(-item.getWeight());\n currentPlayer.getCurrentInventory().removeItem(item);\n System.out.println(\"Your maximum weight capacity went down!: \" +\n currentPlayer.getMaxWeight());\n return false;\n }\n }\n else{\n System.out.println(\"That's not edible!!\");\n return false;\n }\n }\n \n System.out.println(\"You don't have that item!\");\n return false;\n }",
"public boolean hasMoreCommands() {\n return fileStream.hasNext();\n }",
"protected boolean isFinished() {\n \tcurrentAngle = Robot.gyroSubsystem.gyroPosition();\n \tif (targetAngle - error > currentAngle || targetAngle + error < currentAngle) {\n \t\treturn false;\n \t} else {\n \t\tRobot.driveSubsystem.arcadeDrive(0, 0);\n \t\treturn true;\n \t}\n }",
"private boolean validatePacket(String[] packet)throws NullPointerException\n\t{\n\n\t\tif(packet == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Packet was null\");\n\t\t}\n\n\t\tfor(int i = 2 ; i< packet.length ; i++)\n\t\t{\n\t\t\tif(packet.length > MAX_SIZE)\n\t\t\t{\n\t\t\t\tthrow new StringIndexOutOfBoundsException(\"Message \" + (i-1)+\": \" + \"'\" + packet[i] + \"'\" + \"is to long\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"@Test\n\tpublic void invalidLengthShort() {\n\t\tboolean result = validator.isValid(\"73602851\");\n\t\tassertFalse(result);\n\t}",
"public final void invalidArgLength(Player player, String name) {\n \t\tplugin.sendWarning(player, \"Invalid Argument Length\");\n \t\t\n \t\tMethod method = plugin.getCommandManager().getCommandExecutor(name).getMethod();\n \t\t\n \t\tif (method.getAnnotation(CommandInfo.class) != null)\n \t\t\tplugin.sendInfo(player, \"Usage: /titanchat \" + method.getAnnotation(CommandInfo.class).usage());\n \t}",
"public boolean validatePrescription() {\n\t\tif (dose == 0)\n\t\t\treturn false;\n\t\tif (count == 0)\n\t\t\treturn false;\n\t\tif (dosing == 0)\n\t\t\treturn false;\n\t\tif (instructions == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public boolean isFinished() {\n\t\tif ((player1_moves | player2_moves) == COMPLETE) {\n\t\t\tfinished = true;\n\t\t\tcurrentPlayer = '\\0';\n\t\t}\n\t\tfor (int i : winning_cases) {\n\t\t\tif ((player1_moves & i) == i) {\n\t\t\t\twinner = 'X';\n\t\t\t\tfinished = true;\n\t\t\t} else if ((player2_moves & i) == i) {\n\t\t\t\twinner = 'O';\n\t\t\t\tfinished = true;\n\t\t\t}\n\t\t}\n\t\treturn finished;\n\t}",
"public boolean hasMoreCombination() {\n\t\treturn cursor < combos.length;\n\t}",
"public boolean isComplete()\n {\n return (name != null) && (spacecraft != null) &&\n (sensor != null) && (description != null);\n }",
"protected boolean isFinished() {\n if (waitForMovement) return (timeSinceInitialized() > Robot.intake.HOPPER_DELAY);\n return true;\n }",
"protected boolean isFinished() {\n return count > maxCount;\n }",
"private static boolean isDone0(Object result)\r\n/* 74: */ {\r\n/* 75:110 */ return (result != null) && (result != UNCANCELLABLE);\r\n/* 76: */ }",
"public boolean isDone(String s) {\n return (s.equals(\"V\"));\n }"
] | [
"0.68322885",
"0.6542408",
"0.59945947",
"0.59693927",
"0.5957672",
"0.5819153",
"0.58176786",
"0.580031",
"0.5760006",
"0.5737941",
"0.56672907",
"0.5623074",
"0.56123936",
"0.5587107",
"0.5565559",
"0.55560136",
"0.55540395",
"0.5524831",
"0.5490796",
"0.548598",
"0.5459315",
"0.5436706",
"0.54301345",
"0.5427389",
"0.53938824",
"0.53913474",
"0.53850085",
"0.538366",
"0.5382505",
"0.53740627",
"0.5371061",
"0.5356438",
"0.53420043",
"0.53380525",
"0.53206927",
"0.53181064",
"0.5315263",
"0.52954257",
"0.5295247",
"0.5291974",
"0.52896297",
"0.52681035",
"0.5256477",
"0.5251958",
"0.52484393",
"0.52388614",
"0.5235416",
"0.523365",
"0.52286804",
"0.5223067",
"0.5214265",
"0.5213891",
"0.52116174",
"0.5205522",
"0.51992065",
"0.5196454",
"0.5195585",
"0.51906437",
"0.51813304",
"0.5180943",
"0.5179997",
"0.5164942",
"0.51633066",
"0.51628625",
"0.5160418",
"0.51575303",
"0.51497483",
"0.5146299",
"0.5144249",
"0.5142194",
"0.51392734",
"0.51359993",
"0.5129133",
"0.511944",
"0.5104087",
"0.5104087",
"0.51018566",
"0.5092283",
"0.5092096",
"0.5092096",
"0.50910264",
"0.50895447",
"0.50890523",
"0.5088514",
"0.5083406",
"0.5083095",
"0.5082982",
"0.5082388",
"0.5075547",
"0.5071587",
"0.50697535",
"0.5068316",
"0.5066778",
"0.506081",
"0.5058592",
"0.5057216",
"0.50439477",
"0.50356954",
"0.5030726",
"0.5030462"
] | 0.77659065 | 0 |
Checks if this is an actual done command. | public boolean determineIfValidDoneCommand(String[] commandWords, int taskListSize) {
int taskNumber = Integer.parseInt(commandWords[1]);
return (taskNumber <= taskListSize);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isDone(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase DONE:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isDone()\n {\n return (this.elapsed >= this.duration);\n }",
"public boolean isDone();",
"public boolean isDone();",
"public boolean isDone() {\n\t\t\n\t\treturn done;\n\t}",
"public boolean isDone() {\n\t\treturn true;\n\t}",
"public boolean isDone() { return true; }",
"public boolean isDone() {\n return done;\n }",
"public boolean isDone() {\n return done.isTrue() || depth == PSymGlobal.getConfiguration().getMaxStepBound();\n }",
"public boolean isDone(){\n return done;\n }",
"public boolean isDone() {\n return done;\n }",
"public boolean isDone() {\n return done;\n }",
"public boolean isDone() { return false; }",
"@Override\n public boolean isDone() {\n return done;\n }",
"protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }",
"protected boolean isFinished() {\n\t\treturn pid.onTarget();\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn done; \n\t}",
"boolean isDone();",
"public boolean isDone() {\n return isDone;\n }",
"public boolean isDone() {\n return isDone;\n }",
"public boolean isDone() {\n return isDone;\n }",
"public boolean isDone() {\r\n return isDone;\r\n }",
"public boolean isDone() {\n return this.done;\n }",
"public boolean isDone()\r\n/* 69: */ {\r\n/* 70:106 */ return isDone0(this.result);\r\n/* 71: */ }",
"protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }",
"protected boolean isFinished() {\n \tif(Robot.oi.btnIdle.get()) {\n \t\treturn CommandUtils.stateChange(this, new Idle());\n \t}\n\n \tif( Robot.oi.btnShoot.get()) {\n \t\treturn CommandUtils.stateChange(this, new Shooting()); \n \t}\n \t\n \tif(Robot.oi.btnUnjam.get()){\n \t\treturn CommandUtils.stateChange(this, new Unjam());\n \t}\n return false;\n }",
"protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }",
"public boolean done() {\n return false;\n }",
"protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }",
"protected boolean isFinished()\n\t{\n\t\treturn !Robot.oi.respoolWinch.get();\n\t}",
"protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }",
"protected boolean isFinished() {\n return Robot.claw.isRetracted();\n }",
"@Override\n public boolean isDone()\n {\n return false;\n }",
"protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }",
"protected boolean isFinished() {\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n\t\treturn true;\n\t}",
"public boolean getDone(){\r\n\t\treturn done;\r\n\t}",
"private boolean isComplete() {\n return redisCommand != null && redisCommand.getAction() != null && !\"\".equals(redisCommand.getAction().trim()) && redisCommand.getArgList().size() == argSize - 1;\n }",
"@Override\n public boolean isFinished() {\n return isDone;\n }",
"@Override\n public boolean isFinished() {\n return isDone;\n }",
"protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n \t//ends \n \treturn isTimedOut();\n }",
"protected boolean isFinished()\n\t{\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFinished() {\n\t\treturn (this.timeRemaining == 0);\n\t}",
"public boolean checkDone() {\n return this.isDone;\n }",
"protected boolean isFinished() {\n return m_onTarget;\n }",
"public boolean isDone(){\n return status;\n }",
"protected boolean isFinished() {\n\t\treturn isTimedOut();\n\t}",
"public boolean isDone(){\r\n\t\tif(worker.getState()==Thread.State.TERMINATED) return true;\r\n\t\treturn false;\r\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n\t\treturn Robot.oi.ds.isAutonomous();\n\t}",
"@Override\n public boolean isDone() {\n return false;\n }",
"protected boolean isFinished() {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean done() {\n\t\tfor(Task t : details.getPendingTasks()){\n\t\t\tif(!t.isComplete())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }",
"protected boolean isFinished() {\n return Math.abs(pid.getError()) < 0.25;\n }",
"protected boolean isFinished() {\n if (waitForMovement) return (timeSinceInitialized() > Robot.intake.HOPPER_DELAY);\n return true;\n }",
"protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n \tboolean distanceTarget = Robot.driveDistancePID.onRawTarget();\n \t\n \tdouble timeNow = timeSinceInitialized();\n \t\n \treturn (distanceTarget || (timeNow >= expireTime));\n }",
"protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}",
"protected boolean isFinished() {\n return isTimedOut();\n }",
"protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }",
"protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"protected boolean isFinished() {\n return System.currentTimeMillis() - timeStarted >= timeToGo;\n }",
"protected boolean isFinished() {\r\n return isTimedOut();\r\n }",
"protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }",
"public boolean isDoneFlgTrue() {\n HangarCDef.Flg cdef = getDoneFlgAsFlg();\n return cdef != null ? cdef.equals(HangarCDef.Flg.True) : false;\n }",
"protected boolean isFinished() {\n return this.isTimedOut();\n }",
"public boolean done() {\n\t\treturn pos>=program.length();\n }",
"public final boolean isDone() {\n\t\tboolean result = true;\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\tresult = result && exe.stepIsDone();\n\t\t}\n\t\t// final int matlabWait = 200;\n\t\t// try {\n\t\t// log.debug(\"Waiting to return\");\n\t\t// Thread.sleep(matlabWait);\n\t\t// } catch (InterruptedException e) {\n\t\t// log.debug(\"HEY who woke me up?\");\n\t\t// }\n\t\treturn result;\n\t}",
"@Override\n\tpublic boolean done() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean done() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }",
"protected boolean isFinished() {\n return (timeRunning>timeStarted+5 || RobotMap.inPosition.get()!=OI.shooterArmed);\n }",
"protected boolean isFinished() {\n return finished;\n }",
"protected boolean isFinished() {\n\treturn this.isDone;\n }",
"protected boolean isFinished() {\n \t// wait for a time out\n return false;\n }",
"public boolean isFinished() {\n return (Math.abs(RobotContainer.drive.getAngle() - this.angle) <= 1);\n }",
"protected boolean isFinished() {\n\t\treturn isFinished;\n\t}",
"public boolean isFinished() {\n\t\tif (getRemaining() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n\t\tboolean beyondTarget = Robot.wrist.getCurrentPosition() > safePosition;\n\t\treturn isSafe || beyondTarget;\n\t}",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }"
] | [
"0.7578319",
"0.70671695",
"0.70130044",
"0.70130044",
"0.6954545",
"0.6933368",
"0.6901516",
"0.68708265",
"0.6848425",
"0.68443745",
"0.6818054",
"0.6818054",
"0.6798842",
"0.6795911",
"0.6753369",
"0.6746836",
"0.6744269",
"0.6683662",
"0.6594399",
"0.6594399",
"0.6594399",
"0.65915745",
"0.65775645",
"0.6573962",
"0.65573084",
"0.65512806",
"0.65466326",
"0.65420806",
"0.6534497",
"0.6507943",
"0.6499878",
"0.64979",
"0.6481793",
"0.6476193",
"0.6462",
"0.6462",
"0.6462",
"0.6458783",
"0.6450062",
"0.64469063",
"0.64469063",
"0.64377624",
"0.6436164",
"0.64323163",
"0.64317393",
"0.6430621",
"0.6428142",
"0.64265305",
"0.64214057",
"0.641798",
"0.6410514",
"0.6410514",
"0.6410514",
"0.6410514",
"0.6410514",
"0.6410514",
"0.6410327",
"0.6396266",
"0.6396195",
"0.63824844",
"0.63734865",
"0.63727975",
"0.6366331",
"0.63652045",
"0.63555735",
"0.63555735",
"0.63555735",
"0.63555735",
"0.63555735",
"0.63555735",
"0.6353483",
"0.6345342",
"0.63410604",
"0.63329905",
"0.63275355",
"0.63215095",
"0.6319039",
"0.6319028",
"0.63183135",
"0.6288675",
"0.628571",
"0.6283734",
"0.6282329",
"0.6282329",
"0.62643266",
"0.6262345",
"0.6261221",
"0.62593085",
"0.62588596",
"0.62535894",
"0.625254",
"0.62500215",
"0.6238689",
"0.623761",
"0.623761",
"0.623761",
"0.623761",
"0.623761",
"0.623761",
"0.623761",
"0.623761"
] | 0.0 | -1 |
VertexServer constructor initializes the JobServer address and port. | public VertexServer(Properties props) {
this.jobServerAddr = props.getProperty("jobserver.address");
this.jobServerPort = Integer.parseInt(props.getProperty("jobserver.port"));
this.numThreads = Integer.parseInt(props.getProperty("threads"));
this.execSrv = Executors.newFixedThreadPool(numThreads);
try{
hdfs = new HdfsUtils(props.getProperty("namenode.address"),
Integer.parseInt(props.getProperty("namenode.port")));
}catch(IOException e){
logger.log(Level.SEVERE, "Failed connecting to HDFS", e);
throw new RuntimeException(e);
}
vManager = new VertexManager(numThreads);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }",
"public EchoJob(){\n\t\tsuper.vertexStages = new ArrayList<VertexStage>();\n\t\t\n\t\t// note: input/output job directory HDFS paths are specified on client.sh command line\n\t\t\n\t\t// define the first stage & add to stage list\n\t\t// - JobServer will load this class, instantiate it\n\t\t// and invoke the getVertexStages() (defined in\n\t\t// the super-class) to get the list of stages\n\t\tVertexStage echoStage = new VertexStage();\n\t\techoStage.setVertex(EchoVertex.class);\n\t\tvertexStages.add(echoStage);\n\t}",
"public Server(){\n\t\ttry {\n\t\t\t// initialize the server socket with the specified port\n\t\t\tsetServerSocket(new ServerSocket(PORT));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception while creating a server\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"Vertex(){}",
"public RentRPCServer() {\n\t\tsuper(null, null);\n\t\t// mocking purpose\n\t}",
"VertexNetwork() {\r\n /* This constructor creates an empty list of vertex locations. \r\n read The transmission range is set to 0.0. */\r\n transmissionRange = 0.0;\r\n location = new ArrayList<Vertex>(0);\r\n }",
"public Server() {}",
"public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }",
"public OOXXServer(){\n\t\ttry\n\t\t{\n\t\t\tserver = new ServerSocket(port);\n\t\t\t\n\t\t}\n\t\tcatch(java.io.IOException e)\n\t\t{\n\t\t}\n\t}",
"public Server() {\n\t\t\n\t\ttry {\n\t\t\tss= new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(); // Default\n\t\t}\n\t}",
"public Server() {\n\t\tinit(new Config());\n\t}",
"public SocketServer() {\n \n super();\n start();\n\n }",
"public Server() {\n initComponents();\n }",
"public Server() {\n initComponents();\n }",
"public Server(int port)\r\n\t\t{\r\n log(\"Initialising port \" + port);\r\n\r\n\t\t// Set the port\r\n\t\tthis.port = port;\r\n\r\n // Create the server socket\r\n createServerSocket();\r\n \t}",
"public FServer() {\n initComponents();\n }",
"public KVClient(String server, int port) {\n this.server = server;\n this.port = port;\n }",
"public Vertex(){\n\n }",
"public Server(int port, mainViewController viewController, LogViewController consoleViewController){\n isRunningOnCLI = false;\n this.viewController = viewController;\n this.port = port;\n this.consoleViewController = consoleViewController;\n viewController.serverStarting();\n log = new LoggingSystem(this.getClass().getCanonicalName(),consoleViewController);\n log.infoMessage(\"New server instance.\");\n try{\n this.serverSocket = new ServerSocket(port);\n //this.http = new PersonServlet();\n log.infoMessage(\"main.Server successfully initialised.\");\n clients = Collections.synchronizedList(new ArrayList<>());\n ServerOn = true;\n log.infoMessage(\"Connecting to datastore...\");\n //mainStore = new DataStore();\n jettyServer = new org.eclipse.jetty.server.Server(8080);\n jettyContextHandler = new ServletContextHandler(jettyServer, \"/\");\n jettyContextHandler.addServlet(servlets.PersonServlet.class, \"/person/*\");\n jettyContextHandler.addServlet(servlets.LoginServlet.class, \"/login/*\");\n jettyContextHandler.addServlet(servlets.HomeServlet.class, \"/home/*\");\n jettyContextHandler.addServlet(servlets.DashboardServlet.class, \"/dashboard/*\");\n jettyContextHandler.addServlet(servlets.UserServlet.class, \"/user/*\");\n jettyContextHandler.addServlet(servlets.JobServlet.class, \"/job/*\");\n jettyContextHandler.addServlet(servlets.AssetServlet.class, \"/assets/*\");\n jettyContextHandler.addServlet(servlets.UtilityServlet.class, \"/utilities/*\");\n jettyContextHandler.addServlet(servlets.EventServlet.class, \"/events/*\");\n //this.run();\n } catch (IOException e) {\n viewController.showAlert(\"Error initialising server\", e.getMessage());\n viewController.serverStopped();\n log.errorMessage(e.getMessage());\n }\n }",
"public ServerConnecter() {\r\n\r\n\t}",
"public VertexEvent() {\n\t\tsuper();\n\n\t\tthis.jobVertexID = new JobVertexID();\n\t\tthis.jobVertexName = null;\n\t\tthis.totalNumberOfSubtasks = -1;\n\t\tthis.indexOfSubtask = -1;\n\t\tthis.currentExecutionState = ExecutionState.CREATED;\n\t\tthis.description = null;\n\t}",
"public ArangoDBVertex() {\n\t\tsuper();\n\t}",
"public Server(int port) {\r\n \r\n this.m_Port = port;\r\n this.m_Clients = new TeilnehmerListe();\r\n }",
"public ExternalNodeServiceClient() {\n this(ExternalNodeService.DEFAULT_PORT);\n }",
"public Server() {\n\t\tsession = new WelcomeSession();\n\t\tmPort = DEFAULT_PORT;\n\t\texecutor = Executors.newCachedThreadPool();\n\t}",
"protected Server() {\n super(\"Ublu Server\");\n }",
"protected ClassServer(int aPort) throws IOException{\n this(aPort, null);\n }",
"public Server() {\n print_addr();\n follow_updates();\n }",
"public Server(int port) {\n \ttry{\n \t\tserver = new ServerSocket(port);\n \t\tuserMap = new HashMap<Integer, User>();\n \t\troomMap = new HashMap<String, Channel>();\n \t\tnextId = 0;\n \t}\n \tcatch(Exception e){\n \t\te.printStackTrace(); \t\t\n \t}\n }",
"public Server() throws IOException\n {\n socket = new ServerSocket(port);\n }",
"public ServerMain( int port )\r\n\t{\r\n\t\tthis.port = port;\r\n\t\tserver = new Server( this.port );\r\n\t}",
"public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }",
"public Server(int port){\n\t\ttry {\n\t\t\tdatagramSocket = new DatagramSocket(port);\n\t\t\trequest = new byte[280];\n\t\t} catch (SocketException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t}",
"public ServerGame(int port)\r\n\t{\r\n\t\tsuper(NetworkMode.SERVER);\r\n\t\tserver = new Server(port, getWorld());\r\n\t}",
"public BiStreamServer(int port, String nodeName, String jClusterName) throws Exception {\n // three args\n this.port = port;\n this.nodeName = nodeName;\n this.jClusterName = jClusterName;\n // gRPC server\n this.server = ServerBuilder.forPort(port)\n .addService(new CommunicateImpl())\n .intercept(new ClientAddInterceptor())\n .build();\n this.ips = new ConcurrentHashMap<>();\n this.channel = new JChannel();\n\n }",
"public Server() {\r\n this(0);\r\n hashtable = new Hashtable<String,String>();\r\n }",
"public GameServerClient(){\r\n\t\tinitComponents();\r\n\t\t}",
"public Server(int port) {\n this.port = port;\n try {\n sock = new ServerSocket(port);\n clientSock = sock.accept();\n\n //Connection established, do some fancy stuff here\n processReq();\n } catch (IOException e) {\n System.err.println(\"ERROR: Sth failed while creating server socket :( \");\n }\n }",
"public MyModel() {\n mazeGeneratingServer = new Server(5400, 1000, new ServerStrategyGenerateMaze());\n solveSearchProblemServer = new Server(5401, 1000, new ServerStrategySolveSearchProblem());\n //Raise the servers\n }",
"public Server() throws Exception {\r\n\t}",
"public GameServer(int portNum)\n\t{\n\t\tport = portNum;\n\t}",
"public ChatRoomServer(int portNumber){\n this.ClientPort = portNumber;\n }",
"public Server(int port) throws IOException{\n\t\tsuper();\n\t\tthis.serversocket= new java.net.ServerSocket(port);\n\t\t\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}",
"public Server() throws IOException{\n\t\tsuper();\n\t\tthis.serversocket = new java.net.ServerSocket(DEFAULTPORT);\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}",
"public LocalServer(TaskGraph taskgraph) {\n this.taskgraph = taskgraph;\n this.scheduler = new Scheduler(taskgraph);\n this.scheduler.addExecutionListener(new ExecutionStateLogger());\n }",
"public TCPServer(int port) throws IOException {\n\tthis.socket = new ServerSocket(port);\n\tthis.clients = new ArrayList();\n\n\tSystem.out.println(\"SERVER: Started\");\n }",
"public ServerA(){}",
"public Server()\n\t{\n\t\tusers = new ArrayList<User>();\n\t\tdepartments = new ArrayList<Department>();\n\t\ttokenGenerator = new Random(System.currentTimeMillis());\n\t}",
"public KVServerHandler(int port, KVServer managerServer){\n this.port = port;\n master = managerServer;\n aliveinstancethreads = new Vector<Thread>();\n aliveInstances = new Vector<KVServerInstance>();\n isRunning = false;\n kv_out = managerServer.getLogger();\n }",
"public Server() throws IOException {\n try {\n this.serverSocket = new ServerSocket(this.port,100, InetAddress.getByName(host));\n } catch (UnknownHostException e) {\n System.out.println(\"Erreur lors de la construction du serveur (Hôte inconnu) - Server Constructor Error\");\n e.printStackTrace();\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public ServerTest() {\n\t\tsuper();\n\t}",
"public TCPServerWorker(GENServer server, Socket socket) throws IOException {\n this.server = server;\n this.socket = socket;\n this.player = null;\n state = new WorkerConnectState(this, socket);\n System.out.println(\"New ServerWorker\");\n }",
"public static void startServer() {\n clientListener.startListener();\n }",
"public DefaultTCPServer(int port) throws Exception {\r\n\t\tserverSocket = new ServerSocket(port);\t}",
"public void start() {\n\t\tTimer t = new Timer(\"vertex periodic heartbeat\");\n\t\tTimerTask task = new TimerTask() { // Heartbeat timer.\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\t// Initialize our VertexHeartbeat\n\t\t\t\t\tVertexHeartbeat vhb = new VertexHeartbeat();\n\t\t\t\t\tvhb.setUid(uid.toString());\n\t\t\t\t\tvhb.setNumThreads(vManager.getAvailableThreads());\n\t\t\t\t\tvhb.setVertexDescriptor(vManager.getCompVertex());\n\t\t\t\t\t\n\t\t\t\t\tlogger.info(\"sending heartbeat to \" \n\t\t\t\t\t\t\t+ VertexServer.this.jobServerAddr + \" on port \"\n\t\t\t\t\t\t\t+ VertexServer.this.jobServerPort + \" compVert:\" +\n\t\t\t\t\t\t\tvhb.getVertexDescriptor().size());\n\t\t\t\t\t\n\t\t\t\t\tVertexHeartbeatResponse vhbr =\n\t\t\t\t\t\t(VertexHeartbeatResponse)RequestResponseUtil.\n\t\t\t\t\t\t\tclientRequest(new VertexHeartbeatProtocol(vhb),\n\t\t\t\t\t\t\t\t\tjobServerAddr, jobServerPort);\n\t\t\t\t\t\n\t\t\t\t\t// Get our VertexContexts.\n\t\t\t\t\tList<VertexDescriptor> vertexDescriptor = vhbr.getVertexDescriptor();\n\t\t\t\t\tif ( vertexDescriptor != null ) {\n\t\t\t\t\t\tfor ( int i = 0; i < vertexDescriptor.size(); i++ ) {\n\t\t\t\t\t\t\t// We have a valid VertexContext, submit this to our executor service.\n\t\t\t\t\t\t\tvManager.decrementAvailableThreads();\n\t\t\t\t\t\t\texecSrv.submit(new VertexThread(vManager, vertexDescriptor.get(i),\n\t\t\t\t\t\t\t\thdfs));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Schedule our next heartbeat message.\n\t\tt.scheduleAtFixedRate(task, Calendar.getInstance().getTime(), 5000);\n\t}",
"public GalileoConnector(String serverHostName, int serverPort) throws IOException {\r\n\t\tsuper(serverHostName, serverPort);\r\n\t}",
"public LocalClient() {\n\t\tsuper(\"SERVER\", Arrays.asList(new String[] {\"*\"}), null, null);\n\t\tinputThread = new Thread(this);\n\t\tinputThread.start();\n\t}",
"public TCPServer(TCPViewModel viewModel, int port) {\n this.viewModel = viewModel;\n this.port = port;\n startServerMsg = \"TCP server listener successfully started on port [\"+port+\"]... listening for incoming connections.\";\n }",
"@SuppressWarnings(\"OverridableMethodCallInConstructor\")\n public ServerFrame() {\n initComponents();\n init();\n connection();\n }",
"public void init(){\n\t\tmultiplexingClientServer = new MultiplexingClientServer(selectorCreator);\n\t}",
"public ServerDef() {}",
"public Server(){\n\t\tusers = new HashMap<String, Vector<Integer>>();\n\t}",
"public LoadBalancer(int port) throws IOException {\n super(port);\n tabServerssout = new Vector();\n tabServerssin = new Vector();\n //On se connecte aux serveurs\n addServers(8010,8013);\n }",
"public Server()\n {\n clientSessions = new ArrayList();\n }",
"public Server(int port) {\n this.port = port;\n try {\n socket = new DatagramSocket(port);\n } catch (SocketException e) {\n e.printStackTrace();\n }\n run = new Thread(this, \"Server\");\n run.start();\n }",
"public SocketServer(Context context) {\n \t\tthis.context = context;\n \t}",
"public Server() throws IOException {\n System.out.println(\"\\t Server Started \\n\");\n }",
"public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }",
"public ZKInProcessServer(int clientPort, String logdir) throws IOException {\n this.standalone = true;\n Properties properties = new Properties();\n properties\n .setProperty(\"clientPort\", Integer.valueOf(clientPort).toString());\n properties.setProperty(\"dataDir\", logdir + \"/server-0\");\n properties.setProperty(\"dataLogDir\", logdir + \"/logs-0\");\n properties.setProperty(\"tickTime\", \"2000\");\n properties.setProperty(\"initLimit\", \"10\");\n properties.setProperty(\"syncLimit\", \"5\");\n properties.setProperty(\"electionAlg\", \"3\"); // fast leader election\n properties.setProperty(\"maxClientCnxns\", \"0\");\n createDirs(logdir + \"/server-0\", logdir + \"/logs-0\", 0);\n try {\n config.parseProperties(properties);\n } catch (ConfigException e) {\n throw new IOException(e);\n }\n }",
"public Server() {\n try {\n welcomeSocket = new ServerSocket(PORT);\n System.out.println(\"Server listening on \" + PORT);\n } catch (IOException e) {\n System.out.println(\"Error creating welcome socket. Is this socket available?\");\n }\n }",
"public WebServer ()\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t{\r\n\t\tthis.shost = DEF_HOST; \t\t\t\t\t\t\t\t\r\n\t\tthis.sPort = DEF_PORT; \t\t\t\t\t\t\t\t\r\n\t}",
"public MyVertex( ) {\n // Set ID and increment so next Vertex count++\n id = count;\n count++;\n\n // Set color to NULL initially\n color = null;\n\n // Create new Lists\n incidentEdges = new ArrayList< Edge >( );\n adjacentVertices = new ArrayList< Vertex >( );\n }",
"public NetworkClient(String server, int port) {\n\t\tthis.host = server;\n\t\tthis.port = port;\n\t}",
"public Server(int port, Consumer<Serializable> onReceiveCallBack)\r\n {\r\n //superclass Constructor called \r\n super(onReceiveCallBack);\r\n \r\n //\r\n this.port = port;\r\n }",
"public TCPMessengerServer() {\n initComponents();\n customInitComponents();\n listenForClient(); \n }",
"public Vertex(String argName) {\n name = argName;\n }",
"private CassandraServer() {\n }",
"public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"void startServer(int port) throws Exception;",
"private Server()\n\t{\n\t}",
"public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }",
"public Worker(Socket client, int dataPort) {\n super();\n this.controlSocket = client;\n this.dataPort = dataPort;\n this.currDirectory = System.getProperty(\"user.dir\") + \"/test\";\n this.root = System.getProperty(\"user.dir\");\n }",
"public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}",
"public Vertex(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"public ClientWorker(ServerSocketChannel serverChannel){\n this.serverChannel = serverChannel;\n }",
"@Override\n\tpublic void initialize() {\n\t\ttransportManager = newServerTransportManager();\n\t\ttransportServer = newTransportServer();\n\t\tserverStateMachine = newTransportServerStateMachine();\n\n\t\tserverStateMachine.setServerTransportComponentFactory(this);\n\t\ttransportManager.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerHostConfig(getServerHostConfig());\n\n\t\tsetInitialized(true);\n\t}",
"public Server() {\n\t\tthis.currentMode = Mode.TEST; // TODO: implement\n\t}",
"public Mesh() {\n this(DEFAULT_COORDS);\n }",
"public MockServerClient(String host, int port) {\n this(host, port, \"\");\n }",
"public Server(int port, int maxCapacity) {\n // the port\n this.port = port;\n // to display hh:mm:ss\n simpleDateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n // an ArrayList to keep the list of the Client\n clientThreads = new ArrayList<>();\n this.maxCapacity = maxCapacity;\n gameManager = new GameManager(this.maxCapacity, clientThreads, this);\n }",
"public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }",
"public static void initializeServer() {\n\t\tServer.initializeServerGUI();\n\t}",
"public void startServer() {\n server.start();\n }",
"public GrpcServer(ServerBuilder<?> serverBuilder, int port) {\n this.port = port;\n server = serverBuilder.addService(new GrpcServerService())\n .build();\n }",
"public static void initCommunicationServerThread(ProjectType project){\r\n try{\r\n serverSocket = new ServerSocket(Attributes.PROFILING_PORT, 2, InetAddress.getLocalHost());\r\n System.out.println(\"Server - ServerSocket created on port: \" + serverSocket.getLocalPort());\r\n }catch (UnknownHostException uhe){\r\n uhe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log this stuff properly\r\n }\r\n new CommunicationServerThread(project);\r\n }",
"private void startServer(){\n clients = new ArrayList<ClientThread>();\n ServerSocket ClientSocket = null;\n try {\n ClientSocket = new ServerSocket(ClientPort);\n ClientSocketConnection(ClientSocket);\n } catch (IOException e){\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public ServerSide(Config config, InetAddress inetAddress, int port) {\n super(config);\n this.inetAddress = inetAddress;\n this.port = port;\n }",
"public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}",
"public Server(){\n this.tasks = new LinkedBlockingQueue<Task>();\n this.waitingPeriod = new AtomicInteger();\n }",
"private void initialyzeServer(int port) {\n\n try {\n server = new ServerSocket(port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n while (true) {\n try {\n\n Client c = new Client(server.accept(), \"client \" + clientIterator, this);\n\n sockets.add(c);\n ex.submit(c);\n\n System.out.println(race);\n\n race.getBroker().registerClient(c);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n clientIterator++;\n\n System.out.println(\"Client\" + clientIterator + \" has connected the server\");\n }\n }"
] | [
"0.63472927",
"0.6336557",
"0.6202085",
"0.6138721",
"0.6069022",
"0.60644644",
"0.6010659",
"0.5976945",
"0.59768844",
"0.59598565",
"0.59130937",
"0.5905501",
"0.5894565",
"0.5894565",
"0.5887882",
"0.5862267",
"0.5855141",
"0.5826486",
"0.58261186",
"0.5825844",
"0.5815787",
"0.5813392",
"0.58051187",
"0.5799442",
"0.57904494",
"0.57491785",
"0.57428604",
"0.57325554",
"0.5718856",
"0.57076335",
"0.5696481",
"0.5692349",
"0.5671372",
"0.5665747",
"0.5664045",
"0.56547487",
"0.56472147",
"0.5644681",
"0.56346405",
"0.5631536",
"0.5590245",
"0.5579163",
"0.5570219",
"0.5565301",
"0.5552283",
"0.5552142",
"0.5551627",
"0.55457634",
"0.55295235",
"0.55249804",
"0.5524536",
"0.55224174",
"0.5518298",
"0.5513455",
"0.5503964",
"0.5483886",
"0.54629534",
"0.54414845",
"0.54374576",
"0.54372805",
"0.5434284",
"0.54341835",
"0.5429685",
"0.54243547",
"0.5423762",
"0.538959",
"0.53876",
"0.5387389",
"0.5385066",
"0.5382279",
"0.53637815",
"0.5361983",
"0.53582615",
"0.53535116",
"0.53532434",
"0.5353169",
"0.53524965",
"0.5345748",
"0.53357744",
"0.5334992",
"0.5326235",
"0.5324841",
"0.5319926",
"0.5319757",
"0.5308613",
"0.53027976",
"0.52984077",
"0.52930754",
"0.5293052",
"0.52877045",
"0.5284288",
"0.528389",
"0.52802837",
"0.5272005",
"0.52656245",
"0.5260958",
"0.52472",
"0.5247106",
"0.5245312",
"0.5236844"
] | 0.78474414 | 0 |
Start method to start execution of the VertexServer. | public void start() {
Timer t = new Timer("vertex periodic heartbeat");
TimerTask task = new TimerTask() { // Heartbeat timer.
@Override
public void run() {
try {
// Initialize our VertexHeartbeat
VertexHeartbeat vhb = new VertexHeartbeat();
vhb.setUid(uid.toString());
vhb.setNumThreads(vManager.getAvailableThreads());
vhb.setVertexDescriptor(vManager.getCompVertex());
logger.info("sending heartbeat to "
+ VertexServer.this.jobServerAddr + " on port "
+ VertexServer.this.jobServerPort + " compVert:" +
vhb.getVertexDescriptor().size());
VertexHeartbeatResponse vhbr =
(VertexHeartbeatResponse)RequestResponseUtil.
clientRequest(new VertexHeartbeatProtocol(vhb),
jobServerAddr, jobServerPort);
// Get our VertexContexts.
List<VertexDescriptor> vertexDescriptor = vhbr.getVertexDescriptor();
if ( vertexDescriptor != null ) {
for ( int i = 0; i < vertexDescriptor.size(); i++ ) {
// We have a valid VertexContext, submit this to our executor service.
vManager.decrementAvailableThreads();
execSrv.submit(new VertexThread(vManager, vertexDescriptor.get(i),
hdfs));
}
}
} catch(Exception e) {
throw new RuntimeException(e);
}
}
};
// Schedule our next heartbeat message.
t.scheduleAtFixedRate(task, Calendar.getInstance().getTime(), 5000);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void start(){\n // Retrieve the configuration, and init the verticle.\n JsonObject config = config();\n init(config);\n // Every `period` ms, the given Handler is called.\n vertx.setPeriodic(period, l -> {\n mining();\n send();\n });\n }",
"@Override\n public void start() throws Exception {\n vertx.createHttpServer()\n // The requestHandler is called for each incoming\n // HTTP request, we print the name of the thread\n .requestHandler(req -> {\n req.response().end(\"Hello from \"\n + Thread.currentThread().getName());\n })\n .listen(8080); // start the server on port 8080\n }",
"public void start() {\n \t\tinit();\n\t\tif(!checkBackend()){\n\t\t\tvertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {\n\t\t\t\tpublic void handle(HttpServerRequest req) {\n\t\t\t\t String query_type = req.path();\t\t\n\t\t\t\t req.response().headers().set(\"Content-Type\", \"text/plain\");\n\t\t\t\t\n\t\t\t\t if(query_type.equals(\"/target\")){\n\t\t\t\t\t String key = req.params().get(\"targetID\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequest(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t String key = \"1\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequestRange(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}).listen(80);\n\t\t} else {\n\t\t\tSystem.out.println(\"Please make sure that both your DCI are up and running\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }",
"public void startServer() {\n server.start();\n }",
"public VertexServer(Properties props) {\n\n\t\tthis.jobServerAddr = props.getProperty(\"jobserver.address\");\n\t\tthis.jobServerPort = Integer.parseInt(props.getProperty(\"jobserver.port\"));\n\t\tthis.numThreads = Integer.parseInt(props.getProperty(\"threads\"));\n\t\tthis.execSrv = Executors.newFixedThreadPool(numThreads);\n\t\t\n\t\ttry{\n\t\t\thdfs = new HdfsUtils(props.getProperty(\"namenode.address\"), \n\t\t\t\tInteger.parseInt(props.getProperty(\"namenode.port\")));\n\t\t}catch(IOException e){\n\t\t\tlogger.log(Level.SEVERE, \"Failed connecting to HDFS\", e);\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t vManager = new VertexManager(numThreads);\n\t}",
"public void start()\n {\n }",
"public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }",
"public static void startServer() {\n clientListener.startListener();\n }",
"public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }",
"public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}",
"public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }",
"public void start() {\n }",
"protected void start() {\n }",
"public void start() throws Exception {\n\n Location location = (locationManager != null && locationManager.getLocation() != null) ? locationManager.getLocation() : null;\n\n if(location == null)\n location = new NetworkNodeCommunicationDeviceLocation(\n 0.0 ,\n 0.0,\n 0.0 ,\n 0 ,\n 0.0 ,\n System.currentTimeMillis(),\n LocationSource.UNKNOWN\n );\n\n NodeContext.add(NodeContextItem.LOCATION, location);\n\n this.initialize();\n LOG.info(\"Starting the internal server\");\n this.server.start();\n LOG.info(\"Server URI = \" + this.server.getURI());\n this.server.join();\n\n\n\n }",
"public void start() {\n\n\t}",
"public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }",
"public void start() {}",
"public void start() {}",
"@Override public void start() {\n }",
"private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}",
"void start() throws EngineException;",
"public void start() {\r\n vcr().start();\t\r\n }",
"public void start() {\n\n }",
"public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }",
"public start() {\n\t\tsuper();\n\t}",
"public void start()\n {}",
"protected void serverStarted()\n {\n // System.out.println\n // (\"Server listening for connections on port \" + getPort());\n }",
"public void run(){\n\t\tstartServer();\n\t}",
"public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\n }",
"public void start() {\r\n try {\r\n // Using command line args instead \r\n // System.setProperty(\"org.lwjgl.librarypath\", new File(\"lib/lwjgl-2.9.2/native/windows\").getAbsolutePath());\r\n createWindow();\r\n initGL();\r\n render();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n public void start(Future<Void> startFuture) {\n vertx.createHttpServer()\n .requestHandler(getRequestHandler()).listen(8080, http -> {\n if (http.succeeded()) {\n startFuture.complete();\n LOGGER.info(\"HTTP server started on http://localhost:8080\");\n } else {\n startFuture.fail(http.cause());\n }\n });\n }",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\t\t\n\t}",
"public void start(){\n\t\tsuper.start();\n\t}",
"public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"@Override\r\n public void start() {\r\n }",
"protected void serverStarted()\n {\n System.out.println(\"Server listening for connections on port \" + getPort());\n }",
"public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}",
"public void start(){\n }",
"public SocketServer() {\n \n super();\n start();\n\n }",
"private void start() {\n\n\t}",
"public void start() {\n\t\tconnection.start((sender, message) -> message.accept(new Visitor(sender)));\n\t\tloadData();\n\t}",
"@Override\r\n public synchronized void start() throws Exception {\r\n if (isStopped()) {\r\n startClients();\r\n startServers();\r\n startHelper();\r\n super.start();\r\n }\r\n }",
"@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"TESLA has been started\");\n\t}",
"public void startup() {\n\t\tstart();\n }",
"public void start() throws Exception {\n ServerSocket socket = new ServerSocket(0);\n port = socket.getLocalPort();\n socket.close();\n\n final String[] localArgs = {\"-inMemory\", \"-port\", String.valueOf(port)};\n server = ServerRunner.createServerFromCommandLineArgs(localArgs);\n server.start();\n url = \"http://localhost:\" + port;\n\n // internal client connection so we can easily stop, cleanup, etc. later\n this.dynamodb = getClient();\n }",
"public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"public void start() throws ADBServerNeedRestartException {\n mStatus = STATUS.STARTED;\n mSessionLog.setStartTime(System.currentTimeMillis());\n mTestThread = new TestSessionThread(this);\n \n CUIOutputStream.println(\"start test plan \" + getSessionLog().getTestPlanName());\n startImpl();\n }",
"private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}",
"public void start() {\n System.out.println(\"This vehicle starts\");\n }",
"protected void serverStarted()\r\n {\r\n System.out.println\r\n (\"Server listening for connections on port \" + getPort());\r\n }",
"@Override\n public void start() {\n //start eye tracking if it is not running already\n startEyeTracking();\n\n super.start();\n\n //start light sensor\n mLightIntensityManager.startLightMonitoring();\n }",
"@Override\n public void start() throws WebServerException {\n }",
"public void start() {\n System.out.println(\"start\");\n }",
"public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}",
"@Override\n public void start() { }",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"private void start() {\r\n\t\t// Clear the log file.\r\n\t\tBPCC_Logger.clearLogFile();\r\n\t\t\r\n\t\t// Initialize BPCC_Util static fields.\r\n\t\tBPCC_Util.initStaticFields();\r\n\t\t\r\n\t\t// Set logging level desired for test.\r\n\t\tBPCC_Util.setLogLevel(LogLevelEnum.DEBUG);\r\n\t\t\r\n\t\t// Initialize class global variables.\r\n\t\tinitVars();\r\n\t\t\r\n\t\tcreateAndShowGUI();\r\n\t}",
"@Override\n\tpublic void start() {\n\n\t}",
"public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}",
"public void startEngine(){\r\n isEngineRunning = true;\r\n System.out.println(\"[i] Engine is running.\");\r\n }",
"void start() {\n }",
"@Override\r\n\tpublic void start() {\n\t\tsuper.start();\r\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\" ThriftServer start ing ....\");\n\t\t\t\ttry { \n\t\t\t\t\tif (!server.isServing()) {\n\t\t\t\t\t\tserver.serve();\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} finally {\n\t\t\t\t\tif (transport != null) {\n\t\t\t\t\t\ttransport.close();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n protected void start() throws StartException {\n\r\n if (!Main.INIT_COMPLETE.isReached()) startServer();\r\n new EDTRunner() {\r\n\r\n @Override\r\n protected void runInEDT() {\r\n initGUI();\r\n }\r\n };\r\n\r\n }",
"@Override\n\tpublic void start() {\n\t}",
"@Override\n\tpublic void start() {\n\t}",
"public void start() {\n\t\tSystem.out.println(\"BMW start method\");\n\t}",
"@Override\n public void start() {\n\n }",
"@Override\n public void start() {\n\n }",
"@Override\n public void start() {\n\n }",
"public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}",
"public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void start() {}",
"@Override\n public void start() {\n }",
"public void start() {\n\t\tSystem.out.println(\"BMW Slef-----start\");\n\t}",
"public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}",
"@Override\r\n\tpublic synchronized void start() {\n\t\tsuper.start();\r\n\t}",
"public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}",
"public void processStart(){\n initWorkerQueue();\n DataBean serverArgs = new DataBean();\n serverArgs.setValue(\"mode\",\"server\");\n serverArgs.setValue(\"messagekey\",\"72999\");\n serverArgs.setValue(\"user\",\"auth\");\n serverArgs.setValue(\"messagechannel\",\"/esb/system\");\n messageClient = new MessageClient(this,serverArgs);\n Helper.writeLog(1,\"starting message server\");\n messageClient.addHandler(this);\n \n }"
] | [
"0.69873387",
"0.6896987",
"0.68103725",
"0.6730814",
"0.67044073",
"0.664305",
"0.6552733",
"0.65398693",
"0.6474858",
"0.6452749",
"0.6412407",
"0.6376012",
"0.6355282",
"0.63172376",
"0.6296889",
"0.6291574",
"0.6266059",
"0.6249397",
"0.6249397",
"0.6224123",
"0.6223301",
"0.6220554",
"0.61906564",
"0.61882085",
"0.61672974",
"0.61460054",
"0.61427677",
"0.6134667",
"0.61300933",
"0.6113597",
"0.6104104",
"0.61015934",
"0.6100168",
"0.6100168",
"0.60822785",
"0.60653174",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.60578215",
"0.6053034",
"0.605101",
"0.60485893",
"0.6041955",
"0.60207325",
"0.6020295",
"0.6018611",
"0.601001",
"0.6008306",
"0.6007392",
"0.60066116",
"0.59994173",
"0.59984386",
"0.59984386",
"0.59984386",
"0.59984386",
"0.59984386",
"0.59984386",
"0.59984386",
"0.5989494",
"0.59725183",
"0.5958695",
"0.59585184",
"0.59550494",
"0.5953957",
"0.5944903",
"0.5941356",
"0.594012",
"0.5933432",
"0.5930604",
"0.5925966",
"0.5921273",
"0.5909724",
"0.59090924",
"0.59008515",
"0.5900493",
"0.5898157",
"0.5895582",
"0.5895582",
"0.58955467",
"0.589494",
"0.589494",
"0.589494",
"0.5881445",
"0.5866308",
"0.5861129",
"0.5842553",
"0.58297634",
"0.58297604",
"0.5828081",
"0.5822713",
"0.58213484"
] | 0.68696517 | 2 |
This starts application. Input file is read and parsed. Then students eligible for scholarship are determined and saved to the output file. Also, min score for scholarship and student rating are print to System.out. | public static void main(String[] args) {
try {
List<Student> students = loadStudentList(new File(INPUT_FILE_NAME));
List<Student> studentsWithScholarship =
selectTopNonContractStudents(students, SCHOLARSHIP_PERCENTAGE);
double minScoreForScholarship = getMinScoreForScholarship(studentsWithScholarship);
System.out.printf("Min score for scholarship: %f%n", minScoreForScholarship);
System.out.printf("Students with scholarship (%d total):%n",
studentsWithScholarship.size());
studentsWithScholarship.forEach(System.out::println);
saveStudentsList(studentsWithScholarship, new File(OUTPUT_FILE_NAME));
} catch (IOException e) {
System.err.println("Failed to read/write file");
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\n //\tThis code is given to you. There is NO NEED TO CHANGE IT\n AltFinal altFinal = new AltFinal(\"College.csv\");\n\n //\tThis is some sample code to show all students in the Students List and how to iterate through the list\n //\tmany of your tasks will need to do something similar.\n //\t\tloop through the list, look for some value in each student record and\n // \t\teither count that value or compare to another value\n //\tNothing TODO here - just some sample code to list the students. You'll use this for loop often\n for (Student student : altFinal.students) {\n System.out.println(\"student = \" + student);\n }\n\n //\t----------------------------------------------------------------------------------------------\n //\tNow that we have all of the data loaded let's do some analysis on the information\n\n //\tBelow here is the code to use for the the Final\n\n //\tCommented out until you write the code for the highScholarshipStateStudent method.\n Student bigMoney;\n bigMoney = altFinal.highScholarshipStateStudent(\"Texas\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"California\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Utah\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Washington\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Oregon\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Nevada\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n //\tThe test is to create methods that will look at the student List and\n // \tcount different values or compare them to find what we are interested in\n\n //\tTODO At the top of this file there is a highestScholarship method.\n // \t\t\tYou have to add code to that method for this to work\n //\twhen you have created the method you can uncomment these two lines of code to see your results\n Student student = altFinal.highestScholarship();\n System.out.println(student.getName() + \" has the biggest Scholarship for: $\" + student.getScholarship());\n\n //\tTODO print how many students are from Texas\n int texans = altFinal.countHomeState(\"Texas\");\n System.out.println(\"Students in Texas: \" + texans);\n //\tTODO print how many students are from outside the US (Their homeState is Foreign)\n int foreign = altFinal.countHomeState(\"Foreign\");\n System.out.println(\"Students in Foreign: \" + foreign);\n //\tTODO print which of these two cities has the most students\n //\tYou must compare the counts for the two groups of students (Texans and Foreign)\n // \tthen print which has the most students. Your code must tell you. You must use an if-else statement\n if (texans > foreign) {\n System.out.println(\"Texans has the most students\" + texans);\n } else System.out.println(\"Foreign has the most students\"+ foreign);\n\n\n //\tTODO \thow many Freshman students appear in the list?\n //\tTODO \thow many Senior students appear in the list?\n //\tTODO \thow many Masters students appear in the list?\n //\t\t\tuse the countYearInSchool method to answer the above questions\n int yearInSchoolX = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Comp Sci\");\n System.out.println(\"There were \" + yearInSchoolX + \" Comp Sci Freshman students\");\n\n int yearInSchool = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Math\");\n System.out.println(\"There were \" + yearInSchool + \" Freshman students\");\n\n //\tTODO \thow many students have scholarships greater than $XX,000?\n //\t\t\tyou will have to create the scholarshipsGreaterThan method to get your answer\n //\t\t\tthen you can uncomment the lines below to print it out\n int bigScholarships = altFinal.getScholarshipsGreaterThan(5000);\n System.out.println(\"Scholarships greater than $5000: \" + bigScholarships);\n\n//\t\t//\tTODO \tprint how many students have scholarships greater than $8,000?\n int testScholarshipMethod = altFinal.getScholarshipsGreaterThan(8000);\n System.out.println(\"there are this many students \" + testScholarshipMethod + \" that have scholarships greater than 8000\");\n\n System.out.println(\"Scholarships for Texans studying anything $\" + altFinal.scholarshipTotal(\"Texas\", null));\n System.out.println(\"Scholarships for anyone studying Statistics $\" + altFinal.scholarshipTotal(null, \"Statistics\"));\n System.out.println(\"Scholarships for Texans studying Statistics $\" + altFinal.scholarshipTotal(\"Texas\", \"Statistics\"));\n System.out.println(\"Scholarships for anyone studying anything $\" + altFinal.scholarshipTotal(null, null));\n }",
"public static void process(Scanner s) {\n\t\tString[] first_name, last_name;\n\t\tString[] letter_grade;\n\t\tString[] output, first_initial;\n\t\tdouble[] assignments,aGrades;\n\t\tint[] letterGradeCount = new int[11];\n\t\tdouble aTotal,aGTotal;\n\t\tint studentCount=0;\n\t\tint aCount = 0;\n\t\tdouble[] assignment_grade, participation_grade, midterm, final_exam, weighted_average,normalizedMid, normalizedFin, curved_score_mid, curved_score_fin;\n\t\tdouble maxPPoint, rawPPoint;\n\t\tdouble totalMid, aveMid, totalFin, aveFin, stdMid, stdFin, sumstdm, sumstdf;\n\t\t\n\t\t\n\t\taTotal = aGTotal = totalMid = totalFin = sumstdm = sumstdf = 0;\n\t\t\n\t\ts = new Scanner(System.in);\n\t\t\n\t\taCount = s.nextInt();\n\n\t\tassignments = new double[aCount];\n\t\taGrades = new double[aCount];\n\t\t\n\t\tfor(int i = 0;i < aCount;i++)\n\t\t{\n\t\t\tassignments[i] = s.nextDouble();\n\t\t\taTotal= aTotal + assignments[i];\n\t\t}\n\t\t\n\t\tmaxPPoint = s.nextDouble();\n\t\tstudentCount=s.nextInt();\n\t\toutput = new String[studentCount];\n\t\tfirst_name = new String[studentCount];\n\t\tlast_name = new String[studentCount];\n\t\tfirst_initial = new String[studentCount];\n\t\tnormalizedMid = new double[studentCount];\n\t\tnormalizedFin = new double[studentCount];\n\t\tcurved_score_mid = new double[studentCount];\n\t\tcurved_score_fin = new double[studentCount];\n\t\tletter_grade = new String[studentCount];\n\t\tassignment_grade = new double[studentCount];\n\t\tparticipation_grade= new double[studentCount];\n\t\tmidterm = new double[studentCount];\n\t\tfinal_exam = new double[studentCount];\n\t\tweighted_average = new double[studentCount];\n\t\t//input all the information\n\t\tfor(int i = 0;i < studentCount;i++)\n\t\t{\n\t\t\tfirst_name[i]=s.next();\n\t\t\tfirst_initial[i]=Character.toString(first_name[i].charAt(0)) + \".\";\n\t\t\tlast_name[i]=s.next();\n\t\t\t\n\t\t\trawPPoint=s.nextDouble();\n\t\t\tparticipation_grade[i] = 100 * (rawPPoint / (maxPPoint * 0.8));\n\t\t\t\n\t\t\tparticipation_grade[i] = (participation_grade[i] > 100) ? 100 : participation_grade[i];\n\t\t\taGTotal=0;\n\t\t\tfor(int i1 = 0;i1 < aCount;i1++)\n\t\t\t{\n\t\t\t\taGrades[i1] = s.nextDouble();\n\t\t\t\taGTotal= aGTotal + aGrades[i1];\n\t\t\t}\n\t\t\t\n\t\t\tassignment_grade[i] =100*(aGTotal)/(aTotal);\n\t\n\t\t\tmidterm[i]=s.nextDouble();\n\t\t\tfinal_exam[i]=s.nextDouble();\n\t\t\t\n\t\t\ttotalMid = totalMid + midterm[i];\n\t\t\ttotalFin = totalFin + final_exam[i];\n\t\t}\n\t\t\n\t\taveMid = totalMid / studentCount;\n\t\taveFin = totalFin / studentCount;\n\t\tfor(int i = 0 ; i < studentCount ; i++)\n\t\t{\n\t\t\tsumstdm=sumstdm+Math.pow(midterm[i]-aveMid, 2);\n\t\t\tsumstdf=sumstdf+Math.pow(final_exam[i]-aveFin, 2);\n\t\t}\n\t\t\n\t\tstdMid = Math.sqrt( sumstdm / studentCount);\n\t\tstdFin = Math.sqrt( sumstdf / studentCount);\n\t\t\n\t\tfor(int i = 0 ; i < studentCount ; i++)\n\t\t{\n\t\t\tdouble nm, nf;\n\t\t\tnm = (midterm[i]-aveMid)/stdMid;\n\t\t\tnf = (final_exam[i]-aveFin)/stdFin;\n\t\t\tif(nm>1.0 && nm <2.0 && nm > -4.0)\n\t\t\t\tcurved_score_mid[i] = (nm - 1.0)/(2.0 - 1.0)*(100.0 - 94.0) + 94.0;\n\t\t\telse if(nm>0.0)\n\t\t\t\tcurved_score_mid[i] = (nm - 0.0)/(1.0 - 0.0)*(94.0 - 85.0) + 85.0;\n\t\t\telse if(nm>-1.0)\n\t\t\t\tcurved_score_mid[i] = (nm - (-1.0))/(0.0 - (-1.0))*(85.0 - 75.0) + 75.0;\n\t\t\telse if(nm>-1.5)\n\t\t\t\tcurved_score_mid[i] = (nm - (-1.5))/((-1.0) - (-1.5))*(75.0 - 65.0) + 65.0;\n\t\t\telse if(nm>-2.0)\n\t\t\t\tcurved_score_mid[i] = (nm - (-2.0))/((-1.5) - (-2.0))*(65.0 - 55.0) + 55.0;\n\t\t\telse if(nm>-3.0)\n\t\t\t\tcurved_score_mid[i] = (nm - (-3.0))/((-2.0) - (-3.0))*(55.0 - 30.0) + 30.0;\n\t\t\telse\n\t\t\t\tcurved_score_mid[i] = (nm - (-4.0))/((-3.0) - (-4.0))*(30.0 - 0) + 30.0;\n\n\t\t\tif(nf>1.0 && nf <2.0 && nf > -4.0)\n\t\t\t\tcurved_score_fin[i] = (nf - 1.0)/(2.0 - 1.0)*(100.0 - 94.0) + 94.0;\n\t\t\telse if(nf>0.0)\n\t\t\t\tcurved_score_fin[i] = (nf - 0.0)/(1.0 - 0.0)*(94.0 - 85.0) + 85.0;\n\t\t\telse if(nf>-1.0)\n\t\t\t\tcurved_score_fin[i] = (nf - (-1.0))/(0.0 - (-1.0))*(85.0 - 75.0) + 75.0;\n\t\t\telse if(nf>-1.5)\n\t\t\t\tcurved_score_fin[i] = (nf - (-1.5))/((-1.0) - (-1.5))*(75.0 - 65.0) + 65.0;\n\t\t\telse if(nf>-2.0)\n\t\t\t\tcurved_score_fin[i] = (nf - (-2.0))/((-1.5) - (-2.0))*(65.0 - 55.0) + 55.0;\n\t\t\telse if(nf>3.0)\n\t\t\t\tcurved_score_fin[i] = (nf - (-3.0))/((-2.0) - (-3.0))*(55.0 - 30.0) + 30.0;\n\t\t\telse\n\t\t\t\tcurved_score_fin[i] = (nf - (-4.0))/((-3.0) - (-4.0))*(30.0 - 0) + 0.0;\n\t\t\n\t\t} \n\t\tfor(int i = 0;i < studentCount;i++)\n\t\t{\n\t\t\tweighted_average[i] = assignment_grade[i]*0.4 + participation_grade[i]*0.15 +\n\t\t\t\t\tcurved_score_mid[i]*0.2 +curved_score_fin[i]*0.25;\n\t\t\tswitch((int)weighted_average[i])\n\t\t\t{\n\t\t\t\tcase 94:case 95:case 96:case 97:case 98:case 99:case 100:\n\t\t\t\t\tletter_grade[i] = \"A\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 90:case 91:case 92:case 93:\n\t\t\t\t\tletter_grade[i] = \"A-\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 86:case 87:case 88:case 89:\n\t\t\t\t\tletter_grade[i] = \"B+\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 83:case 84:case 85:\n\t\t\t\t\tletter_grade[i] = \"B\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 80:case 81:case 82:\n\t\t\t\t\tletter_grade[i] = \"B-\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 76:case 77:case 78:case 79:\n\t\t\t\t\tletter_grade[i] = \"C+\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 73:case 74:case 75:\n\t\t\t\t\tletter_grade[i] = \"C\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 70:case 71:case 72:\n\t\t\t\t\tletter_grade[i] = \"C-\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 65:case 66:case 67:case 68:case 69:\n\t\t\t\t\tletter_grade[i] = \"D+\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 60:case 61:case 62:case 63:case 64:\n\t\t\t\t\tletter_grade[i] = \"D\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(weighted_average[i] < 60)\n\t\t\t{\n\t\t\t\tletter_grade[i] = \"F\";\n\t\t\t}\n\n\t\t}\n\t\t \n\t\tfor(int i = 0;i < studentCount;i++)\n\t\t{\n\t\t\tswitch(letter_grade[i])\n\t\t\t{\n\t\t\tcase \"A\":\n\t\t\t\tletterGradeCount[0]++;\n\t\t\t\tbreak;\n\t\t\tcase \"A-\":\n\t\t\t\tletterGradeCount[1]++;\n\t\t\t\tbreak;\n\t\t\tcase \"B+\":\n\t\t\t\tletterGradeCount[2]++;\n\t\t\t\tbreak;\n\t\t\tcase \"B\":\n\t\t\t\tletterGradeCount[3]++;\n\t\t\t\tbreak;\n\t\t\tcase \"B-\":\n\t\t\t\tletterGradeCount[4]++;\n\t\t\t\tbreak;\n\t\t\tcase \"C+\":\n\t\t\t\tletterGradeCount[5]++;\n\t\t\t\tbreak;\n\t\t\tcase \"C\":\n\t\t\t\tletterGradeCount[6]++;\n\t\t\t\tbreak;\n\t\t\tcase \"C-\":\n\t\t\t\tletterGradeCount[7]++;\n\t\t\t\tbreak;\n\t\t\tcase \"D+\":\n\t\t\t\tletterGradeCount[8]++;\n\t\t\t\tbreak;\n\t\t\tcase \"D\":\n\t\t\t\tletterGradeCount[9]++;\n\t\t\t\tbreak;\n\t\t\tcase \"F\":\n\t\t\t\tletterGradeCount[10]++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"A : \" + letterGradeCount[0]);\n\t\tSystem.out.println(\"A-: \" + letterGradeCount[1]);\n\t\tSystem.out.println(\"B+: \" + letterGradeCount[2]);\n\t\tSystem.out.println(\"B : \" + letterGradeCount[3]);\n\t\tSystem.out.println(\"B-: \" + letterGradeCount[4]);\n\t\tSystem.out.println(\"C+: \" + letterGradeCount[5]);\n\t\tSystem.out.println(\"C : \" + letterGradeCount[6]);\n\t\tSystem.out.println(\"C-: \" + letterGradeCount[7]);\n\t\tSystem.out.println(\"D+: \" + letterGradeCount[8]);\n\t\tSystem.out.println(\"D : \" + letterGradeCount[9]);\n\t\tSystem.out.println(\"F : \" + letterGradeCount[10]);\n\t\t\n\t\t\n\t}",
"public static void main(String args[]) {\n Scanner input = new Scanner(System.in);\n Scanner fileReader = null;\n String fileName = null;\n StudentQueue studentQueue = new StudentQueue();\n boolean run = true;\n\n System.out.println(\"Welcome to the Office Hours Simulation.\");\n\n while (run) {\n System.out.println(\"Please enter a file name: \");\n fileName = input.nextLine();\n File myText = new File(fileName);\n try {\n fileReader = new Scanner(myText);\n if (!validSpecs(myText)) {\n System.out.println(\"This file has invalid specifications.\");\n } run = false;\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Error 404 File not found!\");\n\n }\n }\n int[] courseNumbers = new int[numCourses];\n double[] arrProbility = new double[numCourses];\n Course[] courses = new Course[numCourses];\n BooleanSource[] bSources = new BooleanSource[numCourses];\n Helper[] helpers = new Helper[numTAs+1];\n helpers[0] = new Helper(true);\n\n System.out.println(\"File \" + fileName + \" loaded.\");\n\n curLine = fileReader.nextLine();\n curLine = fileReader.nextLine();\n curLine = curLine.substring(curLine.indexOf(\":\") + 1);\n //adds data to the Course object array with the names of the courses\n //adds data to the int array of course numbers\n String[] array = curLine.split(\" \");\n for (int i = 0; i < numCourses; i++) {\n courses[i] = new Course(0,0);\n courseNumbers[i] = 0;\n courses[i].setCourseNumber(Integer.parseInt(array[i]));\n courseNumbers[i] = Integer.parseInt(array[i]);\n }\n\n curLine = fileReader.nextLine();\n curLine = curLine.substring(curLine.indexOf(\":\") + 1);\n //adds data to the Course object array with the arrival probability of the courses\n //adds data to the arrProbility array and the BooleanSources array\n array = curLine.split(\" \");\n for (int i = 0; i < numCourses; i++) {\n courses[i].setArrivalProbability(Double.parseDouble(array[i]));\n arrProbility[i] = Double.parseDouble(array[i]);\n bSources[i] = new BooleanSource(Double.parseDouble(array[i]));\n }\n\n //take an array of all the courses and sort it and then add the difficulty to the course object\n Arrays.sort(courses);\n for (int i = 0; i < courses.length; i++) {\n courses[i].setCourseDifficulty(numCourses - (i + 1));\n }\n\n System.out.printf(\"%-10s%-13s\", \"Course\", \"Probability\");\n System.out.println();\n System.out.println(\"-----------------------\");\n for (int i = 0; i < numCourses; i++) {\n System.out.printf(\"%-10d%f\", courses[i].getCourseNumber(), courses[i].getArrivalProbability());\n System.out.println();\n }\n System.out.println(\"Number of TAs: \" + numTAs);\n System.out.println(\"Coffee cups: \" + numCups);\n System.out.println(\"Base time interval \" + minTime + \"-\" + maxTime + \" minutes.\");\n System.out.println(\"Time: \" + simTime + \" minutes.\");\n System.out.println(\"Begin simulation: \");\n System.out.println(\"__________________________________________________\");\n simulate(simTime, arrProbility, courses, minTime, maxTime, numCups, numTAs);\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\n\t\t\n\t ICCChamp2017();\n\t System.out.println(\"England\");\n\t FinalIndVsPAk();\n\t System.out.println(\"Finals India Lifted ICC 2017\");\n\t \n\t\tFirstUmpieRevire();\n\t\tSystem.out.println(\"Simon Taufel First Umpier Reviews the Score Board\");\n\t SecondUmpireReview();\n\t System.out.println(\"Billy Bowden Second Umpier Reviews the Score Board\");\n\t ThridUmpireReview();\n\t System.out.println(\"David Shepard Thrid Umpier Reviews the Score Board\");\n\t \n\t \n\t Firstcommentary();\n\t System.out.println(\"Ravi is the commentary\");\n\t Secondcommentary();\n\t System.out.println(\"Gavaskar is the commentary\");\n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\tint Dhoni, Rahul, Sachin,Kholi;\n\t System.out.println(\"Enter four Batsman Score Display the Mini Score Of the Batsman \");\n\t in = new Scanner(System.in);\n\t \n\t \n\t \n\t \n\t Dhoni = in.nextInt();\n\t Kholi = in.nextInt();\n\t Rahul = in.nextInt();\n\t Sachin = in.nextInt();\n\t \n\t if ( Dhoni <= Kholi && Dhoni <= Rahul && Dhoni <= Sachin )\n\t System.out.println(\"Dhoni is the Mini Scored Btsmans.\");\n\t else\n\t \t if ( Kholi <= Dhoni && Kholi <= Rahul && Kholi <= Sachin )\n\t System.out.println(\"Kholi is the Min Scored Batsmans .\");\n\t else if ( Rahul <= Dhoni && Rahul <= Kholi && Rahul <= Sachin )\n\t System.out.println(\"Rahul is the Min Scored Batsmans.\");\n\t else if ( Sachin <= Dhoni && Sachin <= Kholi && Sachin <= Rahul ) \n\t \t System.out.println(\"Sachin is the Min Scored Batsmans.\"); \n\t else \n\t System.out.println(\"Every one Scored 0 Duck\");\n\t \n\t \n\t int Sami,Irfan, Jaffar,Imran;\n\t System.out.println(\"Enter four Blowers Who Taken Wickets Display the Mini Wickets Of the Match\");\n\t \n\t \n\t \n\t \n\t \n\t Sami = in.nextInt();\n\t Irfan = in.nextInt();\n\t Jaffar = in.nextInt();\n\t Imran = in.nextInt();\n\t \n\t if ( Sami <= Irfan && Sami <= Jaffar && Sami <= Imran )\n\t System.out.println(\"Sami is the Mini Scored Btsmans.\");\n\t else\n\t \t if ( Imran <= Irfan && Imran <= Jaffar && Imran <= Sami )\n\t System.out.println(\"Imran is the Min Scored Batsmans .\");\n\t else if ( Irfan <= Sami && Irfan <= Jaffar && Irfan <= Imran )\n\t System.out.println(\"Irfan is the Min Scored Batsmans.\");\n\t else if (Jaffar <= Irfan && Jaffar <= Jaffar &&Jaffar <= Imran ) \n\t \t System.out.println(\"Jaffar is the Min Scored Batsmans.\"); \n\t else \n\t System.out.println(\"No on Taken Wickets\");\n\t \n\t \n\t \n\t \n\t\t \n\t}",
"public static void main(String[] args) throws IOException, InterruptedException {\n\n if (args.length != 2) {\n stdErr.println(\"Please input two filenames\\n\");\n } else {\n\n StudentDatabase studentDatabase = null;\n\n ScholarshipDatabase scholarshipDatabase = null;\n\n try {\n StudentLoader studentLoader = new FileStudentLoader();\n\n SchlorshipLoader schlorshipLoader = new FileSchlorshipLoader();\n\n studentDatabase = studentLoader.loadStudent(args[0]);\n\n scholarshipDatabase = schlorshipLoader.loadSchlorship(args[1]);\n } catch (FileNotFoundException fnfe) {\n\n stdErr.println(\"The file does not exit\");\n\n System.exit(1);\n } catch (DataFormatException dfe) {\n\n stdErr.println(\"The file contains malformed data :\" + dfe.getMessage());\n\n System.exit(1);\n }\n\n NPUSchlarshipSystem app = new NPUSchlarshipSystem(\n studentDatabase, scholarshipDatabase);\n\n app.run();\n }\n }",
"public static void main(String[] args) {\n\n String inputFile = \"data/input.txt\";\n String outputFile = \"data/output.txt\";\n String studentInfo = \"data/students_info.txt\";\n String studentData = \"\";\n BufferedReader reader = null;\n String[] data = null;\n boolean sex = false;\n try {\n reader = new BufferedReader(new FileReader(studentInfo));\n studentData = reader.readLine();\n data = studentData.split(\" \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n \n if (data[3].equals(\"1\")) {\n sex = true;\n }\n\n Student testStudent1 = new Student(Integer.parseInt(data[0]),data[1],sex,Integer.parseInt(data[3]));\n\n testStudent1.doHomework(inputFile,outputFile,\"Со\");\n\n }",
"public static void runProgram() throws IOException{\n\t\tALL_STUDENTS.add(new StudentDetails()); //dummy StudentDetails object set to index 0 of the ArrayList. This is to ensure no student can have his/her Id set to 0.\n\t\tinitializeAllGenresList();\n\t\tScanner string_input = new Scanner(System.in); //stores string input from the user\n\t\tboolean authenticated = false; //stores whether user entered correct username and password combination\n\t\t\n\t\twhile(!authenticated){\n\t\t\tString username_input;\n\t\t\tString password_input;\n\t\t\tSystem.out.println(\"Enter username: \");\n\t\t\tusername_input = string_input.next(); //store input for username\n\t\t\tSystem.out.println(\"Enter password: \");\n\t\t\tpassword_input = string_input.next(); //store input for password\n\t\t\tauthenticated = authenticateUser(username_input, password_input); //checks whether correct username and password combination was entered\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t/*load all the BookDetails objects in the books.txt file into ALL_BOOKS, then\n\t\t * load all the StudentDetails objects in the students.txt file into ALL_STUDENTS\n\t\t */\n\t\tif(loadBooks() && loadStudents()){ //if there's no error loading all the BookDetails and StudentDetails\n\t\t\tSystem.out.println();\n\t\t\tdisplayMainMenu();\n\t\t\tint menu_option = getIntegerInput(); //ensures user input is an integer value\n\t\t\texecuteMenuOption(menu_option);\t//execute menu option entered by user\n\t\t}\n\t\t\n\t\telse{\n\t\t\tSystem.out.println(\"Sorry an error occurred while loading! Please check documentation to fix error and then restart the program.\");\n\t\t}\n\t}",
"public void highSchool(){\n\t\tSystem.out.println(\"Name:\");\n\t\tString nameRegistered = reader.nextLine();\n\t\tSystem.out.println(\"Nit:\");\n\t\tString nit = reader.nextLine();\n\t\tSystem.out.println(\"Address:\");\n\t\tString address = reader.nextLine();\n\t\tSystem.out.println(\"Contact number:\");\n\t\tString contactNumber = reader.nextLine();\n\t\tSystem.out.println(\"Number of employees:\");\n\t\tint employees = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Value of the actives:\");\n\t\tdouble value = reader.nextDouble();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Legal representative:\");\n\t\tString legalRepresentative = reader.nextLine();\n\t\tSystem.out.println(\"Constitution date:\");\n\t\tSystem.out.println(\"Day:\");\n\t\tint day = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Month:\");\n\t\tint month = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Year:\");\n\t\tint year = reader.nextInt();\n\t\treader.nextLine();\n\t\tDate constitution = new Date(day, month, year);\n\t\tSystem.out.println(\"floors of the building\");\n\t\tint rows = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Type:\");\n\t\tString type = reader.nextLine();\n\t\tSystem.out.println(\"Registry:\");\n\t\tString registry = reader.nextLine();\n\t\tSystem.out.println(\"Number of years accredited:\");\n\t\tint accreditedYears = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Rector name:\");\n\t\tString rectorName = reader.nextLine();\n\t\tSystem.out.println(\"Number of students in stratum 1 and 2:\");\n\t\tint studentsStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Number of students:\");\n\t\tint students = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Position in the saber11 test:\");\n\t\tint nationalPosition11 = reader.nextInt();\n\t\treader.nextLine();\n\t\tHighSchool toAdd = new HighSchool(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, registry, accreditedYears, rectorName, studentsStratum, students, nationalPosition11);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}",
"public static void main(String args[]) throws FileNotFoundException {\r\n\t\t//method used to run the program. \r\n\r\n\t\tScanner user_input = new Scanner(System.in);\r\n\r\n\t\tBinHeap<Student> binStud = new BinHeap<Student>();\r\n\t\tSystem.out.println(\"What file are the student records stored in? \");\r\n\t\tString answer = user_input.nextLine();\r\n\r\n\t\tFile students = new File(answer);\r\n\t\tScanner student_scan = new Scanner(students);\r\n\r\n\t\tString[] student_data;\r\n\t\tLong stud_id;\r\n\t\tString stud_name;\r\n\r\n\t\t//Need to make sure that the input is valid.\r\n\t\t//\t1. ID is not a long (any int is a long)\r\n\t\t//\t2. ID is not positive (0 or negative)\r\n\t\t//\t3. ID or name are missing. (Number of values on the line is less than 2)\r\n\t\t//\t4. There are additional values on the line (more than 2 values on the line)\r\n\t\twhile(student_scan.hasNext()){\r\n\t\t\tstudent_data = student_scan.nextLine().split(\"\\\\s+\");\r\n\r\n\t\t\tif (student_data.length != 2){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstud_id = Long.parseLong(student_data[0]);\r\n\t\t\t\tstud_name = student_data[1];\r\n\r\n\t\t\t\tif (stud_id <= 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tbinStud.insert(new Student(stud_id, stud_name));\r\n\t\t}\r\n\r\n\r\n\r\n\t\t//Print out the students in ascending order. \r\n\t\tSystem.out.println(\"Student List:\");\r\n\r\n\t\tfor(int i = 1; !binStud.isEmpty(); i++){\r\n\t\t\tSystem.out.println(i + \". \" + binStud.deleteMin());\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\t// Instantiating the Student and GradeItem as arrayLists\r\n\t\tlistOfStudents = new ArrayList<Student>();\r\n\t listOfGradeItem = new ArrayList<GradeItem>();\r\n\t\t\r\n\t\tprocessInput();\r\n\t\tSystem.out.println(\"-------------------------\");\r\n\t\tgenerateReport();\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\tString ename;\r\n\tint digital,digital1,digital2;\r\n\tint java,java1,java2;\r\n\tint networking,networking1,networking2;\r\n\tint digitalsum,digitalavg;\r\n\tint javaavg,javasum;\r\n\tint networksum,networkavg;\r\n\tScanner sc=new Scanner(System.in);\r\n\tSystem.out.println(\"enter scholar1 name\");\r\n\tename=sc.next();\r\n\tSystem.out.println(\"enter marks of digital logic\");\r\n\tdigital=sc.nextInt();\r\n\tSystem.out.println(\"enter marks of java\");\r\n\tjava=sc.nextInt();\r\n\tSystem.out.println(\"enter marks of networking\");\r\n\tnetworking=sc.nextInt();\r\n\tSystem.out.println(\"enter Scholar 2 name:\");\r\n\tename=sc.next();\r\n\tSystem.out.println(\"enter marks of digital logic\");\r\n\tdigital1=sc.nextInt();\r\n\tSystem.out.println(\"enter marks of java\");\r\n\tjava1=sc.nextInt();\r\n\tSystem.out.println(\"enter marks of networking\");\r\n\tnetworking1=sc.nextInt();\r\n\tSystem.out.println(\"enter Scholar 3 name:\");\r\n\tename=sc.next();\r\n\tSystem.out.println(\"enter marks of digital logic\");\r\n\tdigital2=sc.nextInt();\r\n\tSystem.out.println(\"enter marks of java\");\r\n\tjava2=sc.nextInt();\r\n\tSystem.out.println(\"enter marks of networking\");\r\n\tnetworking2=sc.nextInt();\r\n\tdigitalsum=digital+digital1+digital2;\r\n\tdigitalavg=digitalsum/3;\r\n\tSystem.out.println(\"average of Digital-Logic of three scholars is:\"+digitalavg);\r\n\tjavasum=java+java1+java2;\r\n\tjavaavg=javasum/3;\r\n\tSystem.out.println(\"average of Java of three scholars is\"+javaavg);\r\n\tnetworksum=networking+networking1+networking2;\r\n\tnetworkavg=networksum/3;\r\n\tSystem.out.println(\"average marks in networking of three scholars is\"+networkavg);\r\n\t}",
"public static void main(String[] args) {\n\t\tString OptionChosen = \"\";\n\n\t\tboolean didRankingHappen = false;\n\n\t\tArrayList<School> schoolArrayList = new ArrayList<School>(); // objects\n\n\t\tArrayList<Student> studentArrayList = new ArrayList<Student>();\n\t\tboolean Quit = false;\n\n\t\tint loadedStudents = 0;\n\t\tint loadedSchools = 0;\n\n\t\tSMPSolver GSS = new SMPSolver(studentArrayList, schoolArrayList, true);\n\t\tSMPSolver GSH = new SMPSolver(schoolArrayList, studentArrayList, false);\n\n\t\tdo {\n\t\t\tdisplayMenu();\n\n\t\t\tOptionChosen = getUserInput(\"Enter choice: \");\n\n\t\t\tif (checkUserInput(OptionChosen)) {\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"Q\")) {\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"Hasta luego!\");\n\t\t\t\t\tSystem.exit(0);\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"L\")) {\n\n\t\t\t\t\tdidRankingHappen = false;\n\n\t\t\t\t\tstudentArrayList.clear();\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tloadedSchools = loadSchools(schoolArrayList);\n\n\t\t\t\t\tloadedStudents = 0;\n\n\t\t\t\t\tloadedStudents = loadStudents(studentArrayList,\n\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t// Loop through and update the school's number of\n\t\t\t\t\t// participants data field real quick\n\t\t\t\t\tfor (int i = 0; i < schoolArrayList.size(); i++) {\n\t\t\t\t\t\tschoolArrayList.get(i).setNParticipants(loadedStudents);\n\t\t\t\t\t}\n\n\t\t\t\t\tdidRankingHappen = assignRankings(studentArrayList,\n\t\t\t\t\t\t\tschoolArrayList, loadedStudents, loadedSchools);\n\t\t\t\t\t// Update participants messes up my matches :(\n\t\t\t\t\tif (loadedSchools != 0 || loadedStudents != 0) {\n\t\t\t\t\t\tGSS.setMatchesExist(false);\n\t\t\t\t\t\tGSH.setMatchesExist(false);\n\t\t\t\t\t\t// updateParticipants( GSS, GSH, studentArrayList,\n\t\t\t\t\t\t// schoolArrayList);\n\t\t\t\t\t\tGSS.clearMatches();\n\t\t\t\t\t\tGSH.clearMatches();\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < studentArrayList.size(); i++) {\n\t\t\t\t\t\ttotalNumMatches += studentArrayList.get(i)\n\t\t\t\t\t\t\t\t.getMaxMatches();\n\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < schoolArrayList.size(); j++) {\n\t\t\t\t\t\ttotalNumMatches += schoolArrayList.get(j)\n\t\t\t\t\t\t\t\t.getMaxMatches();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"E\")) {\n\n\t\t\t\t\teditData(studentArrayList, schoolArrayList,\n\t\t\t\t\t\t\tnumStudentsAdded, loadedSchoolsNum,\n\t\t\t\t\t\t\tdidRankingHappen);\n\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t|| schoolArrayList.size() != 0) {\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"M\")) {\n\t\t\t\t\t// didMatchingHappen = false;\n\t\t\t\t\t// clearMatches(studentArray, schoolArray, numStudentsAdded,\n\t\t\t\t\t// loadedSchoolsNum);\n\t\t\t\t\t// didMatchingHappen = match(studentArray, schoolArray,\n\t\t\t\t\t// numStudentsAdded, loadedSchoolsNum, didRankingHappen);\n\n\t\t\t\t\t// Create new SMP solver object\n\n\t\t\t\t\t// boolean canMatchingProceed = GSS.matchingCanProceed();\n\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"STUDENT-OPTIMAL MATCHING\");\n\t\t\t\t\tboolean matchingCanProceed = GSS.matchingCanProceed();\n\t\t\t\t\tif (matchingCanProceed) {\n\t\t\t\t\t\tboolean didMatchingHappen1 = GSS.match();\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tGSS.print();\n\t\t\t\t\t}\n\t\t\t\t\tlong elapsedTime = System.currentTimeMillis() - start;\n\t\t\t\t\tif (matchingCanProceed) {\n\n\t\t\t\t\t\tSystem.out.println(totalNumMatches\n\t\t\t\t\t\t\t\t+ \" matches made in \" + elapsedTime + \"ms!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t}\n\n\t\t\t\t\tlong start1 = System.currentTimeMillis();\n\n\t\t\t\t\tSystem.out.println(\"SCHOOL-OPTIMAL MATCHING\");\n\n\t\t\t\t\tboolean matchingCanProceed2 = GSH.matchingCanProceed();\n\t\t\t\t\tif (matchingCanProceed2) {\n\t\t\t\t\t\tboolean didMatchingHappen1 = GSH.match();\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tGSH.print();\n\t\t\t\t\t}\n\t\t\t\t\tlong elapsedTime2 = System.currentTimeMillis() - start;\n\t\t\t\t\tif (matchingCanProceed) {\n\n\t\t\t\t\t\tSystem.out.println(totalNumMatches\n\t\t\t\t\t\t\t\t+ \" matches made in \" + elapsedTime + \"ms!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t}\n\n\t\t\t\t\t// didMatchingHappen = GSH.match();\n\t\t\t\t\t// boolean didMatchingHappen2 =\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"P\")) {\n\t\t\t\t\tif (schoolArrayList.size() != 0\n\t\t\t\t\t\t\t&& studentArrayList.size() != 0) {\n\t\t\t\t\t\tif (GSS.matchesExist()) {\n\t\t\t\t\t\t\tcopyAllMatches(GSS, studentArrayList,\n\t\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// copyAllMatches(GSH, schoolArrayList,\n\t\t\t\t\t\t// studentArrayList);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No students are loaded!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintStudents(studentArrayList, schoolArrayList,\n\t\t\t\t\t\t\t\tloadedStudents, didRankingHappen);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (schoolArrayList.size() == 0) {\n\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No schools are loaded!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintSchools(studentArrayList, schoolArrayList,\n\t\t\t\t\t\t\t\tloadedSchools, didRankingHappen);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"D\")) {\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t// solve.printMatches();\n\t\t\t\t\t// solve.printStats();\n\t\t\t\t\t// System.out.println(\"\");\n\n\t\t\t\t\tSystem.out.println(\"STUDENT-OPTIMAL SOLUTION\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tif (!GSS.matchesExist() || schoolArrayList.size() == 0\n\t\t\t\t\t\t\t|| studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No matches exist!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\t\tGSS.printMatches();\n\t\t\t\t\t\t\tGSS.print();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(\"SCHOOL-OPTIMAL SOLUTION\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tif (!GSH.matchesExist() || schoolArrayList.size() == 0\n\t\t\t\t\t\t\t|| studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No matches exist!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (studentArrayList.size() != 0\n\t\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\t\tGSH.printMatches();\n\t\t\t\t\t\t\tGSH.print();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"x\")) {\n\t\t\t\t\t// do this if matches happened other wise say\n\t\t\t\t\t// \"no! and return\"\n\n\t\t\t\t\tif (GSS.matchesExist() && studentArrayList.size() != 0\n\t\t\t\t\t\t\t&& schoolArrayList.size() != 0) {\n\t\t\t\t\t\tcopyAllMatches(GSS, studentArrayList, schoolArrayList);\n\t\t\t\t\t\tcopyAllMatches(GSH, schoolArrayList, studentArrayList);\n\t\t\t\t\t\tupdateParticipants(GSS, GSH, studentArrayList,\n\t\t\t\t\t\t\t\tschoolArrayList);\n\t\t\t\t\t\tString stabilityWinner = \"\";\n\t\t\t\t\t\tString avgSchoolWinner = \"\";\n\t\t\t\t\t\tString avgStudentWinner = \"\";\n\t\t\t\t\t\tString avgTotalWinner = \"\";\n\t\t\t\t\t\tString timeWinner = \"School-opt\";\n\t\t\t\t\t\tString winner = \"WINNER\";\n\t\t\t\t\t\tif (GSS.getAvgReceiverRegret() < GSH\n\t\t\t\t\t\t\t\t.getAvgSuitorRegret()) {\n\t\t\t\t\t\t\tavgSchoolWinner = \"Student-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tavgSchoolWinner = \"School-opt\";\n\t\t\t\t\t\tif (GSS.getAvgSuitorRegret() < GSH\n\t\t\t\t\t\t\t\t.getAvgReceiverRegret()) {\n\t\t\t\t\t\t\tavgStudentWinner = \"School-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tavgStudentWinner = \"Student-opt\";\n\t\t\t\t\t\tif (GSS.getAvgTotalRegret() < GSH.getAvgTotalRegret()) {\n\t\t\t\t\t\t\tavgTotalWinner = \"Student-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tavgTotalWinner = \"School-opt\";\n\t\t\t\t\t\tif (GSS.isStable() && GSH.isStable()) {\n\t\t\t\t\t\t\tstabilityWinner = \"TIE\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (GSS.isStable() && !GSH.isEveryoneMatched()) {\n\t\t\t\t\t\t\tstabilityWinner = \"School-opt\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tstabilityWinner = \"Student-opt\";\n\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Solution Stable Avg school regret Avg student regret Avg total regret Comp time (ms)\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"----------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\t\tGSS.printStatsRow(\"Student optimal\");\n\t\t\t\t\t\tGSH.printStatsRow(\"School-optimal\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"----------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\t\tSystem.out.format(\"%-15s\", winner);\n\t\t\t\t\t\tSystem.out.format(\"%13s%21s%21s%21s%21s\\n\",\n\t\t\t\t\t\t\t\tstabilityWinner, avgSchoolWinner,\n\t\t\t\t\t\t\t\tavgStudentWinner, avgTotalWinner, timeWinner);\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"----------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t} else if (!GSH.matchesExist()\n\t\t\t\t\t\t\t|| schoolArrayList.size() == 0\n\t\t\t\t\t\t\t|| studentArrayList.size() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\tSystem.out.println(\"ERROR: No matches exist!\");\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (OptionChosen.equalsIgnoreCase(\"R\")) {\n\n\t\t\t\t\tGSS.reset();\n\t\t\t\t\tGSH.reset();\n\t\t\t\t\tschoolArrayList.clear();\n\t\t\t\t\tstudentArrayList.clear();\n\t\t\t\t\tloadedSchoolsNum = 0;\n\t\t\t\t\tloadedStudents = 0;\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"Database cleared!\");\n\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t// Remove everything from both array lists\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} while (!Quit);\n\n\t}",
"public static void main(String[] args) {\n\t\tReviewReader secondRR = new ReviewReader(\"Sentiment_Analysis_Output.csv\", true);\n\t\n\t\t//ReviewReader secondRR = new ReviewReader(\"Sentiment_Analysis_Output.csv\", true);\n\n\t\tsecondRR.readFile();\n\t\tArrayList<Review> newValidReviews = secondRR.getValidReviews();\n\t\tReviewAnalysis ra = new ReviewAnalysis(newValidReviews);\n\t\t\n\t\tArrayList<String> report = new ArrayList<String>();\n\t\n\t\tSystem.out.println(\"We are generating the analysis report for you...\");\n\t\tSystem.out.println(\"It may take a few minutes, thanks for your patience.\" + \"\\n\");\n\n\t\tString result1 = \"The average age of positive reviews is \" + ra.getAveAgeOfPosReviews();\n\t\treport.add(result1 + \"\\n\");\n\n\t\tString result2 = \"The median age of positive reviews is \" + ra.getMedianAgeOfPosReviews();\n\t\treport.add(result2 + \"\\n\");\n\n\t\treport.add(\"Clothing ID \" + ra.getClothingIDWithMostReviews()\n\t\t+ \" has the most number of reviews.\");\n\t\treport.add( \"The average age of customers for the most popular item is \" \n\t\t\t\t+ ra.averageAgeOfMostPopular());\n\t\treport.add(\"The median age of customers for the most popular item is \" \n\t\t\t\t+ ra.medianAgeOfMostPopular());\n\t\treport.add(\"\");\n\n\t\treport.add(\"In each class, the model with best reviews and the keywords in its reviews are:\");\n\t\tArrayList<String> bestReviewModel = ra.findModelWithKeywords(1);\n\t\tfor (int i = 0; i < bestReviewModel.size(); i++) {\n\t\t\treport.add(bestReviewModel.get(i));\n\t\t}\n\t\treport.add(\"\");\n\n\t\treport.add(\"In each class, the model with worst reviews and the keywords in its reviews are:\");\n\t\tArrayList<String> worstReviewModel = ra.findModelWithKeywords(-1);\n\t\tfor (int i = 0; i < worstReviewModel.size(); i++) {\n\t\t\treport.add(worstReviewModel.get(i));\n\t\t}\n\t\treport.add(\"\");\n\n\t\treport.add(ra.numberOfReviews());\n\t\t\n\t\tAnalysisResultFileWriter arfw = new AnalysisResultFileWriter(report);\n\t\t\n\t\tarfw.writeOutputFile();\n\n\t\tSystem.out.println(\"Report is ready!\" + \"\\n\");\n\n\t\tSystem.out.println(\"Generating charts...\" + \"\\n\");\n\n\t\tPlots plot = new Plots(newValidReviews);\n\t\t\n\t\ttry {\n\t\t\tplot.plotHistogram1();\n\t\t\tplot.plotHistogram2();\n\t\t\tplot.plotPieChart(ra.getPositiveReviews().size(), ra.getNegativeReviews().size(),\n\t\t\t\t\tra.getNeutralReviews().size());\n\t\t\tplot.plotBarDeparmentToNumOfReviews(ra.getDepartmentToNumOfReview(ra.getNegativeReviews()), \n\t\t\t\t\tra.getDepartmentToNumOfReview(ra.getNeutralReviews()), ra.getDepartmentToNumOfReview(ra.getPositiveReviews()) );\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\tSystem.out.println();\n\n\t\tSystem.out.println(\"Contact us if you need more analysis reports!\"); \n\n\n\t}",
"public static void process(Scanner s) {\n\t\tfor (int k = s.nextInt(); k > 0; k--) {\n\t\t\t//Calling all of the information for a student\n\t\t\tString first = s.next();\n\t\t\tString last = s.next();\n\t\t\tdouble assignment = s.nextDouble() * .4;\n\t\t\tdouble participation = s.nextDouble() * .15;\n\t\t\tdouble midterm = s.nextDouble() * .2;\n\t\t\tdouble examFinal= s.nextDouble() * .25;\n\t\t\t//Adding the scores together to make a final grade\n\t\t\tdouble grade = (assignment + participation + midterm + examFinal);\n\t\t\tString finalgrade = \"F\";\n\t\t\tif (grade >= 94) {\n\t\t\t\tfinalgrade = \"A\";\n\t\t\t} else if (grade >= 90) {\n\t\t\t\tfinalgrade = \"A-\";\n\t\t\t} else if (grade >= 86) {\n\t\t\t\tfinalgrade = \"B+\";\n\t\t\t} else if (grade >= 83) {\n\t\t\t\tfinalgrade = \"B\";\n\t\t\t} else if (grade >= 80) {\n\t\t\t\tfinalgrade = \"B-\";\n\t\t\t} else if (grade >= 76) {\n\t\t\t\tfinalgrade = \"C+\";\n\t\t\t} else if (grade >= 73) {\n\t\t\t\tfinalgrade = \"C\";\n\t\t\t} else if (grade >= 70) {\n\t\t\t\tfinalgrade = \"C-\";\n\t\t\t} else if (grade >= 65) {\n\t\t\t\tfinalgrade = \"D+\";\n\t\t\t} else if (grade >= 60) {\n\t\t\t\tfinalgrade = \"D\";\n\t\t\t}\n\t\t\t//Joining the various data points into the correct format\n\t\t\tSystem.out.println(first.charAt(0) + \". \" + last + \" \" + finalgrade);\n\t\t}\n\t}",
"void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }",
"public static void main( String args[] ) throws Exception\n\t{\n\t\t\tBufferedReader infile = new BufferedReader( new FileReader( \"ExamScores.txt\" ) );\n\n\t\t\t// you declare all needed ArrayLists and other variables from here on.\n\t\t\tArrayList<String> lines = new ArrayList<String>();\n\n\t\t\tSystem.out.println(\"\\nSTEP #1: 50%\"); // 50%\n\t\t\twhile (infile.ready()) {\n\t\t\t\tString line = infile.readLine();\n\t\t\t\tSystem.out.println(line);\n\t\t\t\tlines.add(line);\n\t\t\t}\n\t\t\tinfile.close();\n\n\n\t\t\tSystem.out.println(\"\\nSTEP #2: 25%\"); // 75 %\n\t\t\tCollections.sort(lines);\n\t\t\tfor (String s: lines)\n\t\t\t\tSystem.out.println(s);\n\n\t\t\tSystem.out.println(\"\\nSTEP #3: 10%\"); // 85%\n\n\t\t\tTreeMap<String, ArrayList<Integer>> st2sc = new TreeMap<String, ArrayList<Integer>>();\n\t\t\tTreeMap<Double, String> ave2st = new TreeMap<Double, String>();\n\t\t\tint[] sum = new int[lines.get(0).split(\"\\\\s+\").length-1];\n\t\t\t\n\t\t\tinfile = new BufferedReader ( new FileReader(\"query.txt\") );\n\t\t\tString[] queryS= infile.readLine().split(\" \");\n\t\t\tint[] query = new int[queryS.length];\n\t\t\tfor (int i=0; i<queryS.length; i++)\n\t\t\t\tquery[i]=Integer.parseInt(queryS[i]);\n\t\t\tfor (String s: lines)\n\t\t\t{\t\n\t\t\t\tdouble sumq = 0;\n\t\t\t\tdouble aveq = 0;\n\t\t\t\tString[] tokens = s.split(\"\\\\s+\");\n\t\t\t\tArrayList<Integer> scores = new ArrayList<Integer>();\n\t\t\t\tfor (int t=1; t<tokens.length; t++){\n\t\t\t\t\tscores.add(Integer.parseInt(tokens[t]));\n\t\t\t\t}\n\t\t\t\tst2sc.put(tokens[0], scores);\n\t\t\t\tfor (int q: query)\n\t\t\t\t\tsumq += Integer.parseInt(tokens[q]);\n\t\t\t\tfor (int nth = 0; nth<sum.length; nth++){\n\t\t\t\t\tsum[nth]+= Integer.parseInt(tokens[nth+1]);\n\t\t\t\t}\n\t\t\t\taveq = sumq/3;\n\t\t\t\tave2st.put(aveq, tokens[0]);\n\t\t\t}\n\t\t\tfor (double f: ave2st.keySet())\n\t\t\t\tSystem.out.printf(ave2st.get(f)+\" \"+\"%.2f\\n\", f);\n\n\t\t\tSystem.out.println(\"\\nSTEP #4: 15%\"); // 100%\n\t\t\t\n\t\t\tint lowest = sum[0];\n\t\t\tint which = 0;\n\t\t\tfor (int i=1; i<sum.length; i++)\n\t\t\t{\n\t\t\t\tif (sum[i]<lowest)\n\t\t\t\t{\n\t\t\t\t\tlowest = sum[i];\n\t\t\t\t\twhich = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"exam\"+(which+1)+\" had the lowest average\");\n\n\n\t}",
"public static void main(String[] args) {\n\t\tStudent s1 = new Student(\"Joro\", \"KST\", (byte)25);\n\t\tStudent s2 = new Student(\"Pesho\", \"KST\", (byte)25);\n\t\tStudent s3 = new Student(\"Gesho\", \"KST\", (byte)25);\n\t\tStudent s4 = new Student(\"Misho\", \"KST\", (byte)25);\n\t\tStudent s5 = new Student(\"Tisho\", \"KST\", (byte)25);\n\t\tStudent s6 = new Student(\"Ivo\", \"KST\", (byte)25);\n\t\t\n\t\ts3.setGrade(5);\n\t\ts5.setGrade(5.5);\n\t\ts2.setGrade(6);\n\t\t\n\t\ts1.receiveScholarship(4, 500);\n\t\ts2.receiveScholarship(5, 250.00);\n\t\t\n\t\t\n\t\ts2.upYear();\n\t\ts5.upYear();\n\t\ts6.upYear();\n\t\t\n\t\tStudentGroup sg1 = new StudentGroup(\"KST\") ;\n\t\t\n\t\tsg1.addStudent(s1);\n\t\tsg1.addStudent(s2);\n\t\tsg1.addStudent(s3);\n\t\tsg1.addStudent(s4);\n\t\tsg1.addStudent(s5);\n\t\tsg1.addStudent(s6);\n\n\t\n\t\tSystem.out.println(sg1.printStudentsInGroup());\n\t\t\n\t\t\n\t\tSystem.out.println(\"The best student in group is \"+ sg1.theBestStudent());\n\n\t}",
"public static void main(String[] argv) {\n //main handle loop and program flow\n Scanner read = new Scanner(System.in);\n // default mem -to be added in function.checklistlength()\n Student[] list = new Student[0];\n UndergraduateStudent[] Ulist = new UndergraduateStudent[0];\n PostGraduateStudent[] Plist = new PostGraduateStudent[0];//not used\n double average = 0; // hold average value\n int input = 0;\n\n Student.StudentInfo();\n function.promptinput();\n while (true) {\n try {\n input = read.nextInt();//menu input\n } catch (Exception ex) {// input is not integer\n System.out.println(ex);//display err\n System.out.println(\"wrong input\");\n System.exit(1);//exit program\n } finally {\n if (input == 1) {// quit when 1 is entered\n System.out.println(\"sys exit.\");\n System.exit(0);\n function.addbreakline();// ============================================\n } else if (input == 2) {// add from file to Objects\n list = function.addTolistfromfile(list);// file to Student list\n Ulist = function.addToUlistfromfile(Ulist);// file to UnderGrad list\n list = function.calcMarkAndGrade(list, Ulist);// overall mark + grade\n average = function.aveoverallmark(list);// calc average for all student\n System.out.println(function.getmessage());// input status\n boolean condition =Student.equals(list,Ulist);//check input for any repetition\n System.out.println(\"repititive student status: \"+condition);\n \n function.addbreakline();// ============================================\n } else if (input == 3) {// output\n function.outputList(list, Ulist);\n function.addbreakline();// ============================================\n } else if (input == 4) {\n System.out.println(\"ave mark of all: \" + average);\n function.addbreakline();// ============================================\n } else if (input == 5) {\n // input= read.nextInt();\n function.aboveAveMark(average, list);\n System.out.println(function.getmessage());\n function.addbreakline();// ============================================\n } else if (input == 6) {\n // search by Student ID\n System.out.print(\"enter a student ID: \");\n long searchid = read.nextLong();\n function.searchByID(searchid, list, Ulist);\n System.out.println(function.getmessage());\n function.addbreakline();// ============================================\n } else if (input == 7) {\n // input lower UPPERcase, search check name entered with space \n System.out.print(\"enter a student name: \");\n String searchname = read.nextLine();\n searchname = read.nextLine();\n function.searchbyName(searchname, list, Ulist);\n System.out.println(function.getmessage());\n function.addbreakline();// ============================================\n } else if (input == 8) {\n Student.sortID(list, Ulist);//sort by ID number \n function.addbreakline();// ============================================\n } else if (input == 9) {\n //can only sort by first letter of Surname -- sort whole Surname will be wrong\n int[][] Ascore= new int[list.length][5];\n Ascore=Student.indexValue(list);//scoring name system to sort\n \n //score list before sort -- for checking list value\n /*for (int i = 0; i < list.length; i++) {\n for (int j = 0; j < 5; j++) {\n System.out.print(\" acore \"+i+\" \"+j+\": \"+Ascore[i][j]);\n }\n System.out.println();\n }*/\n for (int index =0;index<1;index++){\n list =function.sortName(list, Ulist, Ascore, index);\n\n /*System.out.println(\"Score list after swap\"+index+\"index:\");// for checking list value\n for (int i = 0; i < list.length; i++) {\n for (int j = 0; j < 5; j++) {\n System.out.print(\" acore \" + i + \" \" + j + \": \" + Ascore[i][j]);\n }\n System.out.println();\n }*/\n }\n function.outputList(list, Ulist);\n function.addbreakline();// ============================================\n } else {\n System.out.println(\"enter only from 1-9\");\n }\n }\n }\n\n }",
"public static void processInput() throws IOException {\r\n\t\t\r\n\t\t//Out statement let user know the input file is being read\t\r\n\t\tScanner scnr;\r\n\t\tString[] splitString;\r\n\t\t\r\n\t\tFile file = new File(\"Project_04_Input01.txt\");\r\n\t\tscnr = new Scanner(file);\r\n\t\t\r\n\t\tSystem.out.println(\"Reading data from \" + file + \"...\");\r\n\t\t\r\n\t\twhile(scnr.hasNextLine()) {\r\n\t\t\tString line = scnr.nextLine();\r\n\t\t\tsplitString = line.split(\",\");\r\n\r\n\t\t\tif (splitString[0].contains(\"STUDENT\")) {\r\n\t\t\t\t\r\n\t\t\t\t// Call processStudentData\r\n\t\t\t\tprocessStudentData(splitString);\r\n\t\t\t\tSystem.out.println(\"'STUDENT' has been found in the file.\");\r\n\r\n\t\t\t} // End if\r\n\t\t\t\r\n\t\t\telse if (splitString[0].contains(\"GRADEITEM\") ) {\r\n\t\t\t\t\r\n\t\t\t\t// Call processGradeItemData\r\n\t\t\t\tprocessGradeItemData(splitString);\r\n\t\t\t\tSystem.out.println(\"'GRADEITEM' has been found in the file.\");\r\n\t\t\t\t\r\n\t\t\t} // End if\r\n\t\t} // End while\r\n\t\t\r\n\t\t// Close the file\r\n\t\tscnr.close();\r\n\t\t\t\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tFileReader myReader=new FileReader();\r\n\t\ttry {\r\n\t\t\tmyReader.readFile(\"D:/test.txt\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\r\n\t\t//This is for writing to the file\r\n\t\t\t\tPrintWriter writer;\r\n\t\t\t\t\r\n\t\t\t\t//Open File 'output.txt'\r\n\t\t\t\ttry {\r\n\t\t\t\t\twriter = new PrintWriter(\"output.txt\", \"UTF-8\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\r\n\r\n//\t\t\t\tswitch (methodEmployed){\r\n//\t\t\t\t\tcase 1: //BiSection\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tBisectionMethod(e,l,u,cE);\r\n//\t\t\t\t\t\r\n//\t\t\t\t\twriter.println(\"Report of BisectionSearch\");\r\n//\t\t\t\t\twriter.println(\"--------------------------------------\");\r\n//\t\t\t\t\twriter.println(\"App. Optimum Soln.=\" + String.valueOf(BisectionMethod.getXMean()));\r\n//\t\t\t\t\twriter.println(\"Abs. Range for Opt. Soln.=[\" + String.valueOf(BisectionMethod.getXLower())+\"-\"+String.valueOf(BisectionMethod.getXUpper())+\"]\");\r\n//\t\t\t\t\twriter.println(\"Z=\" + String.valueOf(BisectionMethod.getFunctionValue());\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 2: //GoldenSection\r\n//\t\t\t\t\tGoldenSectionMethod(e,l,u,cE);\r\n//\t\t\t\t\t\r\n//\t\t\t\t\twriter.println(\"Report of GoldenSectionSearch\");\r\n//\t\t\t\t\twriter.println(\"--------------------------------------\");\r\n//\t\t\t\t\twriter.println(\"App. Optimum Soln.=\" + String.valueOf(GoldenSectionMethod.getXMean()));\r\n//\t\t\t\t\twriter.println(\"Abs. Range for Opt. Soln.=[\" + String.valueOf(GoldenSectionMethod.getXLower())+\"-\"+String.valueOf(GoldenSectionMethod.getXUpper())+\"]\");\r\n//\t\t\t\t\twriter.println(\"Z=\" + String.valueOf(GoldenSectionMethod.getFunctionValue());\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 3: // NewtonMethod\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 4: // SecantMethod\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\twriter.close();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\t\tSystem.out.println(\"RESULTS ARE WRITTEN TO 'output.txt' \");\r\n\r\n\t\r\n\t}",
"public static void main(String args[]) throws IOException\n\t{\n\t\t//String scores_path = \"/home/sahdev/Desktop/Fall2015/Data Mining/PROJECT/scores.txt\";\n\t\tBufferedReader br = new BufferedReader(new FileReader(scores_path));\n\t\t\n\t\tString temp=\"\";\n\t\t\n\t\tdouble score;\n\t\tint day, yr;\n\t\tString month;\n\t\tArrayList<Dates> dates = new ArrayList<Dates>();\n\t\t\n\t\twhile((temp=br.readLine()) != null)\n\t\t{\n\t\t\tStringTokenizer tkn = new StringTokenizer(temp,\" \");\n\t\t\t\n\t\t\tscore = Double.parseDouble(tkn.nextToken());\n\t\t\tday = Integer.parseInt(tkn.nextToken());\n\t\t\tmonth = tkn.nextToken();\n\t\t\tyr = Integer.parseInt(tkn.nextToken());\n\t\t\ttkn.nextToken();\n\t\t\t\n\t\t\tdates.add(new Dates(day,month,yr,score));\n\t\t\t\n\t\t}\t\t\n\t\tint days = 31;\n\t\tdouble scores[] = new double[days];\n\t\tint scores_cnt[] = new int[days];\n\t\tfor(int i =0 ; i<scores.length ; i++)\n\t\t{\n\t\t\tscores[i] = 0.0d;\n\t\t\tscores_cnt[i] = 0;\n\t\t}\n\t\t\n\t\tfor(int i=0 ; i<days ; i++)\n\t\t{\n\t\t\tfor(int j=0 ; j<dates.size() ; j++)\n\t\t\t{\n\t\t\t\tif(dates.get(j).day == (i+1) && dates.get(j).month.equalsIgnoreCase(\"Jul\") && dates.get(j).year == 2013)\n\t\t\t\t{\n\t\t\t\t\tscores[i] = scores[i] + dates.get(j).score;\n\t\t\t\t\tscores_cnt[i]++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// now we divide the scores sum by the number of documents on that specific day!\n\t\t\tscores[i] = scores[i] / scores_cnt[i];\n\t\t}\n\t\tbr.close();\n\t\tint sum = 0;\n\t\tfor(int i=0 ; i<scores_cnt.length ; i++)\n\t\t{\n\t\t\tSystem.out.println(\"day \"+(i+1)+\" \"+scores_cnt[i]);\n\t\t}\n\t\tSystem.out.println(sum);;\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(violence_trend_path));\n\t\tfor(int i=0 ; i<scores.length ; i++)\n\t\t{\n\t\t\tbw.write(\"day \"+(i+1)+\" \" +scores[i]+\" \\t \"+ scores_cnt[i]);\n\t\t\tbw.newLine();\n\t\t}\n\t\tbw.close();\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\t//call init()\r\n\t\tinit();\r\n\t\t\r\n\t\r\n\t\r\n\t\t\r\n\t\t//loop until no more records\r\n\t\twhile(!eof) {\r\n\t\t\t\r\n\t\t\t//call validation\r\n\t\t\t//validation();\r\n\t\t\t\r\n\t\t\r\n\t\t\t//Majors();\r\n\t\t\t\ttry {cMajors = Integer.parseInt(iMajors);\r\n\t\t\t\t}\r\n\t\t\tcatch(Exception e) { System.out.println(\"Majors input\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\tif (hMajor!= cMajors) {\r\n\t\t\t\t\tSubtotal();\r\n\t\t\t\t\tnDonation = 0;\r\n\t\t\t\t}\t\r\n\t\t\t\t//call output\r\n\t\t\t\toutput();\r\n\t\t\t\tcalcs();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\tinput();\r\n\t\t\t//call calcs()\r\n\t\t}\r\n\t\tMajorCount[0] = 3;\r\n\t\tSubtotal();\r\n\t\tGrandtotals();\r\n\t\r\n\t\r\n\t\t\r\n\t\t//close the print writer\r\n\t\tpw.close();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Program ending, have a good DAY!\");\r\n\t}",
"public static void main(String[] args) throws java.io.IOException {\n\t\t\n\t\tchar inChar = ' ';\n\t\t\n\t\t// Student data\n\t\tString accounts[][] = { {\"Rachel\", \"500.1\", \"451.45\", \"2\"}, \n\t\t\t\t {\"Ross\", \"293.23\", \"120.45\", \"7\"}, \n\t\t\t\t {\"Monica\", \"423.3\", \"400.3\", \"4\"}, \n\t\t\t\t {\"Chandler\", \"628.4\", \"282.67\", \"3\"},\n\t\t\t\t {\"Phoebe\", \"345.25\", \"84.4\", \"1\"},\n\t\t\t\t {\"Joey\", \"123.4\", \"345.3\", \"8\"},\n\t\t\t\t {\"Robin\", \"523.6\", \"500.45\", \"3\"}, \n\t\t\t\t {\"Lily\", \"264.43\", \"323.45\", \"6\"}, \n\t\t\t\t {\"Marshall\", \"523.3\", \"290.3\", \"7\"}, \n\t\t\t\t {\"Ted\", \"328.4\", \"584.6\", \"3\"},\n\t\t\t\t {\"Barney\", \"545.35\", \"233.4\", \"5\"},\n\t\t\t\t {\"Spongebob\",\"673.4\", \"666.3\", \"9\"}\n\t\t\t\t };\n\t\t\n\t\t// Read student data\n\t\tArrayList<Student> stuList = new ArrayList<>();\n\t\t\n\t\tfor(int i = 0; i < accounts.length; i++) {\n\t\t\tStudent stu = new Student(accounts[i][0], Double.valueOf(accounts[i][1]), Double.valueOf(accounts[i][2]), Integer.valueOf(accounts[i][3]));\n\t\t\tstuList.add(stu);\n\t\t}\n\t\t\n//\t\t// test-Print\n// \t\tSystem.out.println(\"****Print Student Info****\");\n// \t\t \n// \t\t for(Student stu : stuList) {\n//\t\t\tstu.show();\n//\t\t }\n\t\t \n\t\t// Construct an ArrayList to read commands\n\t\tArrayList<Character> comList = new ArrayList<>();\t\t\n\t\t\n\t\tdo {\n\t\t\t System.out.println(\"*****Enter choice 'c' to get the number of students in each grade level, then press <enter>*****\");\n\t\t\t System.out.println(\"*****Enter choice 'p' to get the 2D-map of the stops, then press <enter>*****\");\n\t\t\t System.out.println(\"*****Enter choice 'h' to get the last three commands(when commands are more than three), then press <enter>*****\");\n\t\t\t System.out.println(\"*****Enter choice 'q' to quit, then press <enter>*****\");\n\t\t\t\t\t \t \n\t\t\t inChar = (char) System.in.read();\n\t\t\t \t\t\t \n\t\t\t // Read '\\r' and '\\n' and do nothing\n\t\t\t System.in.read();\n\t\t\t System.in.read();\t\t\t \n\t\t\t \n\t\t \t // Read commands\n\t\t\t comList.add(inChar);\n\t \n\t\t \t // React to input and take appropriate action\n\t \t\t switch (inChar) {\n\t \t\t \n\t\t \t // Calculate how many students are in each grade level and list the results\n\t \t\t case 'c':\n\t\t \t\t System.out.println(\"*****Calculate Student Info****\");\n\t\t \t\t \n\t\t \t\t int count_elementery = 0;\n\t\t \t\t int count_middle = 0;\n\t\t \t\t \n\t\t \t\t for(Student stu : stuList) {\n\t\t \t\t\t\tif ( stu.getGrade() >= 1 && stu.getGrade() <= 6)\n\t\t \t\t\t\t\tcount_elementery++;\n\t\t \n\t\t \t\t\t\telse if (stu.getGrade() >= 7 && stu.getGrade() <= 9)\n\t\t \t\t\t\t\tcount_middle++;\n\t\t \t\t\t\t\t\n\t\t \t\t\t }\n\t\t \t\t \n\t\t \t\t System.out.println(\"Number of students in Elementery Grade Level(1-6): \" + count_elementery);\n\t\t \t\t System.out.println(\"Number of students in Middle Grade Level(7-9): \" + count_middle);\n\t\t \t\t \n\t\t \t\t break;\n\t\t \t\t \t\t \n\t\t // Print a region map (2D) that shows where a bus would need to stop for student pick-up/drop-off. \n // Allow custom map displays by grade level (i.e. Elementary (1-6), Middle (7-8), or All).\n\t\t \t case 'p':\n\t\t \t\t System.out.println(\"****Print 2D Region Map****\");\n\t\t \t\t\t\n\t\t \t\t //Generate 2D-Map\n\t\t \t SwingUtilities.invokeLater(() -> {\n\t\t \t \t\n//\t\t \t \tScatterPlot obj = new ScatterPlot(stuList); \n//\t\t \t \tobj.myplot();\n\t\t \t\t ScatterPlot2 obj = new ScatterPlot2(stuList); \n\t\t \t\t obj.main();\n\t\t \t obj.setSize(800, 400);\n\t\t \t obj.setLocationRelativeTo(null);\n//\t\t \t obj.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\t \t });\n\t \t\t\t \n\t\t \t\t break;\t\t \t \n\t\t \t\t \n\t\t \t // Print a history of the last three commands\n\t\t case 'h':\n\t\t \t\t System.out.println(\"****Print Command History*****\");\t\t\t \t \n\t\t\t \t System.out.println(\"Last Three Command History:\"+ comList.get(comList.size()-2) + \",\" + comList.get(comList.size()-3) + \",\" + comList.get(comList.size()-4));\n\t\t\t \t \n\t\t \t\t break;\n\t\t \t\t \t\t \n\t }\n\t\t} \n\t\t \n\t\t // Exit on quit\n\t\t while (inChar != 'q');\t\t\n\t\t System.out.println(\"Quiting...\");\n\t\t \t\t \n\t }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\t// Prompt user to enter the number of students\n\t\tSystem.out.print(\"Enter the number of students: \");\n\t\tint numberOfStudents = input.nextInt();\n\n\t\tdouble score, \t\t\t\t// Holds student's score\t\t\n\t\t\thighest = 0, \t\t\t// Highest score \n\t\t\tsecondHighest = 0;\t\t// Second highest score\n\t\tString name = \"\", \t\t\t// Holds student's name\n\t\t\tstudent1 = \"\", \t\t\t// Highest scoring student name\n\t\t\tstudent2 = \"\";\t\t\t// Second highest scoring student name\n\t\t\n\t\t// Prompt user to enter name and score of each student\n\t\tfor (int i = 0; i < numberOfStudents; i++) {\n\t\t\tSystem.out.print(\n\t\t\t\t\"Enter a student name: \");\n\t\t\tname = input.next();\n\t\t\tSystem.out.print(\"Enter a student score: \");\n\t\t\tscore = input.nextInt();\n\n\t\t\tif (i == 0) {\n\t\t\t\t// Make the first student the highest scoring student so far\n\t\t\t\thighest = score;\n\t\t\t\tstudent1 = name;\n\t\t\t}\n\t\t\telse if (i == 1 && score > highest) {\n\t\t\t\t/* Second student entered scored \n\t\t\t\t * higher than first student */\n\t\t\t\tsecondHighest = highest;\n\t\t\t\thighest = score;\n\t\t\t\tstudent2 = student1;\n\t\t\t\tstudent1 = name;\n\t\t\t}\n\t\t\telse if (i == 1) {\n\t\t\t\t/* Second student entered scored\n\t\t\t\t * lower than first student */\n\t\t\t\tsecondHighest = score;\n\t\t\t\tstudent2 = name;\n\t\t\t}\t\t\n\t\t\telse if (i > 1 && score > highest && score > secondHighest) {\n\t\t\t\t// Last student entered has the highest score \n\t\t\t\tsecondHighest = highest;\n\t\t\t\tstudent2 = student1;\n\t\t\t\thighest = score;\n\t\t\t\tstudent1 = name;\n\t\t\t}\n\t\t\telse if (i > 1 && score > secondHighest) {\n\t\t\t\t// Last student entered has the second highest score \n\t\t\t\tstudent2 = name;\n\t\t\t\tsecondHighest = score;\n\t\t\t}\n\t\t}\n\n\t\t/* Display the student with the highest score \n\t\t * and the student with the second highest score. */\n\t\tSystem.out.println(\n\t\t\t\"Top two students: \\n\" +\n\t\t\tstudent1 + \"'s score is \" + highest + \"\\n\" + \n\t\t\tstudent2 + \"'s score is \" + secondHighest);\n\t\n\t\tinput.close();\n\t}",
"public static void main(String[] args) {\n\t\tStudent ivan = new Student(\"Ivan Petrov\", \"Computer Science\");\n\t\tivan.grade=5.5;\n\t\tivan.yearInCollege=2;\n\t\tivan.money=500;\n\t\tivan.age=19;\n\t\t\n\t\tStudent teodor = new Student(\"Teodor Alexiev\", \"Computer Science\");\n\t\tteodor.grade=5.25;\n\t\tteodor.yearInCollege=3;\n\t\tteodor.money=300;\n\t\tteodor.age=20;\n\t\t\n\t\tStudent irina = new Student(\"Irina Paraskelova\", \"Computer Science\");\n\t\tirina.grade = 5.65;\n\t\tirina.money=400;\n\t\tirina.age=18;\n\t\t\n\t\tStudent vasilena = new Student (\"Vasilena Kremenlieva\", \"Computer Science\");\n\t\tvasilena.grade = 5.0;\n\t\tvasilena.money=1000;\n\t\tvasilena.age=18;\n\t\t\n\t\tStudent trifon = new Student(\"Trifon Stoimenov\", \"Computer Science\");\n\t\ttrifon.grade = 5.70;\n\t\ttrifon.yearInCollege=3;\n\t\ttrifon.money = 800;\n\t\ttrifon.age=21;\n\t\t\n\t\tStudent alexander = new Student (\"Alexander Dobrikov\", \"Finance\");\n\t\talexander.grade = 4.75;\n\t\talexander.yearInCollege = 2;\n\t\talexander.money = 600;\n\t\talexander.age = 20;\n\t\t\n\t\tStudent mirela = new Student (\"Mirela Kostadinova\", \"Finance\");\n\t\tmirela.grade = 5.5;\n\t\tmirela.yearInCollege=1;\n\t\tmirela.money=100;\n\t\tmirela.age=19;\n\t\t\n\t\tStudent velizar = new Student(\"Velizar Stoyanov\", \"Finance\");\n\t\tvelizar.grade = 6.0;\n\t\tvelizar.yearInCollege = 3;\n\t\tvelizar.money = 500;\n\t\tvelizar.age = 22;\n\t\t\n\t\tStudent antoaneta = new Student(\"Antoaneta Borisova\", \"Finance\");\n\t\tantoaneta.grade = 5.30;\n\t\tantoaneta.yearInCollege = 2;\n\t\tantoaneta.money = 750;\n\t\tantoaneta.age = 19;\n\t\t\n\t\tirina.upYear();\n\t\tSystem.out.println(\"Irina is in year \"+irina.yearInCollege+\" of college.\");\n\t\t\n\t\tvasilena.receiveScholarship(5.0, 350);\n\t\tSystem.out.println(vasilena.money);\n\t\t\n\t\tStudentGroup cs1 = new StudentGroup(\"Computer Science\");\n\t\tcs1.addStudent(ivan);\n\t\tcs1.addStudent(teodor);\n\t\tcs1.addStudent(irina);\n\t\tcs1.addStudent(vasilena);\n\t\tcs1.addStudent(trifon);\n\t\tteodor.upYear();\n\t\tSystem.out.println(teodor.isDegree);\n\t\t\n\t\tcs1.addStudent(velizar);\n\t\t\n\t\tcs1.printStudentsInGroup();\n\t\tSystem.out.println(cs1.theBestStudent());\n\t\t\n\t\tcs1.emptyGroup();\n\t\tcs1.printStudentsInGroup();\n\t\t\n\t\tStudentGroup fin1 = new StudentGroup(\"Finance\");\n\t\t\n\t\tfin1.addStudent(alexander);\n\t\tfin1.addStudent(mirela);\n\t\tfin1.addStudent(velizar);\n\t\tfin1.addStudent(antoaneta);\n\t\t\n\t\tfin1.printStudentsInGroup();\n\t\t\t\n\t\t\n\t}",
"public void fillFromFile()\n\t{\n\t\tJFileChooser fc = new JFileChooser();\t//creates a new fileChooser object\n\t\tint status = fc.showOpenDialog(null);\t//creates a var to catch the dialog output\n\t\tif(status == JFileChooser.APPROVE_OPTION)\t\n\t\t{\n\t\t\tFile selectedFile = fc.getSelectedFile ( );\n\t\t\tthis.fileName = selectedFile;\n\t\t\tScanner file = null; //scans the file looking for information to load\n\n\t\t\tif(selectedFile.exists())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfile = new Scanner(fileName); //scans the input file\n\t\t\t\t}\n\t\t\t\tcatch(Exception IOException)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showConfirmDialog (null, \"Unable to import data from the list\");\n\t\t\t\t\tSystem.exit (-1);\n\t\t\t\t}//if there was an error it will pop up this message\n\t\t\t\t\n\t\t\t\tString str = file.nextLine ( ); //names the line\n\t\t\t\tString [] header = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\tsetCourseNumber(header[1]);\n\t\t\t\tsetCourseName(header[0]);\n\t\t\t\tsetInstructor(header[2]);\n\t\t\t\t\n\t\t\t\twhile(file.hasNextLine ( ))\n\t\t\t\t{\n\t\t\t\t\tstr = file.nextLine ( ); //names the line\n\t\t\t\t\tString [] tokens = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\t\tStudent p = new Student();\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tp.setStrNameLast (String.valueOf (tokens[0]));\n\t\t\t\t\t\tp.setStrNameFirst (String.valueOf (tokens[1]));\n\t\t\t\t\t\tp.setStrMajor (String.valueOf (tokens[2]));\n\t\t\t\t\t\tp.setClassification (tokens[3]);\n\t\t\t\t\t\tp.setiHoursCompleted (new Integer (tokens[4]).intValue ( ));\n\t\t\t\t\t\tp.setfGPA (new Float (tokens[5]).floatValue ( ));\n\t\t\t\t\t\tp.setStrStudentPhoto (String.valueOf (tokens[6]));\n\t\t\t\t\t//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tclassRoll.add (p);\n\t\t\t\t\t\t}//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tcatch(Exception IOException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIOException.printStackTrace ( );\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + str + \"'\" + IOException.getMessage());\n\t\t\t\t\t\t}//pops up a message if there were any errors reading from the file\n\t\t\t\t}//continues through the file until there are no more lines to scan\n\t\t\tfile.close ( ); //closes the file\n\n\t\t\t\tif(selectedFile.exists ( )==false)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception IOException)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + selectedFile + \"' \" + IOException.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}//if the user picks a file that does not exist this error message will be caught.\n\t\t\t}\n\t\t}//if the input is good it will load the information from the selected file to and Array List\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.exit (0);\n\t\t\t}\n\t\tthis.saveNeed = true;\n\n\t\t}",
"public static void main(String[] args) {\r\n\t\t//Use Scanner to get input from console\r\n\t\tScanner sc = new Scanner (System.in);\r\n\t\tint noOfStudents = sc.nextInt();\r\n\t\tMap<Integer, Integer> stdMarksMap = new HashMap<Integer, Integer>();\r\n\t\tfor (int i = 0; i < noOfStudents; i++) {\r\n\t\t\tstdMarksMap.put(sc.nextInt(), sc.nextInt());\r\n\t\t}\r\n\t\tMap<Integer, String> resMap = calculateGrade(stdMarksMap);\r\n\t\tfor (Integer key : resMap.keySet()) {\r\n\t\t\tSystem.out.println(key+\" \"+resMap.get(key));\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private void start()\n\tthrows FileNotFoundException\n\t{\n\t\t// Open the data file for reading\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(\"distance.in\")));\n\n\t\t// Read in the number of datasets.\n\t\ttry {\n \t\tline = in.readLine();\n\t\t\ttokenBuffer = new StringTokenizer(line);\n\t\t\tnumDatasets = Integer.parseInt(tokenBuffer.nextToken());\n\n \t} catch(IOException ioError) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\"Error occurred while reading in the first line of input.\");\n \t\tioError.printStackTrace();\n\t\t\t\tSystem.exit(1);\n \t}\n\n\t\t// While we have data to process...\n\t\tfor(int index = 0; index < numDatasets; index++) { \n\t\t\t// Grab a line of input \t\t\n\t\t\ttry {\n \t\tline = in.readLine();\n\n } catch(IOException ioError) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Error occurred while reading in the next line of input.\");\n \t\t\tioError.printStackTrace();\n\t\t\t\t\tSystem.exit(1);\n \t\t}\n\n\t\t\t// Popluate the unsorted list using this line of data\n\t\t\tbuildUnsortedList(line);\n\n\t\t\t// Sort the list using recursion\n\t\t\twhile(!sortList());\n\n\t\t\t// Print the mean variable between the sorted and unsorted list\n\t\t\tSystem.out.println(calcDistance());\n\t\t}\n\t}",
"public void run()throws IOException\n {\n /*\n * Data is read from the file using the Scanner class\n * As data is read, the average of the grades is calculated\n * \n */\n\n // Declare the arrays and variables\n\n int count; // count of students\n double sum; // sum of the grades\n double ave; \n String [] IDs = new String [20];\n Double [] grades = new Double [20];\n\n Scanner inputFile = new Scanner (new File (\"marks.txt\"));\n // reading the data from the file and calculating the average\n int i = 0; \n count = 0;\n sum = 0;\n while(inputFile.hasNext()) {\n IDs [i] = inputFile.next();\n grades [i] = inputFile.nextDouble();\n\n \n i++;\n\n }\n\n while (count < i) {\n sum+= grades[count];\n count++;\n }\n ave = sum / count;\n int i2 = 0;\n while (i2 < i) {\n System.out.println (IDs[i2] + \"\\t\" + grades[i2]);\n if (grades[i2] < ave) {\n System.out.println(\"Below average\");\n }else{\n if (grades[i2] == ave) {\n System.out.println(\"average\");\n } else {\n System.out.println(\"Above average\");\n }\n }\n i2++;\n }\n System.out.println (\"The average grade of \" + count + \" students is \" + ave);\n inputFile.close(); // closes the file\n\n \n }",
"static public void main(String[] args) throws IOException{\n\t\tString sample = \"h19x24\";\n\t\tString parentFolder = \"/media/kyowon/Data1/Dropbox/fCLIP/new24/\";\t\t\n\t\tString bedFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.bed\";\n\t\tString dbFasta = \"/media/kyowon/Data1/RPF_Project/genomes/hg19.fa\";\n\t\tString parameterFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.param\";\n\t\t\n\t\tString trainOutFileName = parentFolder + sample + \".train.csv\";\n\t\tString arffTrainOutFileName = parentFolder + sample + \".train.arff\";\n\t\t\n\t\tString cisOutFileName = parentFolder + sample + \".csv\";\n\t\tString transOutFileNameM = parentFolder + sample + \".pair.M.csv\";\n\t\tString transOutFileNameU = parentFolder + sample + \".pair.U.csv\";\n\t\tString transControlOutFileNameM = parentFolder + sample + \".pair.M.AntiSense.csv\";\n\t\tString transControlOutFileNameU = parentFolder + sample + \".pair.U.AntiSense.csv\";\n\t\tString rmskBed = \"/media/kyowon/Data1/fCLIP/Data/cat.rmsk.bed\";\n\t\tString siControlBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siControl_R1_Aligned_Sorted.bed\";\n\t\tString siKDDroshaBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDrosha_R1_Aligned_Sorted.bed\";\n\t\tString siKDDicerBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDicer_R1_Aligned_Sorted.bed\";\n\t\t\n\t\tString cisBed5pFileName = cisOutFileName + \".5p.bed\";\n\t\tString cisBed3pFileName = cisOutFileName + \".3p.bed\";\n\t\t\n\t\tdouble unpairedScoreThreshold = 0.25; \n\t\tdouble pairedScoreThreshold = unpairedScoreThreshold/5;\n\t//\tdouble motifScoreThreshold = 0.15;\n\t\t\n\t\tint num3pPaired = 10;\n\t\tint num5pPaired = 20;\n\t\t\n\t\tString filteredTransOutFileName = transOutFileNameM + \".filtered.csv\";\n\t\t\n\t\tint blatHitThreshold = 100000000;\n\t\tint transPairSeqLength = FCLIP_Scorer.getFlankingNTNumber() *2 + 80;\n\t\t\n\t\tZeroBasedFastaParser fastaParser = new ZeroBasedFastaParser(dbFasta);\n\t\tMirGff3FileParser mirParser = new MirGff3FileParser(\"/media/kyowon/Data1/fCLIP/genomes/hsa_hg19.gff3\");\n\t\tAnnotationFileParser annotationParser = new AnnotationFileParser(\"/media/kyowon/Data1/fCLIP/genomes/hg19.refFlat.txt\");\n\t\tFCLIP_ScorerTrainer.train(parameterFileName, bedFileName, mirParser, annotationParser);\n\t\t\n\t\ttrain(trainOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\t\trunCis(cisOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\n\t\tScoredPositionOutputParser.generateBedFromCsv(cisOutFileName, cisBed5pFileName, cisBed3pFileName, false); // for fold change..\n\t//\tScoredPositionOutputParser.generateFastaForMotif(cisOutFileName, cisOutFileName + \".5p.motif.fa\", cisOutFileName + \".3p.motif.fa\",cisOutFileName + \".motif.m\", \"M\");\n\t\t\n\t\trunTrans(transOutFileNameM, transOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, false);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transOutFileNameM, transOutFileNameM + \".5p.motif.fa\", transOutFileNameM + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(transOutFileNameM + \".rmsk.csv\", transOutFileNameM + \".link.txt\");\n\t//\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t///\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\trunTrans(transControlOutFileNameM, transControlOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, true);\t\t\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transControlOutFileNameM, transControlOutFileNameM + \".5p.motif.fa\", transControlOutFileNameM + \".3p.motif.fa\");\n\t//\tGenerateCircosLinkFiles.run(transControlOutFileNameM + \".rmsk.csv\", transControlOutFileNameM + \".link.txt\");\n\t\t//CheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\tfilterTransPairs(transOutFileNameM, filteredTransOutFileName, num3pPaired, num5pPaired);\n\t\tCheckRepeat.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(filteredTransOutFileName, filteredTransOutFileName + \".5p.motif.fa\", filteredTransOutFileName + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(filteredTransOutFileName + \".rmsk.csv\", filteredTransOutFileName + \".link.txt\");\n\t///\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\t\n\t\t// generate background for drosha and dicer..\n\t\t\n\t\t\n\t\t// motif different conditioin?? \n\t\t\n\t\t\t\t\n\t\t//GenerateDepthsForEncodeDataSets.generate(outFileName, outFileName + \".encode.csv\", annotationParser);\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\n//declare and instance of the scanner object\nScanner myScanner;\n\n//Tell scanner you're creating an instance that\n// will take input from STDIN\nmyScanner=new Scanner( System.in );\n\n//Prompt user for 6 digit number giving the course semester\n System.out.print(\n \"Enter a 6 digit number giving the course semester- \");\n//Accept user input\nint nSix=myScanner.nextInt();\n\nint year= (nSix/100);\nint course= nSix % 100;\n\n if (year > 2014 || year <1865) {\n System.out.println(\n \"The number was outside the range [186510,201440]\");\n return;\n \n }\n \n\n if (course == 10) {\n System.out.println(\n \"The course was offered in the Spring semester of \"+year+\"\");\n }\n\n else if (course == 20) {\n System.out.println(\n \"The course was offered in the Summer 1 semester of \"+year+\"\");\n }\n\n else if (course == 30) {\n System.out.println(\n \"The course was offered in the Summer 2 semester of \"+year+\"\");\n }\n\n else if (course == 40) {\n System.out.println(\n \"The course was offered in the Fall semester of \"+year+\"\");\n }\n else{\n System.out.println(+course+\" is not a legitimate semester\");\n }\n\n\n }",
"public void initLadiesDay() {\n\t // your code here\n\t\t\n\t\tFileReader classesReader = null;\n\t\ttry\t{\n\t\t\ttry {\n\t\t\tclassesReader = new FileReader(classesInFile);\n\t\t\tScanner classesScanner = new Scanner(classesReader);\n\t\t\tfitnessProg = new FitnessProgram();\n\t\t\t\n\t\t\twhile (classesScanner.hasNextLine() ) {\n\t\t\t\tString classLine = classesScanner.nextLine();\n\t\t\t\tfc = new FitnessClass(classLine);\n\t\t\t\tfitnessProg.addFitnessClass(fc);\n\t\t\t}\n\t\t\t\n\t\t\tupdateDisplay(fitnessProg);\n\t\t\t\n\t\t\t}\n\t\t\tfinally {\n\n\t\t\t\tif (classesReader != null) {\n\t\t\t\t\tclassesReader.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tcatch (IOException ioe) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"File not found\",\n\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t\t}\n\t\t\tcatch (InputMismatchException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid file content\",\n\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}\t\n\t}",
"public void makeRecommendations()\r\n\t{\r\n\r\n\t\tSystem.out.print(\"Do you want the recommendations based on ratings or scores?\\n\" + \"1. Ratings\\n\" + \"2. Scores\\n\" + \"Please choose 1 or 2:\");\r\n\t\tint choose = scan.nextInt();\r\n\r\n\t\twhile (!(choose >= 1 && choose <= 2))\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Please provide a valid input:\");\r\n\t\t\tchoose = scan.nextInt();\r\n\r\n\t\t}\r\n\t\tif (choose == 1)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Please provide a rating:\");\r\n\t\t\tString rate = scan.next();\r\n\r\n\t\t\tMovie[] temp = new Movie[actualSize];\r\n\t\t\tint tempCount = 0;\r\n\r\n\t\t\tfor (int i = 0; i < actualSize; i++)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (data[i].getRating().equals(rate.toUpperCase()))\r\n\t\t\t\t{\r\n\t\t\t\t\ttemp[tempCount] = data[i];\r\n\t\t\t\t\ttempCount++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (tempCount > 0)\r\n\t\t\t{\r\n\t\t\t\tsort(temp, 5);\r\n\t\t\t\tint counter = 0;\r\n\r\n\t\t\t\tPrintWriter p = null;\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tp = new PrintWriter(new FileWriter(\"top_5_movies.txt\"));\r\n\r\n\t\t\t\t\twhile (counter < 5)\r\n\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\tp.println(temp[counter]);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tcatch (IOException e)\r\n\t\t\t\t{\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tSystem.out.println(\"File not found\");\r\n\t\t\t\t}\r\n\t\t\t\tp.close();\r\n\t\t\t\tSystem.out.println(\"Recommendations made successfully! Top 5 movies found!\");\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\r\n\t\t\t\tSystem.out.println(\"The rating does not match any of the movies.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (choose == 2)\r\n\t\t{\r\n\r\n\t\t\tint counter = 0;\r\n\t\t\tsort(data, 20);\r\n\t\t\tPrintWriter p = null;\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tp = new PrintWriter(new FileWriter(\"top_20_movies.txt\"));\r\n\r\n\t\t\t\twhile (counter < 20)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tp.println(data[counter]);\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tSystem.out.println(\"File not found\");\r\n\r\n\t\t\t}\r\n\t\t\tp.close();\r\n\t\t\tSystem.out.println(\"Recommendations made successfully! Top 20 movies found!\");\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"MajorAssignment.java - starting main method\\n\");\n\n\t\t// Create a scanner to accept input from the user\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Create a DBConnect object and open a connection\n\t\tDBConnect dbc2 = new DBConnect();\n//\t\tinput your details\n\t\tdbc2.setUpForKnuthMySQL(\"s2992196\", \"iestadom\", \"s2992196\", \"s2992196\", \"iestadom\");\n\t\t// open the connection\n\t\tdbc2.openConnection();\n// creating a do loop that will loop the option once\n\t\tdo {\n\t\t\t// Menu of the application\n//\t\t\tamend the menu with the new options\n\t\t\tSystem.out.println(\"\\n===========================================================\");\n\t\t\tSystem.out.println(\"USER MENU\");\n\t\t\tSystem.out.println(\"Please select an option by typing the corresponding number.\");\n\t\t\tSystem.out.println(\"0. Exit\");\t\t\t\t\n\t\t\tSystem.out.println(\"1. Display the count of the employees\");\n\t\t\tSystem.out.println(\"2. Display records of all employees\");\n\t\t\tSystem.out.println(\"3. Search for an employee by last name\");\n\t\t\tSystem.out.println(\"4. Add a new employee\");\n\t\t\tSystem.out.println(\"5. Show the salary of an employee by entering their number.\");\t\t\t\t\n\t\t\tSystem.out.println(\"6. Show all the employee's department number\");\n\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\tSystem.out.print(\"option> \");\n\n\t\t\t// store the selected option number\n\t\t\tint option = sc.nextInt();\n\n\t\t\t// 0. exit the program\n\t\t\t\n\t\t\tif (option == 0) {\n\t\t\t\tSystem.out.println(\"Exiting the program\");\n\t\t\t\tbreak; //exit the while loop\n//\t\t\t\twhen we exit the loop the program stops\n\t\t\t}\n\n\t\t\t// 1. displaying all employees\n\t\t\telse if (option == 1) {\n\t\t\t\tint result = MajorAssignment.getEmployeeCount(dbc2.getConnection());\n\t\t\t\tSystem.out.println(result);\n//\t\t\t\tthis was done already in the class\n\t\t\t\t// Output the result of the getEmployeeCount method which is implemented after the main method\n//\t\t\t\tWe have written the method, like all the other get methods written in the options, at the bottom of the document\n\t\t\t}\n\n\t\t\t// 2. displaying all employees \n\t\t\telse if (option == 2) {\n//\t\t\t\twe are writing the second option which will show all the employees in the oop_employees table\n//\t\t\t\twe are using the get all employee details method that we have written at the end of the document\n\t\t\t\tEmployee [] result = MajorAssignment.getAllEmployeesDetails(dbc2.getConnection());\n\t\t\t\tfor (Employee e:result) {\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 3. search for an employee by name\n//\t\t\tWe are writing the third option which outputs all the details from an employee when we enter their last name.\n\t\t\telse if (option == 3) {\n\n\t\t\t\t// Use the getEmployeebyLastName method\t\t\t\n//\t\t\t\tAsk for the user input\n\t\t\t\tSystem.out.println(\"Please enter the last name of the employee you are searching for: \");\n\n\t\t\t\tString input_last_name = sc.next();\n\n\t\t\t\tgetEmployeeByLastName(dbc2.getConnection(), input_last_name);\n\n\t\t\t}\n\t\t\t\n\t\t\t// 4. adding an employee\n\n\t\t\telse if (option == 4) {\n\n\t\t\t\t\n\n\t\t\t\t// We are asking for the user input and storing it with a constructor from employee.java\n\n\t\t\t\tEmployee newEmployee = new Employee();\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's employee number: \");\n\n\t\t\t\tint emp_no = sc.nextInt();\n\n\t\t\t\tnewEmployee.setEmpNumber(emp_no);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's date of birth in the format yyyy-MM-dd: \");\n\n\t\t\t\tString temp = sc.next();\n\n\t\t\t\tDate dob = Date.valueOf(temp);\n\n\t\t\t\tnewEmployee.setBirthDate(dob);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's first name: \");\n\n\t\t\t\tString f_name = sc.next();\n\n\t\t\t\tnewEmployee.setFirstName(f_name);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's last name: \");\n\n\t\t\t\tString l_name = sc.next();\n\n\t\t\t\tnewEmployee.setLastName(l_name);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee's gender (M/F): \");\n\n\t\t\t\tString gender = sc.next();\n\n\t\t\t\tnewEmployee.setGender(gender);\n\n\t\t\t\tSystem.out.println(\"Please enter the employee start date in the format yyyy-MM-dd: \");\n\n\t\t\t\tString temp2 = sc.next();\n\n\t\t\t\tDate hire_date = Date.valueOf(temp2); \n\n\t\t\t\tnewEmployee.setHireDate(hire_date);\n\n\t\t\t\t\n//\t\t\t\tWe are inserting the input into a string and formating it accordingly\n\t\t\t\tString insertEmp = String.format(\"CALL newEmployee('%d', '%s', '%s', '%s', '%s', '%s');\", newEmployee.getEmpNo(), newEmployee.getDateofBirth(), newEmployee.getFirstName(), newEmployee.getLastName(), newEmployee.getGender(), newEmployee.getHireDate());\n\n\t\t\t\t\n//\t\t\t\tSaving the formated String and calling the newEmployee method written below\n\t\t\t\tnewEmployee(dbc2.getConnection(), insertEmp);\n\n\t\t\t}\n//\t\t\tI have written the option 5 to show us employees salary when we ask for the employee nubmer\n\t\t\t// 5. Additional functionality \n\t\t\telse if (option == 5) {\t\t\n\n\t\t\t\tSystem.out.println(\"Please enter the number of the employee whose salary you would like to look up: \");\n\n\t\t\t\tint input_emp_no = sc.nextInt();\n//\t\t\t\tStoring the salary and calling the method\n\t\t\t\tgetEmployeeSalary(dbc2.getConnection(), input_emp_no);\n\n\t\t\t\n\t\t\t\t\n\t\t\t}\t\n\t\t\t// 6. Additional functionality \n//\t\t\tI have added the sixth option to show us all the employees with their last names and the department numbers in which they belog\n\t\t\telse if (option == 6) {\n\t\t\t\tgetEmployeeDepartmentNo(dbc2.getConnection());\n\t\t\t}\t\n\n\t\t\t// unknown option\n//\t\t\tthis will be printed in case there is no valid option, meaning if the numbers 0-6 are not entered\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Invalid option.\");\n\t\t\t}\n\t\t}\n\t\t\n//\t\tthe loop runs unless 0 is selected\n\t\twhile(true); //loop until option 0 is selected\n\n\t\t// Close the connection\n\t\tdbc2.closeConnection();\n\t\t// Close the scanner\n\t\tsc.close();\n//\t\twe are calling that the program has ended\n\t\tSystem.out.println(\"MajorAssignment.java - ending main method\\n\");\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter file name\");\n\t\tString file = sc.nextLine();\n\t\tfileRead(file);\n\t\tSystem.out.println(\"Enter required number of clusters\");\n\t\treqNoOfClusters =Integer.parseInt(sc.nextLine());\n\t\tmakeInitialDistanceMatrix();\n\t\twhile(totalCluster != reqNoOfClusters) {\n\t\t\tmergeNext();\n\t\t}\n\t\tprintClusters();\n\t\tdouble jac = getJaccard();\n\t\tSystem.out.println(\"Jaccard coefficient = \"+jac);\n//\t\tdouble rand = getRand();\n//\t\tSystem.out.println(\"rand = \"+rand);\n\t}",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(\"IslandFerriesIN.txt\"));\n\n while (br.ready()) {\n String[] data = br.readLine().split(\" \");\n int numIslands = Integer.parseInt(data[0]);\n int numFerries = Integer.parseInt(data[1]);\n int destIsland = Integer.parseInt(br.readLine());\n Ferry[] ferries = new Ferry[numFerries];\n for (int i = 0; i < numFerries; i++) {\n data = br.readLine().split(\" \");\n ferries[i] = new Ferry();\n ferries[i].startIsland = Integer.parseInt(data[0]);\n ferries[i].endIsland = Integer.parseInt(data[1]);\n ferries[i].ferryCost = Integer.parseInt(data[2]);\n }\n System.out.println(minTotalCost(numIslands, numFerries, destIsland, ferries));\n }\n br.close();\n }",
"public static int loadSchools(ArrayList<School> H) {\n\n\t\tboolean isValid = false;\n\n\t\tString values[] = new String[4002];\n\n\t\tString line = \"\";\n\t\tString strLine = \"\";\n\t\tdouble alpha = 0.00;\n\t\tint i = 0;\n\t\tint successfulSchools = 0;\n\t\tschoolsEntered = 0; // as soon as loadSchools is called\n\t\t// schoolsEntered += loadedSchoolsNum;\n\n\t\tString school_file = \"\";\n\n\t\tdo {\n\t\t\tisValid = true;\n\n\t\t\ttry {\n\t\t\t\tSystem.out.print(\"Enter school file name (0 to cancel): \");\n\t\t\t\tschool_file = input.readLine();\n\t\t\t\tif (school_file.equalsIgnoreCase(\"0\")) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"File loading process canceled.\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\tBufferedReader fin = new BufferedReader(new FileReader(\n\t\t\t\t\t\tschool_file));\n\t\t\t\t// After file has been read, we'll start parsing through it and\n\t\t\t\t// populating our School Object with the relevant data.\n\t\t\t\t// get number of schools with a while loop\n\t\t\t\twhile ((line = fin.readLine()) != null) {\n\n\t\t\t\t\tvalues = line.split(\",\");\n\t\t\t\t\tif (values.length == 3) {\n\n\t\t\t\t\t\tif ((Double.parseDouble(values[1]) <= 1.00)\n\t\t\t\t\t\t\t\t&& (Double.parseDouble(values[1]) >= 0.00)) {\n\t\t\t\t\t\t\t// H[schoolsEntered] = new School( values[0],\n\t\t\t\t\t\t\t// Double.parseDouble(values[1]), numStudentsAdded);\n\t\t\t\t\t\t\t// System.out.println(H[schoolsEntered].getName());\n\t\t\t\t\t\t\tif (Integer.parseInt(values[2]) >= 1) {\n\t\t\t\t\t\t\t\t// took out loadedSchoolsNum\n\t\t\t\t\t\t\t\tH.add(new School(values[0], Double\n\t\t\t\t\t\t\t\t\t\t.parseDouble(values[1]),\n\t\t\t\t\t\t\t\t\t\tnumStudentsAdded, Integer\n\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(values[2])));\n\t\t\t\t\t\t\t\tloadedSchoolsNum++;\n\t\t\t\t\t\t\t\tsuccessfulSchools++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tschoolsEntered++;\n\t\t\t\t}\n\n\t\t\t\tfin.close();\n\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"ERROR: File not found!\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tisValid = false;\n\t\t\t} catch (IOException e) {\n\n\t\t\t}\n\n\t\t} while (!isValid);\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(successfulSchools + \" of \" + schoolsEntered\n\t\t\t\t+ \" schools loaded!\");\n\t\tSystem.out.println(\"\");\n\n\t\treturn successfulSchools;\n\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a file of scores: \");\n String fileName = input.next();\n File file = new File(fileName);\n int numberOfScores = 0;\n double totalScores = 0;\n double avarege = 0;\n if (!file.exists()) {\n throw new FileNotFoundException();\n }\n\n try (\n Scanner inputFile = new Scanner(file);\n ) {\n while (inputFile.hasNext()) {\n totalScores += Double.parseDouble(inputFile.next());\n numberOfScores++;\n }\n\n }\n avarege = totalScores / numberOfScores;\n System.out.println(\"Total Score: \" + totalScores +\n \"\\nAvarage: \" + avarege);\n }",
"public static void main(String[] args) {\n\t\tint choice;\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\n\t\tFileOutputStream fos=new FileOutputStream(\"F:\\\\Student.txt\");\n\t\tObjectOutputStream dos=new ObjectOutputStream(fos);\n\t FileInputStream fis=new FileInputStream(\"F:\\\\student.txt\");\t\n\t\tObjectInputStream ois=new ObjectInputStream(fis);\n\t //ArrayList<StudentDet> arl=new ArrayList<StudentDet>();\n\t \n\t\t\n\t\tSystem.out.println(\"1.Store data into file\");\n\t System.out.println(\"2.read whos age is > 18 and write into another file\");\n\t System.out.println(\"exit\");\n\t\tSystem.out.println(\"enter choice\");\n\t\tchoice=sc.nextInt();\n\t\t\n\t\tStudentOperation so=new StudentOperation();\n\t \n\t // sdt.accept();\n\t \n\t\t/*StudentDet sd=new StudentDet();\n\t\tStudentDet sd1=new StudentDet(1,10,220406,\"a\");\n\t\tStudentDet sd2=new StudentDet(4,15,220406,\"am\");\n\t\tStudentDet sd3=new StudentDet(3,33,220406,\"amber\");\n\t\tStudentDet sd4=new StudentDet(5,23,220406,\"er\");\n\t\tStudentDet sd5=new StudentDet(6,19,220406,\"amer\");\n\t\tStudentDet sd6=new StudentDet(2,20,220406,\"ambr\");\n\t\t*/\n\t\t\n\t\tswitch(choice)\n\t\t{\n\t\tcase 1:so.store(); \n\t\t\tbreak;\n\t\t\n\t\tcase 2:\tso.Readstore();\n\t\tbreak;\n\t\t\n\t\tdefault:System.out.println(\"invalid choice\");\n\t\tbreak;\t\n\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t \n\t}",
"public static void main(String[] args) {\n\t\t\tStudent stud=new Student();\n\t\tList<Student> student = stud.reader(\"Test.csv\");\n\t\t//highest marks\n\t\tstudent.parallelStream().collect(Collectors.maxBy(Comparator.comparingInt(Student::getTotal))).ifPresent(System.out::println);\n\t\t// lowest marks\n\t\tstudent.parallelStream().collect(Collectors.minBy(Comparator.comparingInt(Student::getTotal))).ifPresent(System.out::println);\n\t\t// average marks in the school\n\t\tDouble avg=student.parallelStream().collect(Collectors.averagingInt(Student::getTotal));\n\t\tSystem.out.println(avg);\n\t\t//dept wise highest marks\n\t\tMap<String, Optional<Student>> dept= \n\t\t\t\tstudent.parallelStream().collect(Collectors.groupingBy(Student::getDept,\n\t\t\t\t\t\tCollectors.maxBy(Comparator.comparingInt(Student::getTotal))\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\tSystem.out.println(dept);\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\r\n\t\tDouble CSE1,CSE2,CSE3,CSE4,CSE5,SUM,AVG;\r\n\t\t\tString name;\r\n\t\t\tSystem.out.println(\"NAME: \");\r\n\t\t\tname=s.next();\r\n\t\tSystem.out.println(\"COMPUTER APPLICATION\");\r\n\t\tCSE1=s.nextDouble();\r\n\t\tSystem.out.println(\"COMPUTER SYSTEM\");\r\n\t\tCSE2=s.nextDouble();\r\n\t\tSystem.out.println(\"OOP2\");\r\n\t\tCSE3=s.nextDouble();\r\n\t\tSystem.out.println(\"COMMUNICATION SKIILS\");\r\n\t\tCSE4=s.nextDouble();\r\n\t\tSystem.out.println(\"WEB DESIGN\");\r\n\t\tCSE5=s.nextDouble();\r\n\t\tSUM = CSE1+CSE2+CSE3+CSE4+CSE5;\r\n\t\tSystem.out.println(\"SUM = \"+SUM);\r\n\t\tAVG = SUM/5;\r\n\t\tSystem.out.println(\"AVERAGE = \"+AVG);\r\n\t\t\r\n\t\tif(AVG>=85){\r\n\t\t\tSystem.out.println(\"GRADE = A\");\r\n\t\t}else{\r\n\t\t\tif(AVG>=75){\r\n\t\t\t\tSystem.out.println(\"GRADE = B\");\r\n\t\t\t}else{\r\n\t\t\t\tif(AVG>=65){\r\n\t\t\t\t\tSystem.out.println(\"GRADE = C\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(AVG>=50){\r\n\t\t\t\t\t\tSystem.out.println(\"GRADE = D\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(AVG<=49){\r\n\t\t\t\t\t\t\tSystem.out.println(\"GRADE = F\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void processInput () throws IllegalArgumentException {\n \n File inputDataFile = null;\n Scanner inputFile = null; \n String line = \"\";\n \n try {\n inputDataFile = new File (INPUT_FILE);\n inputFile = new Scanner(inputDataFile);\n }\n catch (FileNotFoundException e) {\n System.out.println(\"File not found.\");\n System.exit (0);\n }\n \n while (inputFile.hasNextLine()) {\n for (int i = 0; i >= 15; i++) {\n \n \n \n Student[] newStudent = line.split (\",\", 10);\n \n inputFile.close();\n \n \n \n \n\n \n\n}// End processInput\n\n//*****************************************************************************\n\npublic static void processStudentData (String[] info) throws IllegalArgumentException {\n\n \n\n}// End processStudentData \n\n//*****************************************************************************\n\npublic static void processGradeItemData (String[] info) throws \n IllegalArgumentException {\n\n}// End processGradeItemData\n\n//*****************************************************************************\n\npublic static void generateReport () {\n\n\n}// End generateReport\n\n\n} // End JedidiahPrallNicholasRyan_03",
"public static void main(String[] args) throws FileNotFoundException {\n\t\tFile file = new File(\"Score.txt\");\r\n\t\tif(file.exists())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File is already exist! \");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tPrintWriter output = new PrintWriter(file);\r\n\t\t\r\n\t\toutput.print(\"John T Smith \");\r\n\t\toutput.println(90);\r\n\t\toutput.print(\"Eric asd asd: \");\r\n\t\toutput.println(80);\r\n\t\t\r\n\t\toutput.close();\r\n\t}",
"public static void main(String[] args)\n\t{\n\t\t// Input validation\n\t\tif(args.length < 3)\n\t\t{\n\t\t\tSystem.out.println(\"Error - Wrong input parameters\");\n\t\t\tSystem.out.println(\"Usage:\");\n\t\t\tSystem.out.println(\" in - Input file name\");\n\t\t\tSystem.out.println(\" ob - Output file name for best solution\");\n\t\t\tSystem.out.println(\" ow - Output file name for worst solution\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t// Argument extraction\n\t\tString inputFile = args[0];\n\t\tString outputFileBest = args[1];\n\t\tString outputFileWorst = args[2];\n\t\t\n\t\tDataSource sourceInput = null;\n\t\t\n\t\ttry \n\t\t{\n\t\t\t// Load the analysis data\n\t\t\tsourceInput = new DataSource(inputFile);\n\t\t\tInstances inputData = sourceInput.getDataSet();\n\t\t\tif (inputData.classIndex() == -1)\n\t\t\t\tinputData.setClassIndex(inputData.numAttributes() - 1);\n\t\t\t\n\t\t\t// Use the best method\n\t\t\tanalyzeData(inputData, BestClassifier, outputFileBest);\n\t\t\t\n\t\t\t// Use the worst method\n\t\t\tanalyzeData(inputData, WorstClassifier, outputFileWorst);\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint i = 1;\n\t\t\n\t\twhile(i!=0) {\n\t\t\tint j = 1;\n\t\t\t\n\t\t\tSystem.out.println(\"=======================================================================\");\n\t\t\tSystem.out.print(\"Student degree (Enter 1 for Undergraduate, 2 for Graduate, 0 for Cancel): \");\n\t\t\t\n\t\t\ti = sc.nextInt();\n\t\t\t\n\t\t\t//Undergraduate\n\t\t\tif (i==1) { \n\t\t\t\tSystem.out.println(\"=================================\");\n\t\t\t\tUndergraduate student = new Undergraduate();\n\t\t\t\tstudent.register();\n\t\t\t\tstudent.login();\n\t\t\t\tSystem.out.println(\"Welcome to SKKU grade calculator! \");\n\t\t\t\tstudent.getGrades();\n\t\t\t\tstudent.calculateGPA();\n\t\t\t\tstudent.scholarship();\n\t\t\t\t\n\t\t\t\twhile(j==1) {\n\t\t\t\t\tSystem.out.print(\"Do you want to calculate again(Y/N): \");\n\t\t\t\t\tString answer = sc.next();\n\t\t\t\t\tif (answer.equals(\"N\")) //break\n\t\t\t\t\t\tj=0;\n\t\t\t\t\telse {\n\t\t\t\t\t\t\tstudent.getGrades();\n\t\t\t\t\t\t\tstudent.calculateGPA();\n\t\t\t\t\t\t\tstudent.scholarship();\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\t//Graduate\n\t\t\telse if(i==2) {\n\t\t\t\tSystem.out.println(\"=================================\");\n\t\t\t\tGraduate student = new Graduate();\n\t\t\t\tstudent.register();\n\t\t\t\tstudent.login();\n\t\t\t\tSystem.out.println(\"Welcome to SKKU grade calculator! \");\n\t\t\t\tstudent.getGrades();\n\t\t\t\tstudent.calculateGPA();\n\t\t\t\tstudent.scholarship();\n\t\t\t\t\n\t\t\t\twhile(j==1) {\n\t\t\t\t\tSystem.out.print(\"Do you want to calculate again(Y/N): \");\n\t\t\t\t\tString answer = sc.next();\n\t\t\t\t\tif (answer.equals(\"N\")) //break\n\t\t\t\t\t\tj=0;\n\t\t\t\t\telse {\n\t\t\t\t\t\t\tstudent.getGrades();\n\t\t\t\t\t\t\tstudent.calculateGPA();\n\t\t\t\t\t\t\tstudent.scholarship();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Cancel\n\t\t\telse if(i==0) {\n\t\t\t\tSystem.out.println(\"Thank you for using our system!\");\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n if (args.length != 1) {\n System.err.println(\"Must provide a file to read from.\");\n } else { \n ArrayList<MatchPerson> allPeople = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> gayMalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> gayFemalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> straightMalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> straightFemalePool = new ArrayList<MatchPerson>();\n ArrayList<MatchPerson> biPool = new ArrayList<MatchPerson>();\n\n File spreadsheet = new File(args[0]);\n File dest = new File(\"matchResults.txt\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(dest));\n // get answers in ArrayList from tsv\n ArrayList<String[]> allAnswers = MatchCalculation.fillAnswersArray(spreadsheet);\n String[] questions = allAnswers.get(0); // store questions titles (may or may not need)\n allAnswers.remove(0); // remove titles\n for (String[] arr: allAnswers) { // fill allPeople array\n MatchPerson newPerson = MatchCalculation.parseResponses(arr);\n allPeople.add(newPerson); // fill in person objects\n // add to specific pool for romantic matches\n if (newPerson.getMatchType() == MatchType.ROMANTIC) {\n if (newPerson.getPreference() == Preference.STRAIGHT) {\n if (newPerson.getGender() == Gender.MALE) {\n straightMalePool.add(newPerson);\n } else {\n straightFemalePool.add(newPerson);\n }\n } else if (newPerson.getPreference() == Preference.GAY) {\n if (newPerson.getGender() == Gender.MALE) {\n gayMalePool.add(newPerson);\n } else {\n gayFemalePool.add(newPerson);\n }\n } else {\n biPool.add(newPerson);\n }\n }\n }\n for (MatchPerson person: allPeople) {\n person.setFriendshipMatches(MatchCalculation.findMatches(person, allPeople));\n if (person.getPreference() == Preference.STRAIGHT) {\n if (person.getGender() == Gender.FEMALE) {\n person.setRomanticMatches(MatchCalculation.findMatches(person, straightMalePool));\n } else if (person.getGender() == Gender.MALE) {\n person.setRomanticMatches(MatchCalculation.findMatches(person, straightFemalePool));\n }\n } else if (person.getPreference() == Preference.BI) {\n person.setRomanticMatches(person.getFriendshipMatches());\n } \n// person.setBdayMatches(MatchCalculation.findBirthdayMatches(person, allPeople));\n// writer.write(\"Birthday matches for \" + person.getName() + \" \" \n// + person.getBirthday() + \"\\n\");\n writer.write(person.birthdayMatchesToString() + \"\\n\");\n writer.write(\"Friendship matches for \" + person.getName() + \"\\n\");\n writer.write(person.friendshipMatchesToString() + \"\\n\");\n writer.write(\"Romantic matches for \" + person.getName() + \"\\n\");\n writer.write(person.romanticMatchesToString() + \"\\n\");\n }\n writer.close();\n }\n \n }",
"public static void main(String[] args) throws IOException {\n\n\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\n int gradesCount = Integer.parseInt(bufferedReader.readLine().trim());\n\n List<Integer> grades = IntStream.range(0, gradesCount).mapToObj(i -> {\n try {\n return bufferedReader.readLine().replaceAll(\"\\\\s+$\", \"\");\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n })\n .map(String::trim)\n .map(Integer::parseInt)\n .collect(toList());\n\n List<Integer> result = Result.gradingStudents(grades);\n\n bufferedReader.close();\n System.out.println(result.stream()\n .map(Object::toString)\n .collect(joining(\"\\n\"))\n + \"\\n\");\n }",
"public static void main(String[] args) {\n\t\tif (args.length == 0) {\n\t\t\tSystem.out.println(\"Please specify the name of the input file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tString filename = args[0];\n\t\tSystem.out.print(\"Please enter a sentence: \");\n\t\tScanner in = new Scanner(System.in);\n\t\tString sentence = in.nextLine();\n\t\tin.close();\n\t\tSystem.out.println(\"enetered sentence: \" + sentence);\n//\t\tList<Sentence> sentences = Analyzer.readFile(filename);\n//\t\tSet<Word> words = Analyzer.allWords(sentences);\n//\t\tMap<String, Double> wordScores = Analyzer.calculateScores(words);\n\t\tList<Sentence> sentences = Analyzer.readFile(\"reviews\");//step 1\n\t\tSet<Word> words = Analyzer.allWords(sentences);//step 2\n\t\tMap<String, Double> wordScores = Analyzer.calculateScores(words);//step 3 \n\t\tdouble score = Analyzer.calculateSentenceScore(wordScores, sentence);\n\t\tSystem.out.println(\"The sentiment score is \" + score);\n\t}",
"public static void main(String[] args) {\n\t\tinsertScore(\"专业分数线.txt\", 2013, 0, 1);\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tfinal String FILE = \"SortingYardTrains7.txt\";\r\n\t\t\r\n\t\t// Setup the file reference variable to refer to the text file\r\n\t\tFile inputFileName = new File(FILE);\r\n\t\t\r\n\t\t// Open the file for reading by creating a scanner for the file\r\n\t\t// Read the first value in the file, it indicates how many tracks the yard has\r\n\t\tScanner input = new Scanner (inputFileName);\r\n\t\tint numTracks = input.nextInt();\r\n\t\t\r\n\t\t\r\n\t\t//instantiate rail yard class\r\n\t\tRailYard railyard = new RailYard (numTracks + 1);\r\n\t\t\r\n\t\t\r\n\t\t//while loop to read details from file\r\n\t\t//create a train and add to sorting yard\r\n\t\t//print details\r\n\t\twhile(input.hasNext()) {\r\n\t\t\t\r\n\t\t\t//reads from file and loads information into local var\r\n\t\t\tint trackNum = input.nextInt();\r\n\t\t\tint engineNum = input.nextInt();\r\n\t\t\tString companyName = input.next();\r\n\t\t\tint maxNumRailCars = input.nextInt();\r\n\t\t\tString destination = input.next();\r\n\t\t\t\r\n\t\t\t//creates train object\r\n\t\t\tTrain train = new Train(engineNum,companyName, maxNumRailCars, destination);\r\n\t\t\t\r\n\t\t\t//adds to railyard array\r\n\t\t\trailyard.addTrainTosortingYard(trackNum, train);\r\n\t\t\t\r\n\t\t\t//print train details\r\n\t\t\tSystem.out.print(\"Loading sorting track \" + trackNum + \":\");\r\n\t\t\tSystem.out.println(\" \" + train.print());\r\n\t\t\t\r\n\t\t}//end of while loop\r\n\t\t\r\n\t\tinput.close();\r\n\t}",
"public static void main(String[] args) {\n String userPath = \"..\" + File.separator + \"Solution\";\n // String userPath = \"/home/matan/temp/203\";\n String scoreMapFile = \"scoreMap.csv\";\n FileOutputStream fos = null;\n boolean addHeader = false;\n Integer groupNo = null;\n int port = 7777;\n if (args.length < 3) {\n System.err.println(\"No arguments received, Using default mode. Assume user folder ../Solution/ and port 7777\");\n System.err.println(\"Run Example:\\n../ID1_ID2 6478 scores.csv 14336 yes\");\n System.err.println(\"To avoid header just don't use the fifth parameter as such:\\n../ID1_ID2 6478 scores.csv 14336\\n\\n\");\n } else {\n userPath = args[0];\n port = Integer.valueOf(args[1]);\n scoreMapFile = args[2];\n if (args.length > 3) {\n groupNo = Integer.valueOf(args[3]);\n }\n if (args.length > 4) {\n addHeader = true;\n }\n }\n\n try {\n File f = new File(scoreMapFile);\n if (!f.exists()) {\n f.createNewFile();\n }\n fos = new FileOutputStream(f, true);\n } catch (IOException e) {\n System.err.println(\"Failed to open output file\");\n System.exit(-1);\n }\n\n TestSuite ts = new TestSuiteSpl171Ass3(userPath, port, groupNo);\n\n Map<String, Integer> scoreMap = ts.runSuite();\n try {\n writeScoreMap(scoreMap, fos, groupNo, addHeader, ts);\n } catch (IOException e) {\n System.err.println(\"Failed to print to output file\");\n try {\n fos.close();\n } catch (IOException ignore) { }\n }\n }",
"public static void main( String[] args ) throws Exception\n {\n ArrayList<String> sortedNames = new ArrayList<>();\n\n //accessing the input file\n File file = new File(\"src\\\\main\\\\java\\\\ex41\\\\exercise41_input.txt\");\n\n //directing scanner to read from input file\n Scanner input = new Scanner(file);\n\n\n //creating an output file\n File orderedNamesFile = new File(\"exercise41_output.txt\");\n\n //accessing the ability to write in output file\n FileWriter outputFile = new FileWriter(orderedNamesFile);\n\n\n /*using a while loop to read each line from input file and then add it to the arraylist sortedNames\n until there are no more lines*/\n while (input.hasNextLine()) {\n String name = input.nextLine();\n sortedNames.add(name);\n }\n\n //using collections function to sort the names in the arraylist\n Collections.sort(sortedNames);\n\n\n //writing in output file\n outputFile.write(\"\\nTotal of \" + sortedNames.size() + \" names: \\n\");\n outputFile.write(\"------------------------\\n\");\n\n\n //adding in the sorted names in arraylist to the output file\n for(String n : sortedNames)\n {\n outputFile.write(n + \"\\n\");\n }\n\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tdouble listening;\t\t//Declaring all the variables \n\t\tdouble reading;\n\t\tdouble writing;\n\t\tdouble speaking;\n\t\tdouble score;\n\t\tdouble decimal;\n\t\tint userInput;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\t\n\t\tSystem.out.println(\"********************\" + \"\\n\" //Welcome message for the user.\n\t\t\t\t\t\t\t+ \"Welcome to the Concordia Language Proficiency Evaluator!\" \n\t\t\t\t\t\t\t+ \"\\n\\n\" + \"********************\" + \"\\n\\n\");\n\t\t\n\t\tSystem.out.println(\" Please select an option: \");\t//Prompting the user to select which option they want.\n\t\tSystem.out.println(\" 1- Language Proficiency Requirements for the Appllicant\" + \"\\n\" +\n\t\t\t\t\t\t \" 2- Evaluation of your Language Proficiency\" + \"\\n\");\n\t\tSystem.out.print(\"Please enter the digit that corresponds to your choice: \");\n\t\t\n\t\tuserInput = keyboard.nextInt();\t\t//User inputs 1 or 2 depending on which option they want.\n\t\tSystem.out.println(\"\");\n\t\tif (userInput == 1)\t\t//This will only compile if the user inputs \"1\", this will print the requirements of the assessment.\n\t\t{\n\t\t\tSystem.out.println(\" The overall score of the applicant in the IELTS exam needs to be equal to or above 6.5\"\n\t\t\t\t\t+ \" and the scores for reading and writing should not be below 6.0.\" + \"\\n\"\n\t\t\t\t\t+ \" If your overall score is 6, and your reading and writing scores are at least 6,\"\n\t\t\t\t\t+ \" you will be eligible for conditional admission.\" + \"\\n\" + \"So you need to take an English course in the first semester.\"\n\t\t\t\t\t+ \" Otherwise you have to retake the IELTS exam. Thank you for choosing Concordia.\" + \"\\n\\n\");\n\t\t}\n\t\tif (userInput == 2) //The following will only compile if the user inputs \"2\", this will cause the main part of the program to compile\n\t\t{\n\t\t\tSystem.out.print(\"Please enter your listening score: \"); //The user is asked to input their score in each category.\n\t\t\tlistening = keyboard.nextDouble();\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\n\t\t\tSystem.out.print(\"Please enter your speeaking score: \");\n\t\t\tspeaking = keyboard.nextDouble();\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\n\t\t\tSystem.out.print(\"Please enter your reading score: \");\n\t\t\treading = keyboard.nextDouble();\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\n\t\t\tSystem.out.print(\"Please enter your writing score: \");\n\t\t\twriting = keyboard.nextDouble();\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tscore = (listening + speaking + reading + writing)/4; //THe average is calculated.\n\t\t\tdecimal = (int)score;\n\t\t\t\n\t\t\t//The following lines of code show how I rounded the value of the average.\n\t\t\t//Each if loop accounts for a possibility of rounding.\n\t\t\t\n\t\t\tif (score-decimal < 0.25) //This if statement will cause any value of score that has a decimal less than .25 to be rounded down to 6\n\t\t\t{\n\t\t\t\tscore = decimal;\n\t\t\t}\n\t\t\t\n\t\t\tif (0.25 <= score-decimal && score-decimal < 0.75) //This if statement will cause any value of score that has a decimal between .25 and .75 to be rounded to .5. \n\t\t\t{\n\t\t\t\tscore = decimal + 0.5;\n\t\t\t}\n\t\t\t\n\t\t\tif (0.75 <= score-decimal && score-decimal < 1)\t\t//This if statement will cause any value of score that has a decimal greater than .75 to be rounded up to 1.\n\t\t\t{\n\t\t\t\tscore = decimal +1;\n\t\t\t}\n\t\t\tSystem.out.println(\"Your overall score is: \" + score);\t\t//Outputting the users results\n\t\t\tSystem.out.println(\"Your reading score is: \" + reading);\n\t\t\tSystem.out.println(\"Your writing score is:\" + writing + \"\\n\");\n\t\t\t\n\t\t\t//The following if statements take into consideration the requirements to pass the assessment (specified in the instructions).\n\t\t\tif (score >= 6.5 && reading >= 6 && writing >= 6)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"CONGRATULATIONS! You are eligible for admission!\");\n\t\t\t}\n\t\t\t\n\t\t\tif (score >= 6.5 &&(reading < 6 || writing < 6))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You are eligible for conditional admission!\");\n\t\t\t}\n\t\t\t\n\t\t\tif (score == 6 && reading >= 6 && writing >= 6)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You are eligible for conditional admission!\");\n\t\t\t\t\n\t\t\t}\n\t\t\tif (score == 6 && (reading < 6 || writing < 6))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Sorry, you must retake the exam.\");\n\t\t\t}\n\t\t\t\n\t\t\tif (score < 6)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Sorry, you must retake the exam.\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tkeyboard.close(); \t\t//Closing the keyboard.\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\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}\t\n\t}",
"public static void main (String [] args) {\n Address school = new Address(\"800 Lancaster Ave.\", \"Villanova\",\n \"PA\", 19085);\n //create home address objects for a number of students\n Address home1 = new Address(\"21 Jump Street\", \"Blacksburg\",\n \"VA\", 24551);\n Address home2 = new Address(\"123 Main Street\", \"Euclid\", \"OH\", \n 44132);\n Address home3 = new Address(\"5248 Fortress Circle\", \"Valdosta\",\n \"GA\", 31605);\n Address home4 = new Address(\"505 Cedar Drive\", \"Nashville\",\n \"GA\", 31639);\n //create students\n Student student1 = new Student(\"Rick\",\"Sanchez\",home1,school,99,100,97,94);\n Student student2 = new Student(\"Morty\",\"Smith\" ,home2,school,14,28,37,55); \n Student student3 = new Student(\"Zach\",\"Spencer\",home3,school,98,89,86,95);\n Student student4 = new Student(\"Arron\",\"Croft\" ,home4,school,84,99,90,75);\n //create a CS1301 A course\n Course cs1301A = new Course(\"CS1301 A\");\n //create a CS1301 B course\n Course cs1301B = new Course(\"CS1301 B\"); \n //assign some students to CS1301 A\n cs1301A.addStudent(student1);\n cs1301A.addStudent(student2);\n //assign some students to CS1301 B\n cs1301B.addStudent(student3); \n cs1301B.addStudent(student4);\n //get the averages of the 2 courses\n System.out.println(\"*** Averages of CS1301 Courses ***\");\n System.out.println(\"CS1301 A: \"+cs1301A.average());\n System.out.println(\"CS1301 B: \"+cs1301B.average());\n //display the roll for the 2 courses\n System.out.println(\"\\n*** Roll Call ***\");\n cs1301A.roll();\n cs1301B.roll(); \n }",
"public void startGame()\n {\n String driversFileName = \"drivers.txt\";\n String venuesFileName = \"venues.txt\";\n drivers = new ListOfDrivers();\n venues = new ListOfVenues();\n try\n {\n readDriverFile(driversFileName); // reads data from file and initalize the collection of drivers\n readVenueFile(venuesFileName); // reads data from file and initalize the collection of venues\n displayLine();\n displayGameHeader();\n displayLine();\n Input console = new Input();\n Validation validatior = new Validation();\n int totalRaceNo = console.acceptIntegerInput(\"Enter the total number of races in the championship\");\n while(!validatior.isNumberBetween(3, 5, totalRaceNo)) // valid input or not\n {\n totalRaceNo = console.acceptIntegerInput(\"Please enter the total number of races in the championship between 3 to 5\");\n }\n for(int j = 1; j <= totalRaceNo ; j++)\n {\n System.out.println();\n System.out.println(\"Welcome to Race No \" + j + \" in the championship\");\n System.out.println(\"###############SELECT A VENUE###############\");\n System.out.println();\n for(int i = 0 ; i < getVenues().getSize(); i++)\n {\n System.out.println(i + \".\" + getVenues().getVenue(i).getVenueName()); // shows all venues in the collection\n }\n int venueSelection = console.acceptIntegerInput(\"Choose a number to select a venue\");\n while(!validatior.isNumberBetween(0, getVenues().getSize() - 1, venueSelection)) // valid input or not\n {\n venueSelection = console.acceptIntegerInput(\"Please choose a number from above to select a venue\");\n }\n String venueName = getVenues().getVenue(venueSelection).getVenueName();\n int noOfLaps = getVenues().getVenue(venueSelection).getNoOfLaps();\n int avgLapTime = getVenues().getVenue(venueSelection).getAverageLapTime();\n double chanceOfRain = getVenues().getVenue(venueSelection).getChanceOfRain();\n System.out.println(\"You'll be racing at \" + venueName + \". This venue has \" + noOfLaps + \" laps in total!!\");\n System.out.println(venueName + \" has an average lap time of \" + avgLapTime + \" secs and \" +(int)(chanceOfRain * 100)+ \"% chance of rain\");\n applyRaceStartPenalty();\n char[] allTyreTypes = getDrivers().getAllTyreTypes(); // gets the default tyre types for each driver\n getDrivers().adjustDriversListByTime(allTyreTypes);\n displayDriverDetails(1, true, false);\n for(int i = 1 ; i <= noOfLaps ; i++)\n {\n System.out.println(\"####################LAP \" + i + \" ######################\");\n boolean isRaining = checkForRain(i,(int)(chanceOfRain * 100), allTyreTypes); // check if rained has occured depending on chance of rain\n if(i == 2 && isRaining) // if lap number 2 and is already raining\n {\n checkForTyreChange(i, allTyreTypes); // 50% chance to change tyre types\n }\n completeLap(avgLapTime, i); // complete 1 lap and calculate time\n updateRanking(true, allTyreTypes); // update each driver's ranking by time\n System.out.println();\n System.out.println(getDrivers().displayLeader()); // display the race leader\n if(i == noOfLaps) // shows all driver's details at the end of the race\n displayDriverDetails(i, false, true);\n }\n updateRacePoints(allTyreTypes); // update race point after each ranking\n updateRanking(false, allTyreTypes); // update each driver's ranking by score\n displayChampionshipDetails();\n getDrivers().resetEligibleToRace(); // reset all driver's eligible to race after each race\n getDrivers().resetTyreType(allTyreTypes);// reset all driver's tyre types to dry to race after each race\n getVenues().deleteVenue(venueSelection); // delete the venue from the collection as it cannot be used anymore\n }\n showChampionshipWinner();\n writeFile(driversFileName); // write driver details to the file\n }\n catch(ArrayIndexOutOfBoundsException ex) // in case of incorrect file format\n {\n System.out.println(\"Incorrect file\");\n }\n catch(Exception ex)\n {\n System.out.println(\"Exception occurred\" + ex);\n }\n }",
"public static void main(String[] args) {\n\n\t\t// Declare Variables\n\t\tString loginSelection;\n\t\tString mainSelection;\n\t\tStudent newStudent;\n\t\tString logoutSelection = new String(\"N\");\n\t\t// Read Data \n\t\t// Generate some a course and some class offerings\n\n\t\ttry{\n\n\t\t\tstudents = Util.addStudents(students, STUDENT_FILE);\n\n\t\t\tcourses = Util.addCourses(courses, COURSES_FILE);\n\n\t\t\tcourses = Util.addCourseOffering(courses, COURSE_OFFERING_FILE);\n\t\t\t\n\t\t\tcourses = Util.readEnrollment(courses, students, REGISTRATION_FILE);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// Something went horribly wrong\n\t\t\tSystem.out.println(\"Error loading configuration.\");\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\t// Login Prompt\n\t\tdo{ \n\t\t\tloginSelection = loginMenu();\n\t\t\tif(loginSelection.equals(\"1\")){\n\t\t\t\tcurrentStudent = studentLogin(students);\n\t\t\t\t// Main Menu Prompt\n\t\t\t\tif(currentStudent != null){\n\t\t\t\t\tdo{\n\t\t\t\t\t\tmainSelection = mainMenu();\n\t\t\t\t\t\tif (mainSelection.equals(\"1\")){\n\t\t\t\t\t\t\tdisplayAvailableCourses(currentStudent,courses);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(mainSelection.equals(\"2\")){\n\t\t\t\t\t\t\tdisplayEnrolledCourses(currentStudent,courses);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(mainSelection.equals(\"3\")){\n\t\t\t\t\t\t\tSystem.out.print(\"Please confirm you would like to logout (Y/N): \");\n\t\t\t\t\t\t\tlogoutSelection = input.nextLine();\n\t\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid selection\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (!(mainSelection.equals(\"3\") && logoutSelection.toUpperCase().equals(\"Y\")));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(loginSelection.equals(\"2\")){\n\t\t\t\tnewStudent = newUser(students);\n\t\t\t\tif(newStudent != null){\n\t\t\t\t\tstudents.add(newStudent);\n\t\t\t\t}\n\t\t\t} \n\t\t\telse if(loginSelection.equals(\"3\")){\n\t\t\t\t// Save enrollment details before exiting\n\t\t\t\ttry {\n\t\t\t\t\tUtil.saveEnrollment(courses, REGISTRATION_FILE);\n\t\t\t\t\tUtil.saveStudents(students, STUDENT_FILE);\n\t\t\t\t} catch (IOException e){\n\t\t\t\t\tSystem.out.println(\"Error saving configuration.\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Exiting the Registration System\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Invalid selection\");\n\t\t\t}\n\t\t} while (! loginSelection.equals(\"3\"));\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tMovieDatabase movieDatabase = new MovieDatabase();\n\t\tString line;\n\t\t\n // Add movies and actors to the database\n\t\ttry{\n\t\t\tFile textFile = new File(\"movies.txt\");\n\t\t\tScanner scnr = new Scanner(textFile);\n\t\t\twhile(scnr.hasNextLine()) {\n\t\t\t\tline = scnr.nextLine();\n\t\t\t\tString[] movie = line.split(\",\");\n\t\t\t\tString[] actor = new String[1];\n\t\t\t\tfor(int i = 0; i < movie.length; i++) {\n\t\t\t\t\tif(i == 0) {\n\t\t\t\t\t\tactor[i] = movie[i];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmovieDatabase.addMovie(movie[i].trim(), actor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tscnr.close();\t\t\t\n\t\t}catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n // Add ratings to the database\n\t\ttry {\n\t\t\tFile textFile = new File(\"ratings.txt\");\n\t\t\tScanner scnr = new Scanner(textFile);\n\t\t\twhile(scnr.hasNextLine()) {\n\t\t\t\tline = scnr.nextLine();\n\t\t\t\tString[] movie = line.split(\"\\t\");\n\t\t\t\ttry {\n\t\t\t\t\tdouble rating = Double.parseDouble(movie[1]);\n\t\t\t\t\tmovieDatabase.addRating(movie[0].trim(), rating);\n\t\t\t\t}catch (NumberFormatException e) {\n continue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tscnr.close();\n\t\t}catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Print best movie and best actor\n\t\tSystem.out.println(\"The best actor is\" + movieDatabase.getBestActor() );\n\t\tSystem.out.println(\"The best movie is\" + movieDatabase.getBestMovie() );\n\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tFileInputStream fi = new FileInputStream(\"C:\\\\Users\\\\jyuna\\\\OneDrive\\\\Desktop\\\\2019airpollution.csv\");\n FileOutputStream fo = new FileOutputStream(\"C:\\\\Users\\\\jyuna\\\\OneDrive\\\\Desktop\\\\output.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(fi));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fo));\n\n String strLine;\n while ((strLine = br.readLine()) != null) {\n\n String[] arr = strLine.split(\" \");\n String[] nos = arr[1].split(\",\");\n\n Set<Integer> set = new HashSet<Integer>(); \n for(int i = 0; i<nos.length; i++){\n int no = Integer.parseInt(nos[i]);\n set.add(no); \n }\n TreeSet<Integer> sortedSet = new TreeSet<Integer>(set); \n\n switch(arr[0]) {\n\n case \"Min:\":\n String msg1=\"The Min of [\" +arr[1]+ \"] is \" +(Integer)sortedSet.first();\n bw.write(msg1);\n bw.newLine();\n\n break;\n\n case \"Max:\":\n String msg2=\"The Max of [\" +arr[1]+ \"] is \" +(Integer)sortedSet.last();\n bw.write(msg2);\n bw.newLine();\n break;\n\n case \"Avg:\":\n Object[] noarray = sortedSet.toArray();\n int noarraysize = noarray.length-1;\n int sum=0;\n for(int i=0;i<=noarraysize;i++) {\n\n int no=Integer.valueOf(noarray[i].toString());\n sum = sum + no;\n if(i==noarraysize) {\n String msg3=\"The Avg of [\" +arr[1]+ \"] is \" +(double)sum/noarray.length;\n bw.write(msg3);\n bw.newLine();\n }\n }\n break;\n\n case \"Sum:\":\n Object[] noarray1 = sortedSet.toArray();\n int noarraysize1 = noarray1.length-1;\n int sum1=0;\n for(int i=0;i<=noarraysize1;i++) {\n int no=Integer.valueOf(noarray1[i].toString());\n sum1 = sum1 + no;\n if(i==noarraysize1) {\n String msg4=\"The Sum of [\" +arr[1]+ \"] is \" +sum1;\n bw.write(msg4);\n bw.newLine();\n }\n }\n break;\n\n }\n\n }\n br.close();\n bw.close();\n\n }",
"public static void main(String[] args) throws IOException {\n\n if(args.length == 2) {\n readInputDataFromCSV(args[0]);\n winningNumber = args[1];\n File currentDirectoryOfCSVFile = new File(args[0]); // take the path, where .csv file with input data is\n findLongCommSubs();\n formResultLongCommSubs();\n multipleSortOfFinalPlayerList();\n generateCsvFileWithFinalData(currentDirectoryOfCSVFile);\n } else{\n System.out.println(\"Not valid enter! Enter two variables (path to .csv file and the winning number)!\");\n }\n }",
"public static void main(String args[]) throws IOException\n\t{\n\t\tpopulateLists();\n\t\tloadArrayList();\n\t\t//boolean loggedIn;\n\t\tString selection=\"\";\n\t\tacceptLogin();\n\t\t displayTopics();\n\t\t //userXpLog(username.getText(),xPerience);\n\t\t// String info=\"Username:,XP:,\";\n\t\t// overwriteFile(\"UsersXP.txt\",info);\n\n\t\t// loadXP();\n\n\t\tif(loggedin)\n {\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n // while(selection != null)\n //{\n // selection =\n // overallScore += questionsAndScore(selection);\n // }\n\t\t\n //JOptionPane.showMessageDialog(null, \"Your overall score was: \"+overallScore, \"Overall Score\",1);\n System.out.println(\"updating ....\");\n updatexp();\n // leaderboardGeneration();\n\t\t}\t\n\t}",
"public static void main(String[] args) throws IOException, ParseException, ParserException {\n String scoresZipName = args[0];\n String serializedScoresZipName = args[1];\n\n System.err.println(\"Reading original ...\");\n TextScoreReader tsr = new TextScoreReader(new File(scoresZipName), Astar.ROOT_EDGELABEL, Astar.IGNORE_EDGELABEL);\n\n FileOutputStream fos = new FileOutputStream(serializedScoresZipName);\n ZipOutputStream zos = new ZipOutputStream(fos);\n\n serialize(zos, \"tagProbs.ser\", tsr.getSupertagProbabilities());\n serialize(zos, \"edgeProbs.ser\", tsr.getEdgeProbabilities());\n serialize(zos, \"types.ser\", tsr.getAllTypes());\n serialize(zos, \"supertagLexStr.ser\", makeStringInterner(tsr.getSupertagLexicon()));\n serialize(zos, \"edgeLabelLex.ser\", tsr.getEdgeLabelLexicon());\n serialize(zos, \"idToSupertagStr.ser\", makeStringMap(tsr.getIdToSupertag())); // SGraph not serializable -> convert graphs to strings\n\n System.err.println(\"Writing corpus ...\");\n ZipEntry ze = new ZipEntry(\"corpus.amconll\");\n zos.putNextEntry(ze);\n Writer w = new OutputStreamWriter(zos);\n AmConllSentence.write(w, tsr.getInputCorpus());\n\n System.err.println(\"Done.\");\n zos.close();\n }",
"public static void main(String[] args){\n\t\tPersonalData data1= new PersonalData(1982,01,11,234567890);\n\t\tPersonalData data2= new PersonalData(1992,10,19,876543210);\n\t\tPersonalData data3= new PersonalData(1989,04,27,928374650);\n\t\tPersonalData data4= new PersonalData(1993,07,05,819463750);\n\t\tPersonalData data5= new PersonalData(1990,11,03,321678950);\n\t\tPersonalData data6= new PersonalData(1991,11,11,463728190);\n\t\tStudent student1=new Student(\"Ali Cantolu\",5005,50,data1);\n\t\tStudent student2=new Student(\"Merve Alaca\",1234,60,data2);\n\t\tStudent student3=new Student(\"Gizem Kanca\",5678,70,data3);\n\t\tStudent student4=new Student(\"Emel Bozdere\",8902,70,data4);\n\t\tStudent student5=new Student(\"Merter Kazan\",3458,80,data5);\n\n\t\t//A course (let us call it CSE141) with a capacity of 3 is created\n\t\tCourse CSE141=new Course(\"CSE141\",3);\n\n\t\t//Any 4 of the students is added to CSE141.\n\t\tif (!CSE141.addStudent(student1)) System.out.println(student1.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student2)) System.out.println(student2.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student3)) System.out.println(student3.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student4)) System.out.println(student4.toString()+ \" is not added\");\n\n\n\t\t//All students of CSE141 are printed on the screen.\n System.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n CSE141.list();\n\n //The capacity of CSE141 is increased.\n CSE141.increaseCapacity();\n\n //Remaining 2 students are added to CSE141.\n\t \tCSE141.addStudent(student4);\n\t \tCSE141.addStudent(student5);\n\n\t \t//All students of CSE141 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n\t \tCSE141.list();\n\n\t \t//Student with ID 5005 is dropped from CSE141.\n\t \tCSE141.dropStudent(student1);\n\n\t \t//All students of CSE141 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n\t \tCSE141.list();\n\n\t \t//Number of students enrolled to CSE141 is printed.\n\t \tSystem.out.println(\"\\nNumber of students enrolled to \"+CSE141.getCourseName()+\": \" + CSE141.getNumberOfStudents());\n\n\t \t//Birth year of best student of CSE141 is printed on the screen. (You should use getYear() method of java.util.Date class.)\n\t \tSystem.out.println(\"\\nBirth year of best student of CSE141 is \"+CSE141.getBestStudent().getPersonalData().getBirthDate().getYear());\n\n\t \t//A new course (let us call it CSE142) is created.\n\t \tCourse CSE142=new Course(\"CSE142\");\n\n\t \t//All students currently enrolled in CSE141 are added to CSE142. (You should use getStudents() method).\n\t \tStudent[] students = CSE141.getStudents();\n\t \tfor(int i=0;i<CSE141.getNumberOfStudents();i++)\n\t \t\tCSE142.addStudent(students[i]);\n\n\t \t//All students of CSE141 are removed from the course.\n\t \tCSE141.clear();\n\n\t \t//Student with ID 5005 is dropped from CSE141 and result of the operation is printed on the screen.\n\t \tSystem.out.println(\"\\nThe result of the operation 'Student with ID 5005 is dropped from \"+CSE141.getCourseName()+\"' is: \"+CSE141.dropStudent(student1));\n\n\t \t//All students of CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE142.getCourseName()+\": \");\n\t \tCSE142.list();\n\n\t \t//Best student of CSE142 is dropped from CSE142.\n\t \tCSE142.dropStudent(CSE142.getBestStudent());\n\n\t \t//All students of CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE142.getCourseName()+\": \");\n\t \tCSE142.list();\n\n\t \t//GPA of youngest student of CSE142 is printed on the screen.\n\t\tSystem.out.println(\"\\nThe Youngest Student's (\"+CSE142.getYoungestStudent()+\") GPA is \"+CSE142.getYoungestStudent().GPA());\n\n\t \t//Courses CSE141 and CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nCourse Information for \"+CSE141.getCourseName()+\":\\n\" + CSE141.toString());\n\t \tSystem.out.println(\"\\nCourse Information for \"+CSE142.getCourseName()+\":\\n\" + CSE142.toString());\n\t }",
"private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}",
"public static int readScore() {\n try {\n Scanner diskScanner = new Scanner(new File(\"input.txt\"));\n while (diskScanner.hasNextLine()) {\n System.out.println(diskScanner.nextLine());\n }\n diskScanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return 0;\n }",
"public static void main(String[] args) {\n Scanner scan = null;\n try {\n scan = new Scanner(new File(\"src/input.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found.\");\n }\n\n /** Read the minimum degree of B+Tree first */\n\n int degree = scan.nextInt();\n\n BTree bTree = new BTree(degree);\n\n /** Reading the database student.csv into B+Tree Node*/\n List<Student> studentsDB = getStudents();\n\n for (Student s : studentsDB) {\n bTree.insert(s);\n }\n \n long size = (long) studentsDB.size();\n /** Start reading the operations now from input file*/\n try {\n while (scan.hasNextLine()) {\n Scanner s2 = new Scanner(scan.nextLine());\n\n while (s2.hasNext()) {\n\n String operation = s2.next();\n //System.out.println(operation);\n switch (operation) {\n case \"insert\": {\n\n long studentId = Long.parseLong(s2.next());\n String studentName = s2.next() + \" \" + s2.next();\n String major = s2.next();\n String level = s2.next();\n int age = Integer.parseInt(s2.next());\n /** TODO: Write a logic to generate recordID*/\n\n long recordID = ++size;\n\n Student s = new Student(studentId, age, studentName, major, level, recordID);\n bTree.insert(s);\n\n break;\n }\n case \"delete\": {\n long studentId = Long.parseLong(s2.next());\n boolean result = bTree.delete(studentId);\n if (result)\n System.out.println(\"Student deleted successfully.\");\n else\n System.out.println(\"Student deletion failed.\");\n\n break;\n }\n case \"search\": {\n long studentId = Long.parseLong(s2.next());\n long recordID = bTree.search(studentId);\n if (recordID != -1)\n System.out.println(\"Student exists in the database at \" + recordID);\n else\n System.out.println(\"Student does not exist.\");\n break;\n }\n case \"print\": {\n List<Long> listOfRecordID = new ArrayList<>();\n listOfRecordID = bTree.print();\n System.out.println(\"List of recordIDs in B+Tree \" + listOfRecordID.toString());\n break;\n }\n default:\n System.out.println(\"Wrong Operation\");\n break;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static double assistFile() {\n\t\tint assistCount = 0;\n\t\tdouble assistSalary = 0;\n\t\tString professor = \"Unknown\";\n\t\tdouble salary = 0.0;\n\t\topenURL(); //open dataset\n\t\twhile(input.hasNext()) {\n\t\t\tprofessor = input.next();\n\t\t\tprofessor = input.next();\n\t\t\tprofessor = input.next();\n\t\t\tsalary = input.nextDouble();\n\t\t\tif(professor.equals(\"assistant\")) {\n\t\t\t\tassistSalary += salary;\n\t\t\t\tassistCount++;\t\t\t\t\n\t\t\t}\n\t\t\tprofessor = \"assistant\";\n\t\t}\n\t\t//display assistant professor total salary\n\t\tSystem.out.println(\"Total salary for \" + professor+ \" professors is $\" + dF.format(assistSalary));\n\t\t\n\t\treturn assistSalary / assistCount;\n\t\t\n\t}",
"public static void main(String[] args) {\n HashMap<Integer,String> questions = new HashMap<Integer, String>();\n try\n// reading file\n {\n int count = 0;\n File quiz = new File(\"quizzer.txt\");\n Scanner reader = new Scanner(quiz);\n while (reader.hasNextLine())\n {\n questions.put(count,reader.nextLine());\n count++;\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n//asking user for their name\n System.out.println(\"Enter Your name.\");\n String userName = scan.nextLine();\n// generating questions to ask\n int[] questionsToAsk = randomQuestionCollection(5,questions.size()-1);\n int score = 0;\n for(int i=0; i<questionsToAsk.length;i++) {\n String[] splitQuestion = questions.get(questionsToAsk[i]).split(\",\");\n if (askQuestion(splitQuestion) == 1) {\n System.out.println(\"Correct\");\n score++;\n }\n }\n// printing score\n System.out.println(userName+ \" you correctly answered \"+score + \"questions\");\n }",
"public static void main(String[] args) {\n\n\tMiningOptions options = new MiningOptions();\n\tCmdLineParser parser = new CmdLineParser(options);\n\n\ttry {\n\t parser.parseArgument(args);\n\t} catch (CmdLineException e) {\n\t Main.printUsage(e.getMessage(), parser);\n\t return;\n\t}\n\n\t/* Print the help page. */\n\tif (options.getHelp()) {\n\t Main.printHelp(parser);\n\t return;\n\t}\n\n\t/* Parse the file into a list of file pairs. */\n\tSet<Candidate> candidates = new HashSet<Candidate>();\n\n\ttry (BufferedReader br = new BufferedReader(new FileReader(options.getCandidatesFile()))) {\n\t for (String line; (line = br.readLine()) != null;) {\n\n\t\tSystem.out.println(line);\n\t\t;\n\n\t\t/* Parse the line into a Candidate object. */\n\t\tString[] values = line.split(\",\");\n\t\tCandidate candidate = new Candidate(values[0], Integer.parseInt(values[1]),\n\t\t\tvalues[2], new File(options.getSourceDir(), values[3]),\n\t\t\tnew File(options.getSourceDir(), values[4]));\n\n\t\t/*\n\t\t * Add the candidate if it is is not already in the candidate set (we will\n\t\t * re-generate labels for each interesting change).\n\t\t */\n\t\tcandidates.add(candidate);\n\n\t }\n\t} catch (FileNotFoundException e) {\n\t System.err.println(\n\t\t \"FileNotFoundException while reading candidate file: \" + e.getMessage());\n\t e.printStackTrace();\n\t} catch (IOException e) {\n\t System.err.println(\"IOException while reading candidate file: \" + e.getMessage());\n\t e.printStackTrace();\n\t}\n\n\t/*\n\t * Create a pool of threads and use a CountDownLatch to check when all threads\n\t * are done.\n\t */\n\tExecutorService executor = Executors.newFixedThreadPool(options.getNThreads());\n\tCountDownLatch latch = new CountDownLatch(candidates.size());\n\n\t/* Analyze all projects. */\n\tfor (Candidate candidate : candidates) {\n\n\t try {\n\t\t/* Perform the analysis (this may take some time) */\n\t\tCandidateAnalysis candidateAnalysis = new CandidateAnalysis(candidate,\n\t\t\toptions.getOutFile());\n\t\texecutor.submit(new CandidateAnalysisTask(candidateAnalysis, latch));\n\t } catch (Exception e) {\n\t\te.printStackTrace(System.err);\n\t\tlogger.error(\"[IMPORTANT] Project \" + candidate.getURI() + \"/\" + candidate.getFile()\n\t\t\t+ \" threw an exception\");\n\t\tlogger.error(e);\n\t\tcontinue;\n\t }\n\n\t}\n\n\t/* Wait for all threads to finish their work */\n\ttry {\n\t latch.await();\n\t executor.shutdown();\n\t System.out.println(\"All threads finished!\");\n\t} catch (InterruptedException e) {\n\t e.printStackTrace();\n\t return;\n\t}\n\n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tif (args.length == 1) {\n\t\t\t\tcreateGradeEstimatorFromFile(args[0]);\n\t\t\t} else // if there is not one command line\n\t\t\t\tSystem.out.println(Config.USAGE_MESSAGE); // print the message\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found\");\n\t\t} catch (GradeFileFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"public void ask() {\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Please enter a number from 1 to 9\");\n System.out.println(\"1-Start\");\n System.out.println(\"2-Seahorse Valley\");\n System.out.println(\"3-Seahorses\");\n System.out.println(\"4-Seahorse upside-down\");\n System.out.println(\"5-Misiurewicz point\");\n System.out.println(\"6-Part of seahorse tail\");\n System.out.println(\"7-Satellite\");\n System.out.println(\"8-Antenna of satellite\");\n System.out.println(\"9-Seahorse Valley\");\n// System.out.println(\"10-Double spirals\");\n// System.out.println(\"11-Secondorder satellites\");\n// System.out.println(\"12-Imitating Julia sets\");\n// System.out.println(\"13-double-hook\");\n\n String s = Integer.toString(scan.nextInt());\n //changing file name\n setUpFile = \"input\" + s + \".txt\";\n\n System.out.println(\"Thank you. Now, please be patient as MS sets up for your optimal viewing pleasure.\");\n System.out.println(\"Meanwhile, read up here on the Mandelbrot Set: http://mathworld.wolfram.com/MandelbrotSet.html.\");\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"What is your name?\");\n\t\tString userName = input.nextLine();\n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for quizzes.\n\t\tSystem.out.println(userName + \", what is your score for Quiz 1 (out of 100)?\");\n\t\tint quiz1 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 2 (out of 100)?\");\n\t\tint quiz2 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 3 (out of 100)?\");\n\t\tint quiz3 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 4 (out of 100)?\");\n\t\tint quiz4 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 5 (out of 100)?\");\n\t\tint quiz5 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 6 (out of 100)?\");\n\t\tint quiz6 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 7 (out of 100)?\");\n\t\tint quiz7 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 8 (out of 100)?\");\n\t\tint quiz8 = input.nextInt(); \n\t\tSystem.out.println(userName + \", what is your score for Quiz 9 (out of 100)?\");\n\t\tint quiz9 = input.nextInt(); \n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for assignments.\n\t\tSystem.out.println(userName + \", what is your score for Assignment 1 (out of 100)?\");\n\t\tint assignment1 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 2 (out of 100)?\");\n\t\tint assignment2 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 3 (out of 100)?\");\n\t\tint assignment3 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 4 (out of 100)?\");\n\t\tint assignment4 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 5 (out of 100)?\");\n\t\tint assignment5 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 6 (out of 100)?\");\n\t\tint assignment6 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 7 (out of 100)?\");\n\t\tint assignment7 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 8 (out of 100)?\");\n\t\tint assignment8 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 9 (out of 100)?\");\n\t\tint assignment9 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Assignment 10 (out of 100)?\");\n\t\tint assignment10 = input.nextInt();\n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for lab tests.\n\t\tSystem.out.println(userName + \", what is your score for Lab Test 1 (out of 100)?\");\n\t\tint labTest1 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Lab Test 2 (out of 100)?\");\n\t\tint labTest2 = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your score for Lab Test 3 (out of 100)?\");\n\t\tint labTest3 = input.nextInt();\n\t\t\n\t\t// Prompt user to enter integer scores (out of 100) for midterm test and final.\n\t\tSystem.out.println(userName + \", what is your midterm score (out of 100)?\");\n\t\tint midtermTest = input.nextInt();\n\t\tSystem.out.println(userName + \", what is your final exam score (out of 100)?\");\n\t\tint finalExam = input.nextInt();\n\t\tinput.nextLine();\n\t\t\n\t\t// Calculate averages for quizzes, assignments, and lab tests as well as final raw marks\n\t\tdouble averageQuizzes = (quiz1 + quiz2 + quiz3 + quiz4 + quiz5 + quiz6 + quiz7 + quiz8 + quiz9) / 9.0;\n\t\tdouble averageAssignments = (assignment1 + assignment2 + assignment3 + assignment4 + assignment5 + assignment6 + assignment7 + assignment8 + assignment9 + assignment10) / 10.0;\n\t\tdouble averageLabTests = (labTest1 + labTest2 + labTest3) / 3.0;\n\t\tdouble finalRawMarks = (averageQuizzes * 0.18) + (averageAssignments * 0.2) + (averageLabTests * 0.12) + (midtermTest * 0.15) + (finalExam * 0.35);\n\t\t\n\t\t// Prompt user to specify which course is being reported on\n\t\tSystem.out.println(userName + \", which course are you talking about?\");\n\t\tString courseName = input.nextLine();\n\t\t\n\t\t// Display each grading component.\n\t\tSystem.out.println(userName + \", here is your grading report for \" + courseName + \": \");\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Quiz 1: \" + quiz1);\n\t\tSystem.out.println(\"Quiz 2: \" + quiz2);\n\t\tSystem.out.println(\"Quiz 3: \" + quiz3);\n\t\tSystem.out.println(\"Quiz 4: \" + quiz4);\n\t\tSystem.out.println(\"Quiz 5: \" + quiz5);\n\t\tSystem.out.println(\"Quiz 6: \" + quiz6);\n\t\tSystem.out.println(\"Quiz 7: \" + quiz7);\n\t\tSystem.out.println(\"Quiz 8: \" + quiz8);\n\t\tSystem.out.println(\"Quiz 9: \" + quiz9);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Assignment 1: \" + assignment1);\n\t\tSystem.out.println(\"Assignment 2: \" + assignment2);\n\t\tSystem.out.println(\"Assignment 3: \" + assignment3);\n\t\tSystem.out.println(\"Assignment 4: \" + assignment4);\n\t\tSystem.out.println(\"Assignment 5: \" + assignment5);\n\t\tSystem.out.println(\"Assignment 6: \" + assignment6);\n\t\tSystem.out.println(\"Assignment 7: \" + assignment7);\n\t\tSystem.out.println(\"Assignment 8: \" + assignment8);\n\t\tSystem.out.println(\"Assignment 9: \" + assignment9);\n\t\tSystem.out.println(\"Assignment 10: \" + assignment10);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Lab Test 1: \" + labTest1);\n\t\tSystem.out.println(\"Lab Test 2: \" + labTest2);\n\t\tSystem.out.println(\"Lab Test 3: \" + labTest3);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\tSystem.out.println(\"Midterm Test: \" + midtermTest);\n\t\tSystem.out.println(\"Final Exam: \" + finalExam);\n\t\tSystem.out.println(\"-----------------------------------------\");\n\t\t\n\t\t// Display the averages of quizzes, assignments, and lab tests, as well as raw final marks (out of 100)\n\t\tSystem.out.println(\"Average of quizzes: \" + averageQuizzes);\n\t\tSystem.out.println(\"Average of assignments: \" + averageAssignments);\n\t\tSystem.out.println(\"Average of lab tests: \" + averageLabTests);\n\t\tSystem.out.println(\"Final raw marks: \" + finalRawMarks);\n\t\t\n\t\tinput.close();\n\n\t}",
"public static void main(String[] args) {\n\t\tStudent student0 = new Student();\n\t\tStudent student1 = new Student(\"Evlogi Georgiev\", \"Sofia University\", \"International Law\", \"Law\",\n\t\t\t\t\"[email protected]\", \"+359888111222\");\n\n\t\tScanner input = new Scanner(System.in);\n\t\tStudent student2 = new Student();\n\t\t//Gets information for student 2 entered by user\n\t\tSystem.out.println(\"Three names: \");\n\t\tstudent2.setThreeNames(input.nextLine());\n\t\tSystem.out.println(\"University: \");\n\t\tstudent2.setUniversity(input.nextLine());\n\t\tSystem.out.println(\"Course: \");\n\t\tstudent2.setCourse(input.nextLine());\n\t\tSystem.out.println(\"SubjectArea: \");\n\t\tstudent2.setSubjectArea(input.nextLine());\n\t\tSystem.out.println(\"Email: \");\n\t\tstudent2.setEmail(input.nextLine());\n\t\tSystem.out.println(\"Telephone Number: \");\n\t\tstudent2.setTelNumber(input.nextLine());\n\t\tinput.close();\n\t\t\n\t\t//Prints full information for all students using array and foreach loop\n\t\tStudent[] arrStudents = {student0, student1, student2};\n\t\tfor(Student student: arrStudents) {\n\t\t\tstudent.printStudentFullInfo();\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//Prints the number of students, i.e. the number of objects of class Student\n\t\tSystem.out.println(\"Number of students: \" + Student.printNumberOfStudents());\n\n\t}",
"@Test\n public void testAverageGradeSerial() throws FileNotFoundException, IOException {\n List<Tuple> input = getTuplesFromFile(\"mapreduceExamples/courses.txt\");\n \n MapReduceController mr = new MapReduceController();\n \n mr.addJob(input, new Instructions() {\n \n @Override\n public List<Tuple> map(Tuple input) {\n return avgGradeMap(input);\n }\n \n @Override\n public Tuple reduce(List<Tuple> input) {\n return avgGradeReduce(input);\n }\n \n }).executeSerially();\n \n \n List<Tuple> output = mr.gatherResult();\n \n assertEquals(5, output.size());\n for(Tuple tup : output) {\n //System.out.println(tup);\n assertTuple(tup, \"Juggling\", \"90\");\n assertTuple(tup, \"History\", \"86\");\n assertTuple(tup, \"Math\", \"92\");\n assertTuple(tup, \"Science\", \"92\");\n assertTuple(tup, \"English\", \"85\");\n }\n }",
"public static void main(String[] args) throws IOException {\n\n int scoresCount = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n int[] scores = new int[scoresCount];\n\n String[] scoresItems = scanner.nextLine().split(\" \");\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n for (int i = 0; i < scoresCount; i++) {\n int scoresItem = Integer.parseInt(scoresItems[i]);\n scores[i] = scoresItem;\n }\n\n int aliceCount = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n int[] alice = new int[aliceCount];\n\n String[] aliceItems = scanner.nextLine().split(\" \");\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n for (int i = 0; i < aliceCount; i++) {\n int aliceItem = Integer.parseInt(aliceItems[i]);\n alice[i] = aliceItem;\n }\n\n int[] result = climbingLeaderboard(scores, alice);\n for (int i = 0; i < result.length; i++) {\n \tSystem.out.print(result[i]+\" \");\n }\n\n// for (int i = 0; i < result.length; i++) {\n// bufferedWriter.write(String.valueOf(result[i]));\n//\n// if (i != result.length - 1) {\n// bufferedWriter.write(\"\\n\");\n// }\n// }\n//\n// bufferedWriter.newLine();\n//\n// bufferedWriter.close();\n\n scanner.close();\n }",
"public void readFile(File inputFile) throws FileNotFoundException, IOException, ClassNotFoundException {\n\n ArrayList<Student> studentList = null;\n int noOfStudents = 1; int noOfProjects = 0;\n int count = 1;\n String title; String school; String supervisor; Project project = null; \n ArrayList<Project> projectList = new ArrayList<>();\n\n Scanner scan = new Scanner(new FileReader(inputFile));\n String line = null;\n\n while (scan.hasNextLine()) {\n studentList = new ArrayList<>();\n \n if (count == 1) {\n line = scan.nextLine();\n noOfProjects = Integer.parseInt(line);\n System.out.println(line);\n }\n\n line = scan.nextLine();\n String[] projectInfo = line.split(\",\", 5);\n noOfStudents = Integer.parseInt(projectInfo[3]);\n String[] studentInfo = projectInfo[4].split(\",\");\n\n Student student = null;\n \n for (int k = 0; k < studentInfo.length; k+=4) {\n //new Student(AdminNo, Name, Course, Gender)\n student = new Student(studentInfo[k], studentInfo[k+1], studentInfo[k+2], studentInfo[k+3]);\n studentList.add(student); //Add new Student to List\n }\n\n title = projectInfo[0];\n school = projectInfo[1];\n supervisor = projectInfo[2];\n project = new Project(title, school, supervisor, noOfStudents, studentList);\n \n System.out.println(line);\n count++;\n \n projectList.add(project);\n }\n\n for (Student stud: studentList) {\n System.out.println(stud.getAdminNo() + stud.getCourse() + stud.getGender() + stud.getName());\n }\n \n writeToFile(project);\n \n scan.close();\n }",
"public ConfidenceAlignment(String sgtFile,String tgsFile,String sgtLexFile,String tgsLexFile){\r\n\t\r\n\t\tLEX = new TranslationLEXICON(sgtLexFile,tgsLexFile);\r\n\t\t\r\n\t\tint sennum = 0;\r\n\t\tdouble score = 0.0;\r\n\t\t// Reading a GZIP file (SGT) \r\n\t\ttry { \r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(sgtFile)),\"UTF8\"));\r\n\t\t\r\n\t\tString one = \"\"; String two =\"\"; String three=\"\"; \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\r\n\t\t\tgizaSGT.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\r\n\t\t\r\n\t\t// Reading a GZIP file (TGS)\r\n\t\tsennum = 0; \r\n\t\tbr = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(tgsFile)),\"UTF8\")); \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\t\t\t\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\t\t\tgizaTGS.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\t\t\r\n\t\t}catch(Exception e){}\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\t\r\n\t}",
"private void extractNewScoreBoard(){\n if (FileStorage.getInstance().fileNotExist(this, \"FinalScore1.ser\")){\n score = new Score();\n score.addScoreUser(user);\n FileStorage.getInstance().saveToFile(this.getApplicationContext(), score, \"FinalScore1.ser\");\n } else {\n score = (Score) FileStorage.getInstance().readFromFile(this, \"FinalScore1.ser\");\n score.insertTopFive(user);\n FileStorage.getInstance().saveToFile(this, score, \"FinalScore1.ser\");\n }\n }",
"public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(new File(\"prob15.txt\"));\n mining_project mp = new mining_project();\n String ore_type;\n int fuel;\n int weight;\n\n /* Read in beginnig fuel, return_fuel, cargo_size */\n mp.beginning_fuel = scan.nextInt();\n mp.return_fuel = scan.nextInt();\n mp.cargo_size = scan.nextInt();\n\n /*\n \t\t * Read in mine excavation data\n \t\t * We use a sentinal value to stop\n */\n while (true) {\n fuel = scan.nextInt();\n ore_type = scan.next();\n weight = scan.nextInt();\n if ((fuel == 0) && ore_type.equals(\"X\")\n && (weight == 0)) {\n break;\n }\n mp.AddExcavation(fuel, ore_type, weight);\n }\n mp.MineOre();\n }",
"public static void main(String[] args) {\nboolean day=false;\nint date=13;\nboolean monday=true;\nif (day)\n{\n\t\nif(date==13)\n\t\n{\nSystem.out.println(\"you can watch scary movie\");\n}\nelse {\n\t\n\tSystem.out.println(\"watch comedy\");\n\n\n\t}\n}else {\n\tif(monday) {\tSystem.out.println(\"Working\");}else {\n\n\t\n\tSystem.out.println(\"Syntax\");}\n\t\n\t\n\t\n\t\n\t\n\t} System.out.println(\"--------------------------------------------------------\");\n\n\t\n\t\n\t\n\t\n\tboolean assignment=true;\n\tint score=85;\n\tif (assignment)\n\t{\n\t\t\n\t\n\t\tif(score>90) {\n\t\tSystem.out.println(\"Great Job\");\n\n\t\t}\n\t\telse if(score>70) {\n\t\t\tSystem.out.println(\"Good Job\");\n\n\t}else if(score>80) {\n\t\tSystem.out.println(\"Study more\");}\n\t\telse {\t\tSystem.out.println(\"You must study\");\n\n}\n\t}\n\t\telse {\n\t\t\n\t\tSystem.out.println(\"Submit your assignment\");}\n\t\t\t\n\n\t}",
"public static void main(String[] args) {\n\n // Start a new instance of this class, which parses and adds jugglefest.txt to your Lists\n JuggleFestCircuitAssignments assignment = null;\n try {\n assignment = new JuggleFestCircuitAssignments();\n System.err.println(\"Added \" + assignment.jugglers.size() + \" jugglers and \" + assignment.circuits.size() + \" circuits. There will be \" + assignment.MAX_JUGGLERS_PER_CIRCUIT + \" jugglers per circuit.\");\n } catch(FileNotFoundException fnfe) {\n System.err.println(\"Could not find file\");\n }\n\n // For each juggler, add them to the best circuit they can be part of\n for (int i = 0; i < assignment.jugglers.size(); i++) {\n assignment.addJugglerToCircuit(i, assignment.jugglers.get(i).getDesiredCircuits().get(0));\n }\n\n System.err.println(\"\\n\\n ------------------ \\n\\n\");\n for (int i = 0; i < assignment.circuits.size(); i++) {\n System.out.print(\"Circuit \" + i + \" contains: \");\n for (Integer juggler : assignment.circuits.get(i).getJugglersInCircuit()) {\n System.out.print(juggler + \", \");\n }\n System.out.println();\n }\n }",
"public static void main(String[] args) \n\t{\n\t\ttry \n\t\t{\n\t\t\tString inputFileString = \"SSI_Input.csv\"; // args[0]; // // path to the input file\n\t\t\tdouble maximumDistance = 0.17; //Double.parseDouble(args[1]);// // this is the maximum distance of the study area in degrees\n\t\t\t\n\t\t\tFileReader inputFileReader = new FileReader(inputFileString);\n\t\t\tCSVParser csvParser = new CSVParser(inputFileReader, CSVFormat.DEFAULT.EXCEL);\n\t\t\tHashtable<String, Vector<String>> nameCoordinateTable = new Hashtable<>();\n\t\t\t\n\t\t\tfor(CSVRecord csvRecord : csvParser)\n\t\t\t{\n\t\t\t\tString name = csvRecord.get(0);\n\t\t\t\tString[] coords = csvRecord.get(1).split(\"\\\\|\");\n\t\t\t\tVector<String> coordVector = new Vector<>();\n\t\t\t\tfor(int i=0;i<coords.length;i++)\n\t\t\t\t\tcoordVector.add(coords[i]);\n\t\t\t\t\n\t\t\t\tnameCoordinateTable.put(name, coordVector);\n\t\t\t}\n\t\t\tcsvParser.close();\n\t\t\t\n\t\t\t\n\t\t\t// Build a priority queue which will be used to sort place names based on their SSI entropy\n\t\t\tPriorityQueue<NameEntropy> namePriorityQueue = new PriorityQueue<NameEntropy>(new Comparator<NameEntropy>() {\n\t\t\t\tpublic int compare(NameEntropy o1, NameEntropy o2) {\n\t\t\t\t\tif(o1.entropy_sqrt < o2.entropy_sqrt)\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\telse if (o1.entropy_sqrt > o2.entropy_sqrt) \n\t\t\t\t\t\treturn 1;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tEnumeration<String> namesEnumeration = nameCoordinateTable.keys();\n\t\t\twhile(namesEnumeration.hasMoreElements())\n\t\t\t{\n\t\t\t\tString thisCandidateName = namesEnumeration.nextElement();\n\t\t\t\tVector<String> coordinateVector = nameCoordinateTable.get(thisCandidateName);\n\t\t\t\t\n\t\t\t\tif(coordinateVector.size() < 3) continue; // if this name is associated with fewer than 3 points, then remove it\n\t\t\t\t\n\t\t\t\tdouble[][] locationArray = new double[coordinateVector.size()][2];\n\t\t\t\tfor(int i=0;i<coordinateVector.size();i++)\n\t\t\t\t{\n\t\t\t\t\tString thisCoordPair = coordinateVector.get(i);\n\t\t\t\t\tString[] coordInfo = thisCoordPair.split(\" \");\n\t\t\t\t\tdouble thisLng = Double.valueOf(coordInfo[0]);\n\t\t\t\t double thisLat = Double.valueOf(coordInfo[1]);\n\t\t\t\t locationArray[i][0] = thisLng;\n\t\t\t\t locationArray[i][1] = thisLat;\n\t\t\t\t}\n\t\t\n\t\t\t\t// Key step: computing the entropy value using scale-structure identification\n\t\t\t\tHashtable<String, Double> resultHashtable = ScaleStructure.compute(locationArray, maximumDistance, 100000);\n\t\t\t\t\n\t\t\t\tNameEntropy nameEntropy = new NameEntropy(thisCandidateName, resultHashtable.get(\"entropy\"));\n\t\t\t\tnameEntropy.entropy_sqrt = resultHashtable.get(\"entropy_sqrt\");\n\t\t\t\tnameEntropy.entropy_log = resultHashtable.get(\"entropy_log\");\n\t\t\t\tnameEntropy.entropy_count = resultHashtable.get(\"entropy_count\");\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\tnamePriorityQueue.add(nameEntropy);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tOut outputFile = new Out(\"SSI_Output.csv\");\n\t\t\toutputFile.println(\"name,entropy_sqrt,entropy,entropy_log,entropy_count\");\n\t\t\twhile(!namePriorityQueue.isEmpty())\n\t\t\t{\n\t\t\t\tNameEntropy thisNameEntropy = namePriorityQueue.poll();\n\t\t\t\t\n\t\t\t\toutputFile.println(\"\\\"\"+thisNameEntropy.name+\"\\\",\"+thisNameEntropy.entropy_sqrt+\",\"+thisNameEntropy.entropy+\",\"+thisNameEntropy.entropy_log+\",\"+thisNameEntropy.entropy_count);\n\t\t\t}\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public static void main(String[] args) throws FileNotFoundException, IOException {Kollar ifall filen hittas\n //\n try {\n File studentfil = new File(\"studentfil\");\n File betygsfil = new File(\"betygsfil\");\n int antalVgUppgifter = 2;\n\n ArrayList<Student> studenter = lasStudentfil(studentfil, antalVgUppgifter);\n skrivBetygsfil(studenter, betygsfil);\n }catch(FileNotFoundException ex){\n System.out.println(\"Kunde inte hitta filen...\");\n }catch(IOException ex){\n System.out.println(\"Något gick fel...\");\n }\n }",
"public static void main(String[] args) {\n Path inputRatingsPath = new Path(args[0]); //movieid, userid, rating (text files)\n Path job1OutputPath = new Path(\"/user/hduser/partialResults\"); \n Path partialDistancesPath = new Path(\"/user/hduser/partialResults/part-*\"); //member_nonMember \\t partialDistance (sequence files)\n Path candidateMoviesPath = new Path(\"/user/hduser/partialResults/candidateMovies-*\"); //candidateMovieId, nonMemberUserId_rating (text files)\n Path userSimilaritiesPath = new Path(\"/user/hduser/userSimilarities\"); //similarity of each group member to his friends (text files)\n Path finalScoresPath = new Path(args[1]); //movieId \\t outputScore\n \n int numReduceTasks = 56; //defaultValue\n if (args.length == 3) {\n numReduceTasks = Integer.parseInt(args[2]);\n }\n \n final float friendsSimThresh = 0.8f;\n \n String groupFilePath = \"/user/hduser/group.txt\"; //one-line csv file with user ids (text file)\n \n if (args.length < 2 || args.length > 3) {\n System.err.println(\"Incorrect input. Example usage: hadoop jar ~/GroupRecs/MultiUser.jar inputPath outputPath [numReduceTasks]\");\n return;\n }\n \n //JOB 1//\n JobClient client = new JobClient();\n JobConf conf = new JobConf(gr.forth.ics.isl.grouprecsmr.multiuser.MultiUserMain.class);\n \n try {\n FileSystem fs = FileSystem.get(conf);\n if (fs.exists(job1OutputPath)) {\n fs.delete(job1OutputPath, true);\n }\n if (fs.exists(userSimilaritiesPath)) {\n fs.delete(userSimilaritiesPath, true);\n }\n if (fs.exists(finalScoresPath)) {\n fs.delete(finalScoresPath, true);\n }\n } catch (IOException ex) {\n Logger.getLogger(MultiUserMain.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n conf.setJobName(\"Multi-user approach - Job 1\");\n System.out.println(\"Starting Job 1 (Multi-user approach)...\");\n\n conf.setMapOutputKeyClass(VIntWritable.class);\n conf.setMapOutputValueClass(Text.class);\n\n conf.setOutputKeyClass(Text.class);\n conf.setOutputValueClass(ByteWritable.class);\n\n conf.setInputFormat(TextInputFormat.class);\n //conf.setOutputFormat(TextOutputFormat.class);\n conf.setOutputFormat(SequenceFileOutputFormat.class);\n SequenceFileOutputFormat.setOutputCompressionType(conf,\tSequenceFile.CompressionType.BLOCK);\n\n FileInputFormat.setInputPaths(conf, inputRatingsPath); //user ratings\n FileOutputFormat.setOutputPath(conf, job1OutputPath); //partial distances\n \n MultipleOutputs.addNamedOutput(conf, \"candidateMovies\", SequenceFileOutputFormat.class,VIntWritable.class, Text.class); //movieId, userId_rating\n\n conf.setMapperClass(gr.forth.ics.isl.grouprecsmr.job1.Job1Mapper.class);\t\t\n conf.setReducerClass(gr.forth.ics.isl.grouprecsmr.job1.Job1Reducer.class);\n\n conf.setNumReduceTasks(numReduceTasks);\n\n try {\n DistributedCache.addCacheFile(new URI(groupFilePath), conf); // group\t\n } catch (URISyntaxException e1) {\n System.err.println(e1.toString());\n }\n \n conf.setInt(\"mapred.task.timeout\", 6000000);\n \n client.setConf(conf);\n RunningJob job;\n try {\n job = JobClient.runJob(conf);\t\n job.waitForCompletion();\n } catch (Exception e) {\n System.err.println(e);\n }\n \n \n \n //JOB 2//\n System.out.println(\"Starting Job 2 (Multi-user approach)...\");\n JobClient client2 = new JobClient();\n JobConf conf2 = new JobConf(gr.forth.ics.isl.grouprecsmr.multiuser.MultiUserMain.class);\n\n conf2.setJobName(\"Multi-user approach - Job 2\");\n\n conf2.setMapOutputKeyClass(Text.class); //user pair (member_nonMember), where nonMember is in friends\n conf2.setMapOutputValueClass(ByteWritable.class);//similarity part unsquared\n \n conf2.setOutputKeyClass(Text.class); //user pair (member_nonMember), where nonMember is in friends\n conf2.setOutputValueClass(DoubleWritable.class);//similarity\n\n conf2.setInputFormat(SequenceFileInputFormat.class);\n //conf2.setInputFormat(TextInputFormat.class);\n conf2.setOutputFormat(TextOutputFormat.class);\n //conf2.setOutputFormat(SequenceFileOutputFormat.class);\n //SequenceFileOutputFormat.setOutputCompressionType(conf2, SequenceFile.CompressionType.BLOCK);\n\n FileInputFormat.setInputPaths(conf2, partialDistancesPath); //Job 1 output\n FileOutputFormat.setOutputPath(conf2, userSimilaritiesPath); //Job 2 output (similarity of each group member to his friends)\n\n conf2.setMapperClass(IdentityMapper.class);\t\t\n conf2.setReducerClass(gr.forth.ics.isl.grouprecsmr.job2.Job2ReducerMulti.class);\n\n int numSimilaritiesPartitions = numReduceTasks;\n conf2.setNumReduceTasks(numSimilaritiesPartitions);\n\n conf2.setFloat(\"friendsSimThreshold\", friendsSimThresh);\n \n conf2.setInt(\"mapred.task.timeout\", 6000000);\n conf2.set(\"io.sort.mb\", \"500\");\n \n client2.setConf(conf2);\n RunningJob job2;\n try {\n job2 = JobClient.runJob(conf2);\t\n job2.waitForCompletion();\n } catch (Exception e) {\n System.err.println(e);\n }\n \n //JOB 3//\n System.out.println(\"Starting Job 3 (Multi-user approach)...\");\n JobClient client3 = new JobClient();\n JobConf conf3 = new JobConf(gr.forth.ics.isl.grouprecsmr.multiuser.MultiUserMain.class);\n\n conf3.setJobName(\"Multi-user approach - Job 3\");\n\n conf3.setMapOutputKeyClass(VIntWritable.class);\n conf3.setMapOutputValueClass(Text.class);\n \n conf3.setOutputKeyClass(VIntWritable.class);\n conf3.setOutputValueClass(DoubleWritable.class);\n\n conf3.setInputFormat(SequenceFileInputFormat.class);\n //conf3.setInputFormat(TextInputFormat.class);\n conf3.setOutputFormat(TextOutputFormat.class);\n //conf3.setOutputFormat(SequenceFileOutputFormat.class);\n //SequenceFileOutputFormat.setOutputCompressionType(conf3,SequenceFile.CompressionType.BLOCK);\n \n \n try {\n DistributedCache.addCacheFile(new URI(groupFilePath), conf3);\n } catch (URISyntaxException ex) {\n System.err.println(\"Could not add group file to distributed cache. \"+ex);\n }\n for (int i = 0; i < numSimilaritiesPartitions; i++) { \n String reduceId = String.format(\"%05d\", i); //5-digit int with leading\n try {\n DistributedCache.addCacheFile(new URI(userSimilaritiesPath.toString()+\"/part-\"+reduceId), conf3);\n } catch (URISyntaxException ex) {\n System.err.println(\"Could not add similarities files to distributed cache. \"+ex);\n }\n \n }\n \n FileInputFormat.setInputPaths(conf3, candidateMoviesPath); //Job 1 output (candidate movies)\n FileOutputFormat.setOutputPath(conf3, finalScoresPath); //Job 3 output (movie \\t outputScore)\n\n// conf3.setMapperClass(IdentityMapper.class);\t\t\n conf3.setMapperClass(gr.forth.ics.isl.grouprecsmr.job3.Job3MapperMulti.class); //filtering out ratings from non-Friends\n conf3.setReducerClass(gr.forth.ics.isl.grouprecsmr.job3.Job3ReducerMulti.class);\n \n conf3.setInt(\"mapred.task.timeout\", 6000000);\n conf3.set(\"io.sort.mb\", \"500\");\n\n conf3.setNumReduceTasks(numReduceTasks);\n \n client3.setConf(conf3);\n RunningJob job3;\n try {\n job3 = JobClient.runJob(conf3);\t\n job3.waitForCompletion();\n } catch (Exception e) {\n System.err.println(e);\n }\n }",
"public void run() throws FileNotFoundException {\n final String INPUT_PROMPT = \"Please enter the path for the file of employees: \";\n\n final String BEST_PAID_MESSAGE\n = \"\\n\\nThe best-paid employee (and gross pay) is \";\n\n final String NO_INPUT_MESSAGE\n = \"\\n\\nError: There were no employees scanned in.\";\n\n String fileName;\n\n System.out.print(INPUT_PROMPT);\n fileName = new Scanner(System.in).nextLine();\n Scanner sc = new Scanner(new File(fileName));\n\n FullTimeEmployee bestPaid = findBestPaid(sc);\n\n if (bestPaid == null) {\n System.out.println(NO_INPUT_MESSAGE);\n } else {\n System.out.println(BEST_PAID_MESSAGE + bestPaid.toString());\n }\n }",
"public static void main(String[] args) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n System.setProperty(\"current.date\", dateFormat.format(new Date()));\n // set path\n if (args.length > 1) path = args[1];\n // лучше называть каталог с результатами осмысленно :)\n File cfgFile = new File(args[0]);\n PropertyConfigurator.configure(cfgFile.getAbsolutePath());\n \n File[] files = getFilesInDir(path);\n for (File file : files) {\n // среднее считать - за сколько поколений в среднем достигается максимальнй фитнес - проще в расчетах писать и пихать в файл\n try {\n read(file.getAbsolutePath());\n System.out.println(\"Stats: \" + stats.size());\n }catch (IOException ex) { log.info(ex); }\n }\n \n System.out.println(\"bestFitness: \" + bestFitness);\n System.out.println(\"bestFile : \" + bestFile);\n System.out.println(\"bestUrgent : \" + bestUrgent);\n \n for (Integer id : stats.keySet()) {\n Stat stat = stats.get(id);\n //System.out.println(stat);\n //System.out.println(id + \". SumFit: \" + stat.sumFit() + \". SumUrg: \" + stat.sumUrgent());\n //System.out.println(id + \". AvgFit: \" + stat.avgFit() + \". avgUrg: \" + stat.avgUrgent());\n log.info(stat.avgFit() + \" \" + stat.avgUrgent() + \" \" + stat.id());\n }\n }",
"public static void main(String[] args) {\n\t\tStudentListBuilder slb = new StudentListBuilder();\n\t\t//call the buildStudentList method and store the result\n\t\t//in a new StudentList variable.\n\t\tStudentList sl = slb.buildStudentList(\"students.txt\");\n\t\tSystem.out.println(sl.toString());\n\n\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint startGame;\n\n\n\t\t\n\t\tScanner numb = new Scanner(System.in);\n\t\tScanner str = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Please to start enter a username: \");\n\t\tusername = str.nextLine();\n\t\tSystem.out.println(\"\\n\\n\\t\\t\"+username+\", You are welcome to....\\n\\t\\tWho Wins A Million!!\");\n\t\tSystem.out.println(\"\\n\\t\\tPress 1 to enter\\n\\t\\t(Or 0 to quit)\");\n\t\tstartGame = numb.nextInt();\n\t\t\n\t\t\n\t\tif (startGame == 1) {\n\t\t\t\n\t\t\t//if(totalScore >= 0) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"So how well do you know Cameroon ?\\n\\n\");\n\t\t\t\t\n\t\t\t\tquestionNo = 1;\n\t\t\t\tSystem.out.println(questionNo+\". Who is the President of Cameroon? \\n\\na. Maurice Kamto \\tb. Paul Biya \\nc. Cabral Libii \\td. Joshua Oshi\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". How many administrative divisions does Cameroon have ?\\n\\na. 15 \\t\\t\\tb. 12 \\nc. 8 \\t\\t\\td. 10\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". Which of the following is the most populated town ?\\n\\na. Yaounde \\t\\tb. Bafoussam \\nc. Douala \\t\\td. Bamenda\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". When did Cameroon gained its independence ?\\n\\na. 1950 \\t\\tb. 1960 \\nc. 1961 \\t\\td. 1951\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\tquestionNo++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(questionNo+\". What is the total area of Cameroon in square kilometers ?\\n\\na. 475 441 \\t\\tb. 475 442 \\nc. 475 443 \\t\\td. 475 444\");\n\t\t\t\tuserAnswer = str.nextLine();\n\t\t\t\tanswerTest();\n\t\t\t\tquestionScores();\n\t\t\t\tSystem.out.println(\"\\t\\t\\tScore: \"+userScore()+\"\\n\\n\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(\".....................................\");\n\t\t\t\tSystem.out.println(username+\" Statistics\");\n\t\t\t\tSystem.out.println(\".....................................\\n\");\n\t\t\t\tSystem.out.println(\"Total Questions Attempted: \"+questionNo);\n\t\t\t\tSystem.out.println(\"Total Correct Answers: \"+correctQuestions);\n\t\t\t\tSystem.out.println(\"Total Score: \"+totalScore);\n\t\t\t\tSystem.out.println(\"Money obtained: \"+prizeMoney);\n\t\t\t\t\n\t\t\t//}\n\t\t\t\n\t\t\n\t\t}else System.out.println(\"Exiting\");\n\t\t\n\t\tSystem.out.println(\"\\nEnd of the game!\");\n\t}",
"public static void main(String[] args)\n {\n\n // open text file\n File courseFile = new File(\"courses.txt\");\n // open a Scanner to read data from File\n Scanner courseReader = null;\n try\n {\n courseReader = new Scanner(courseFile);\n }\n catch (FileNotFoundException e)\n {\n System.out\n .println(\"No courseList Course found- courseList is empty\");\n }\n\n\n\n // Instantiate the HashMap\n HashMap<Integer, Course> courseHM = new HashMap<>();\n\n\n\n // read the file one course at a time & determine which subject\n // it is before creating an instance of the course and adding it\n // to the HashMap\n while ( courseReader != null && courseReader.hasNext() )\n {\n\n String category = courseReader.nextLine();\n String name = courseReader.nextLine();\n String crnString = courseReader.nextLine();\n Integer crn = Integer.parseInt(crnString);\n\n if ( category.equalsIgnoreCase(\"English\") )\n {\n\n String level = courseReader.nextLine();\n String format = courseReader.nextLine();\n\n // Creates the English course & puts it in the HashMap\n English tempClass = new English(category, name, crn, level, format);\n courseHM.put(crn, tempClass);\n\n }\n else if ( category.equalsIgnoreCase(\"Math\") )\n {\n\n String temp = courseReader.nextLine();\n boolean stem = Boolean.parseBoolean(temp);\n String format = courseReader.nextLine();\n\n // Creates the Math course & puts it in the HashMap\n Math tempClass = new Math(category, name, crn, stem, format);\n courseHM.put(crn, tempClass);\n\n }\n else if ( category.equalsIgnoreCase(\"History\") )\n {\n\n String temp = courseReader.nextLine();\n boolean areaEligible = Boolean.parseBoolean(temp);\n String format = courseReader.nextLine();\n\n // Creates the History course & puts it in the HashMap\n History tempClass = new History(category, name, crn, areaEligible,\n format);\n courseHM.put(crn, tempClass);\n\n }\n else\n {\n System.out.println(\"Unknown Course type \" + category);\n }\n\n }\n\n\n\n\n // iterates through the key set of Integers\n Set<Integer> keySet = courseHM.keySet();\n for (Integer key : keySet)\n {\n Course course = courseHM.get(key);\n System.out.println(key + \" : \" + course.toString());\n }\n\n\n\n }",
"public void printAverageRatings(int minimalRaters) {\n String shortMovieCsv = \"C:/Users/greg/IdeaProjects/capstone-coursera/data/ratedmovies_short.csv\";\n //String shortRatingsCsv = \"/home/greg/IdeaProjects/capstone-coursera/data/ratings_short.csv\";\n String shortRatingsCsv = \"C:/Users/greg/IdeaProjects/capstone-coursera/data/ratings_short.csv\";\n\n //String bigMovieCsv = \"C:/Users/greg/IdeaProjects/capstone-coursera/data/ratedmoviesfull.csv\";\n //String bigMovieCsv = \"/home/greg/IdeaProjects/capstone-coursera/data/ratedmoviesfull.csv\";\n //String bigRatingsCsv = \"C:/Users/greg/IdeaProjects/capstone-coursera/data/ratings.csv\";\n //String bigRatingsCsv = \"/home/greg/IdeaProjects/capstone-coursera/data/ratings.csv\";\n\n SecondRatings secondRatings = new SecondRatings(shortMovieCsv, shortRatingsCsv);\n //SecondRatings secondRatings = new SecondRatings(bigMovieCsv, bigRatingsCsv);\n\n System.out.println(\"Number of movies loaded from file: \" + secondRatings.getMovieSize());\n System.out.println(\"Number of raters loaded from file: \" + secondRatings.getRaterSize());\n\n ArrayList<Rating> ratingArrayList = secondRatings.getAverageRatings(minimalRaters);\n ratingArrayList.sort(Comparator.naturalOrder());\n System.out.println(\"Total of movies with at least \" + minimalRaters + \" raters: \" + ratingArrayList.size());\n for (Rating rating : ratingArrayList) {\n System.out.println(rating.getValue() + \" \" + secondRatings.getTitle(rating.getItem()));\n }\n }",
"public void clustering(String dataFile) throws IOException, InterruptedException{\n\t\t\n\t\tSequenceReader reader;\n\t\tif(dataFile.equals(\"-\"))\n\t\t\treader = SequenceReader.getReader(System.in);\n\t\telse\n\t\t\treader = SequenceReader.getReader(dataFile);\n\t\tSequence seq;\n\t\tString format=\"\";\n\t\tif(print){\n\t\t\tif(reader instanceof FastaReader)\n\t\t\t\tformat=\"fasta\";\n\t\t\telse if (reader instanceof FastqReader)\n\t\t\t\tformat=\"fastq\";\n\t\t\telse \n\t\t\t\tformat=\"out\";\n\t\t\t\n\t\t\tfor(int i=0;i<nSamples;i++){\t\t\n\t\t\t\tstreamToFile[i] = SequenceOutputStream.makeOutputStream(barCodesLeft.get(i).getName()+\".\" +format);\n\t\t\t}\n\t\t\tstreamToFile[nSamples] = SequenceOutputStream.makeOutputStream(\"unknown\"+\".\" +format);\n\n\t\t}\n\n\t\tSequence s5, s3;\n\t\tfinal double[] \tlf = new double[nSamples], //left-forward\n\t\t\t\tlr = new double[nSamples],\t//left-reversed\n\t\t\t\trr = new double[nSamples], //right-reversed\n\t\t\t\trf = new double[nSamples]; //right-forward\n\t\t\n\t\tSWGAlignment \talignmentLF = new SWGAlignment(),\n\t\t\t\t\t\talignmentLR = new SWGAlignment(),\n\t\t\t\t\t\talignmentRF = new SWGAlignment(),\n\t\t\t\t\t\talignmentRR = new SWGAlignment();\n\n\t\tSWGAlignment \tbestLeftAlignment = new SWGAlignment(),\n\t\t\t\t\t\tbestRightAlignment = new SWGAlignment();\n\n\n\n\t\twhile ((seq = reader.nextSequence(Alphabet.DNA())) != null){\n\t\t\tif(seq.length() < barcodeLen*4){\n\t\t\t\tSystem.err.println(\"Ignore short sequence \" + seq.getName());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//alignment algorithm is applied here. For the beginning, Smith-Waterman local pairwise alignment is used\n\n\t\t\ts5 = seq.subSequence(0, SCAN_WINDOW);\n\t\t\ts3 = Alphabet.DNA.complement(seq.subSequence(seq.length()-SCAN_WINDOW,seq.length()));\n\n\n\n\t\t\tdouble bestScore = 0.0;\n\t\t\tdouble distance = 0.0; //distance between bestscore and the runner-up\n\t\t\t\n\t\t\tint bestIndex = nSamples;\n\n\t\t\tfor(int i=0;i<nSamples; i++){\n\t\t\t\tSequence barcodeLeft = barCodesLeft.get(i);\n\t\t\t\tSequence barcodeRight = barCodesRight.get(i); //rc of right barcode sequence\n\n\t\t\t\n\t\t\t\talignmentLF = SWGAlignment.align(s5, barcodeLeft);\n\t\t\t\talignmentLR = SWGAlignment.align(s3, barcodeLeft);\n\t\t\t\talignmentRF = SWGAlignment.align(s5, barcodeRight);\n\t\t\t\talignmentRR = SWGAlignment.align(s3, barcodeRight);\n\t\t\t\t\n\t\t\t\tlf[i] = alignmentLF.getIdentity()/(float)Math.max(barcodeLeft.length(),alignmentLF.getLength());\n\t\t\t\tlr[i] = alignmentLR.getIdentity()/(float)Math.max(barcodeLeft.length(),alignmentLR.getLength());\n\t\t\t\trf[i] = alignmentRF.getIdentity()/(float)Math.max(barcodeRight.length(),alignmentRF.getLength());\n\t\t\t\trr[i] = alignmentRR.getIdentity()/(float)Math.max(barcodeRight.length(),alignmentRR.getLength());\n\t\t\t\t\n\n\t\t\t\tdouble myScore = 0.0;\n\t\t\t\tif(twoends){\n\t\t\t\t\tmyScore = Math.max(lf[i] + rr[i] , lr[i] + rf[i])/2;\n\t\t\t\t}\n\t\t\t\telse{\t\n\t\t\t\t\tmyScore = Math.max(Math.max(lf[i], lr[i]), Math.max(rf[i], rr[i]));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (myScore > bestScore){\n\t\t\t\t\t//LOG.info(\"Better score=\" + myScore);\n\t\t\t\t\tdistance = myScore-bestScore;\n\t\t\t\t\tbestScore = myScore;\t\t\n\t\t\t\t\tbestIndex = i;\n\t\t\t\t\tif(twoends){\n\t\t\t\t\t\tif(lf[i] + rr[i] > lr[i] + rf[i]){\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLF;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRR;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLR;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRF;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(myScore==lf[i] || myScore==rr[i]){\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLF;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRR;\n\t\t\t\t\t\t}else if(myScore==lr[i] || myScore==rf[i]){\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLR;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRF;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if((bestScore-myScore) < distance){\n\t\t\t\t\tdistance=bestScore-myScore;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tString retval=\"\";\n\t\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\t\t\tif(bestScore < SCORE_THRES || distance < DIST_THRES ){\n\t\t\t\t//LOG.info(\"Unknown sequence \" + seq.getName());\n\t\t\t\tretval = \"unknown:\"+Double.valueOf(twoDForm.format(bestScore))+\":\"+Double.valueOf(twoDForm.format(distance))+\"|0-0:0-0|\";\n\t\t\t\tseq.setName(retval + seq.getName());\n\n\t\t\t\tif(print){\n\t\t\t\t\tseq.print(streamToFile[nSamples]);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if the best (sum of both ends) alignment in template sequence is greater than in complement\n\t\t\telse {\n//\t\t\t\tLOG.info(\"Sequence \" + seq.getName() + \" might belongs to sample \" + barCodesLeft.get(bestIndex).getName() + \" with score=\" + bestScore);\n\t\t\t\tif(bestIndex<nSamples){\n\t\t\t\t\tretval = barCodesLeft.get(bestIndex).getName()+\":\"+Double.valueOf(twoDForm.format(bestScore))+\":\"+Double.valueOf(twoDForm.format(distance))+\"|\";\n\t\t\t\t\tint s1 = bestLeftAlignment.getStart1(),\n\t\t\t\t\t\te1 = bestLeftAlignment.getStart1()+bestLeftAlignment.getSequence1().length-bestLeftAlignment.getGaps1(),\n\t\t\t\t\t\te2 = seq.length()-1-bestRightAlignment.getStart1(),\n\t\t\t\t\t\ts2 = seq.length()-1-(bestRightAlignment.getStart1()+bestRightAlignment.getSequence1().length-bestRightAlignment.getGaps1());\n\t\t\t\t\tretval += s1+\"-\"+e1+\":\"+s2+\"-\"+e2+\"|\";\n\t\t\t\t\tseq.setName(retval + seq.getName());\n\t\t\t\t\t\n\t\t\t\t\tif(script && processes[bestIndex]!=null && processes[bestIndex].isAlive())\n\t\t\t\t\t\tseq.print(streamToScript[bestIndex]);\n\t\t\t\t\tif(print)\n\t\t\t\t\t\tseq.print(streamToFile[bestIndex]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(seq.getName());\n\t\t\tprintAlignment(bestLeftAlignment);\n\t\t\tSystem.out.println();\n\t\t\tprintAlignment(bestRightAlignment);\n\t\t\tSystem.out.println(\"\\n==================================================================================\\n\");\n\t\t}\n\n\t\tSystem.out.println(\"Done all input\");\n\t\tfor (int i = 0; i < nSamples;i++){\n\t\t\tif(script && processes[i]!=null && processes[i].isAlive()){\n\t\t\t\tstreamToScript[i].close();\n\t\t\t\tprocesses[i].waitFor();\n\t\t\t}\n\t\t\tif(print)\n\t\t\t\tstreamToFile[i].close();\n\t\t}\n\t\tif(print)\n\t\t\tstreamToFile[nSamples].close();\n\t\tSystem.out.println(\"Done every thing\");\n\t\treader.close();\n\t}",
"public static void main(String[] args) {\n\t\tStudent s = new Student();\n\t\t\n\t\tint x = 1;\n\t\tint ch;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\n\\n1. Create Database\" + \"\\n2. Display Database\" + \"\\n3. Search Records\" + \"\\n4. Modify Records\" + \"\\n5. Clear Records\" + \"\\n6. Delete file\" + \"\\n7. Exit\");\n\t\t\tSystem.out.println(\"Enter Choice:: \");\n\t\t\tch = sc.nextInt();\n\t\t\t\n\t\t\tswitch(ch) {\n\t\t\n\t\t\t\t\n\t\t\tcase 1:\n\t\t\t\ts.create();\n//\t\t\t\ts.write();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\ts.display();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\ts.search();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\ts.modify();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\ts.clearRecords();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\ts.delete();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 7:\n\t\t\t\tx = 1;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Invalid choice!\");\n\t\t\t\t\n\t\t\t}\n\t\t}while(x==1);\n\t}",
"public static void main(String args[]) throws IOException {\n\t\tProcessData ged = new ProcessData(); \r\n\t\tged.readFile(\"My Family.ged\"); \r\n\t\t\r\n\t\t// output result for sprint 1, sprint 2, sprint 3 and sprint 4 to output.txt file\r\n\t\tVector<String> s = new Vector<String>();\r\n\t\t\r\n\t\t// get the individuals data\r\n\t\ts.add(\"Individuals Info:\");\r\n\t\ts.addAll(ged.print_individual());\r\n\t\tPrintWriter writer = new PrintWriter(\"Output.txt\", \"UTF-8\");\r\n\t\twhile(s.size()>0)\r\n\t\t{\r\n\t\t writer.write(s.firstElement());\r\n\t\t writer.println();\r\n\t\t s.removeElementAt(0);\r\n\t\t}\r\n\t\ts.add(\"\");\r\n\t\ts.add(\"\");\r\n\t\ts.add(\"\");\r\n\t\t\r\n\t\t// get the family data\r\n\t\ts.add(\"Family Info\");\r\n\t\ts.addAll(ged.print_family());\r\n\t\twhile(s.size()>0)\r\n\t\t{\r\n\t\t writer.write(s.firstElement());\r\n\t\t writer.println();\r\n\t\t s.removeElementAt(0);\r\n\t\t}\t\t\t\r\n\t\tSystem.out.println(\"Result is printed to Output.txt file.\");\r\n\t\twriter.close();\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tFile f11 = new File(\"Usama's 1st file.txt\");\n\t\t\tScanner myReader = new Scanner(f11);\n\t\t\t\n\t\t\twhile(myReader.hasNextLine())\n\t\t\t{\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tSystem.out.println(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An unexpected error has been occured! :(\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\ttry {\r\n\t\tString inputfile = args[0]+\".txt\";\r\n\t\tString outputfile = args[1]+\".txt\";\r\n\t\tString outputfile2 = args[2]+\".txt\";\r\n\r\n\r\n\r\n\t\tFileInputStream textFile1 = new FileInputStream(inputfile);\r\n\t\tScanner scan = new Scanner(textFile1);\r\n\t\tBinaryTree bst = new BinaryTree();\r\n\t\t\r\n\t\t//reading input files and storing\r\n\t\twhile(scan.hasNextLine()){\r\n\t\t\t\r\n\t\tString s = scan.nextLine();\r\n\t\tchar code=s.charAt(0);\r\n\t\tint id = Integer.parseInt(s.substring(1, 8));\r\n\t\t\tString nah=s.substring(8,8+25);\r\n\t\t\tString name= nah.trim();\r\n\t\t\tString department=s.substring(33,37);\r\n\t\t\tString program=s.substring(37,40);\r\n\t\t\tchar year=s.charAt(41);\r\n\t\t\tNode n= new Node();\r\n\t\t\tStudent stu = new Student();\r\n\t\t\tn.code=code;\r\n\t\t\tstu.id=id;\r\n\t\t\tstu.name=name;\r\n\t\t\tstu.department=department;\r\n\t\t\tstu.program=program;\r\n\t\t\tstu.year=year;\r\n\t\t\tif(code=='I')\r\n\t\t\t\tbst.insert(stu);\r\n\t\t\telse if(code=='D')\r\n\t\t\t\tbst.deleteKey(stu);\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Wrong code detected in input file. Should be I or D\");\r\n\t\t\t//System.out.println(\"Code: \" + code + \" ID: \" + stu.id + \" Name: \" + stu.name+ \" Dep: \" + stu.department + \" Program: \" + stu.program + \" Year: \"+ stu.year);\r\n\t\t}\r\n\t\t //Just changing the Stream so it will print to a file instead of console.\r\n\t\t PrintStream printStream = new PrintStream(new FileOutputStream(outputfile));\r\n\t\t System.setOut(printStream);\r\n\t\t System.out.println(\"\\nInorder traversal of binary tree is \");\r\n\t\t System.out.println(String.format(\"%-10s %-7s %-4s %-4s %-4s \",\"Name\",\" ID\",\"Department\",\"Program\",\"Year\"));\r\n\t\t bst.printInorder(outputfile);\r\n\t\t PrintStream printStream2 = new PrintStream(new FileOutputStream(outputfile2));\r\n\t\t System.setOut(printStream2);\r\n\t\t System.out.println(\"\\nBreadthFirst traversal of binary tree is \");\r\n\t\t System.out.println(String.format(\"%-10s %-7s %-4s %-4s %-4s \",\"Name\",\" ID\",\"Department\",\"Program\",\"Year\"));\r\n\t\t bst.printLevelOrder(outputfile2);\r\n\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"usage\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\r\n\t}",
"public static void main(String[] args) {\n\t\tString filename = \"C:/Users/Myky/Documents/EDAN55/Independent Set/g30.txt\";\n\t\tint[][] adjMatrix = readFile(filename);\n\t\tCounter counter = new Counter(0);\n\t\tint MIS = run(adjMatrix);\n\t\tprint(MIS);\n\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t// Creation of the constructor nqMarkScheme with parameters 198 and 6 of the class NumericalQuestion.\r\n\t\tNumericalQuestion nqMarkScheme = new NumericalQuestion(198, 6);\r\n\t\t\r\n\t\t// Creation of the constructor bqMarkScheme with parameters true and 1 of the class BooleanQuestion.\r\n\t\tBooleanQuestion bqMarkScheme = new BooleanQuestion(true, 1);\r\n\t\t\r\n\t\t// Creation of the constructor mcpMarkScheme with parameters false, false, false and 3 of the class MultipleChoiceQuestion.\r\n\t\tMultipleChoiceQuestion mcpMarkScheme = new MultipleChoiceQuestion(false, false, false, 3);\r\n\t\t\r\n\t\t// Creation of the constructor markScheme with parameters nqMarkScheme, bqMarkScheme and mcpMarkScheme of the class Exam.\r\n\t\tExam markScheme = new Exam(nqMarkScheme, bqMarkScheme, mcpMarkScheme);\r\n\t\t\r\n\t\t// Creation of the constructor nqAttempt with parameters 196 and 0 of the class NumericalQuestion.\r\n\t\tNumericalQuestion nqAttempt = new NumericalQuestion(196, 0);\r\n\t\t\r\n\t\t// Creation of the constructor bqAttempt with parameters true and 0 of the class BooleanQuestion.\r\n\t\tBooleanQuestion bqAttempt = new BooleanQuestion(true, 0);\r\n\t\t\r\n\t\t// Creation of the constructor mcpAttempt with parameters false, false, false and 0 of the class MultipleChoiceQuestion.\r\n\t\tMultipleChoiceQuestion mcpAttempt = new MultipleChoiceQuestion(false, false, false, 0);\r\n\t\t\r\n\t\t// Creation of the constructor examAttempt with parameters nqAttempt, bqAttept and mcpAttempt of the class Exam.\r\n\t\tExam examAttempt = new Exam(nqAttempt, bqAttempt, mcpAttempt);\r\n\t\t\r\n\t\t// Creation of the object examMarker of the class Marker.\r\n\t\tMarker examMarker = new Marker();\r\n\t\t\r\n\t\t// Calling the method markAttempt using the object examMarker and passing examAttempt and markScheme as parameters. \r\n\t\texamMarker.markAttempt(examAttempt, markScheme);\r\n\t\t\r\n\t\t// Declaration and calculation of the variable mark, by adding together the mark of each of the three questions.\r\n\t\tint mark = examAttempt.getTotalMark();\r\n\t\t\r\n\t\t// Outputs the marks that the student has taken, out of the maximum available marks of the first question.\r\n\t\tSystem.out.println(\"Question1: \" + examMarker.getQuestion1Mark() + \" out of \" + nqMarkScheme.getMark());\r\n\t\t// Outputs the marks that the student has taken, out of the maximum available marks of the second question.\r\n\t\tSystem.out.println(\"Question2: \" + examMarker.getQuestion2Mark() + \" out of \" + bqMarkScheme.getMark());\r\n\t\t// Outputs the marks that the student has taken, out of the maximum available marks of the third question.\r\n\t\tSystem.out.println(\"Question3: \" + examMarker.getQuestion3Mark() + \" out of \" + mcpMarkScheme.getMark());\r\n\t\t\r\n\t\t// Output the total marks the student has taken.\r\n\t\tSystem.out.println(\"Total Mark awarded: \" + mark);\r\n\t\t\r\n\t\t// Calculates and prints the classification of the student based on their total mark.\r\n\t\tSystem.out.println(\"Classification: \" + examMarker.convertMarksToClassification(mark, 9, 7, 6));\r\n\t\r\n\t\t\r\n\t}",
"public void highscore()\n {\n FileReader filereader;\n \n PrintWriter writer;\n ArrayList<PersonDate> hsp = new ArrayList<PersonDate>();\n \n\n try{\n if(totalScore>lowestHighscore() || (int)timer3>lowestHighscore())\n {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yy\");\n Date date = new Date();\n String r = dateFormat.format(date);\n \n \n JOptionPane.showMessageDialog(null,\"New high score!\");\n String name = JOptionPane.showInputDialog(\"Please enter name\");\n while(name == null)\n {\n name = JOptionPane.showInputDialog(\"Please enter name\");\n }\n while(name.length() > 18)\n name = JOptionPane.showInputDialog(null,\"Name too long\\nPlease enter your name\");\n while(name.length()==0)\n name = JOptionPane.showInputDialog(\"Please enter name\");\n //if(name == null)\n //{\n //resetSettings();\n //System.exit(0);\n \n //}\n String[] invalidchar = {\"~\",\"`\",\"!\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"=\",\"+\",\"-\",\"_\",\":\",\";\",\"|\",\"?\",\"<\",\">\",\"/\",\"'\",\"[\",\"]\",\"{\",\"}\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\",\".\",\",\"};\n String[] bannedWords ={\"fuck\",\"shit\",\"asshole\",\"bitch\",\"nigger\",\"nigga\",\"cunt\",\"cock\",\"douche\",\"fag\",\"penis\",\"pussy\",\"whore\"};\n for(int i =0; i<invalidchar.length;i++)\n {\n if(name.contains(invalidchar[i]))\n {\n name = JOptionPane.showInputDialog(\"Invalid name, please only use letters\\nPlease enter name\");\n i = -1;\n }\n }\n for(int i =0; i<bannedWords.length;i++)\n {\n \n if(name.replaceAll(\"\\\\s+\",\"\").toLowerCase().contains(bannedWords[i]))\n {\n name = JOptionPane.showInputDialog(\"No potty mouth\\nPlease enter name\");\n i = -1;\n }\n }\n PersonDate p1;\n if(!modeT)\n p1 = new PersonDate(name,totalScore,r);\n else\n p1 = new PersonDate(name,(int)timer3,r);\n filereader = new FileReader(getLevel());\n BufferedReader bufferedreader = new BufferedReader(filereader);\n \n \n \n String line = bufferedreader.readLine();\n \n while(line!=null)\n {\n //hslist.add(Integer.parseInt(line.split(\":\")[1]));\n hsp.add(new PersonDate(line.split(\":\")[0],Integer.parseInt(line.split(\":\")[1]),line.split(\":\")[2]));\n line = bufferedreader.readLine();\n }\n hsp.add(p1);\n \n //sort it\n sort(hsp);\n \n \n //delete last thing\n hsp.remove(hsp.size()-1);\n \n //rewrite doc\n writer = new PrintWriter(new File(getLevel()));\n for(PersonDate p:hsp)\n {\n writer.println(p);\n }\n writer.close();\n \n //displayhs();\n \n }\n }\n catch(IOException e)\n {\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tList<String> lines = Files.readAllLines(Paths.get(\"studenti2.txt\"));\n\t\tList<StudentRecord> records = convert(lines);\n\t\tSystem.out.println(\"Broj studenata: \" + records.size());\n\t\t\n\t\t//1\n\t\tlong broj = vratiBodovaViseOd25(records);\n\t\tSystem.out.println(\"Broj studenata cija je suma bodova > 25 je \" + broj);\n\t\t\n\t\t//2\n\t\tlong broj5 = vratiBrojOdlikasa(records);\n\t\tSystem.out.println(\"Broj studenata cija je ocjena \" + 5 + \" je \" + broj5);\n\t\t\n\t\t//3\n\t\tint odlican = 5;\n\t\tList<StudentRecord> odlikasi = vratiListuOdlikasa(records);\n\t\tSystem.out.println(\"Broj odlikasa je: \" + odlikasi.size());\n\t\t//4\n\t\tList<StudentRecord> odlikasiSortirano = vratiSortiranuListuOdlikasa(records);\n\t\t\n\t\todlikasiSortirano.forEach(o -> System.out.println(o));\n\t\t\n\t\t//5\n\t\tList<String> nepolozeniJMBAGovi = vratiPopisNepolozenih(records);\n\t\t\n\t\tnepolozeniJMBAGovi.forEach(o -> System.out.println(o));\n\t\t\n\t\t//6\n\t\tMap<Integer, List<StudentRecord>> mapaPoOcjenama = razvrstajStudentePoOcjenama(records);\n\t\t\n\t\tSystem.out.println(mapaPoOcjenama.get(odlican).size());\n\t\n\t\t//7\n\t\tMap<Integer, Integer> mapaPoOcjenama2 = records.stream()\n\t\t\t\t.collect(Collectors\n\t\t\t\t\t\t.toMap(StudentRecord::getOcjena, o -> 1, (o1, o2) -> o1 + 1));\n\t\t\n\t\tmapaPoOcjenama2.entrySet().stream()\n\t\t\t\t.sorted((o1, o2) -> o1.getKey()\n\t\t\t\t\t\t.compareTo(o1.getKey()))\n\t\t\t\t.forEach(System.out::println);;\n\t\t\n\t\t\n\t\t//8\n\t\tMap<Boolean, List<StudentRecord>> prolazNeprolaz = razvrstajProlazPad(records);\n\t\t\n\t\tSystem.out.println(\"Broj padova je \" + prolazNeprolaz.get(false).size());\n\t\t}",
"public static void main()\n {\n float m= 0;\n Scanner sc= new Scanner(System.in);\n System.out.println(\"Enter name of the student\");\n String name= sc.nextLine();\n System.out.println(\"Enter the student's roll no.\");\n int roll= sc.nextInt();\n System.out.println(\"Enter the marks of 5 subjects(Press enter after each)\");\n for(int i=1;i<=5; i++)\n {\n float m1= sc.nextFloat();\n m= m+m1;\n }\n m= (m/5);\n System.out.println(\"Student's name: \"+ name);\n System.out.println(\"Roll no.: \"+ roll);\n String stream= \"\";\n if(m>=90)\n {\n stream= \"Science with Computers\";\n }\n else if(m>=80 && m<=89)\n {\n stream= \"Science without Computers\";\n }\n else if(m>=70 && m<=79)\n {\n stream= \"Commerce with Maths\";\n }\n else if(m>=60 && m<=69)\n {\n stream= \"Commerce without Maths\";\n }\n else\n {\n stream= \"Invalid Values\";\n }\n System.out.println(stream);\n System.out.println();\n }",
"public static void main(String[] args) {\n\t\tScanner DhakaCollege =new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"This Student Got : \");\n\t\tint marks;\n\t\t\t\tmarks=DhakaCollege.nextInt();\n\t\t\n\t\tswitch (marks) {\n\t\tcase 750:\n\t\t\tSystem.out.println(\"Star Marks.Congratulation!\");\n\t\t\tbreak;\n\t\tcase 600:\n\t\t\tSystem.out.println(\"First Divition Marks.Best of Luck!\");\n\t\t\tbreak;\n\t\tcase 599:\n\t\t\tSystem.out.println(\"Second Divition Marks.Good Luck!\");\n\t\t\tbreak;\n\t\tcase 449:\n\t\t\tSystem.out.println(\" Third Divition Marks.Bad Luck!\");\n\t\t\tbreak;\n\t\tcase 359:\n\t\t\tSystem.out.println(\"Fail Marks.Try Again!\"); // not completed the program. because need to know 359-449 how to write? cte...\n\t\t\tbreak; }\n\t\t\n\t\t\t}"
] | [
"0.63413715",
"0.6270564",
"0.6188552",
"0.61821073",
"0.6150732",
"0.613973",
"0.61103356",
"0.60469985",
"0.6037532",
"0.594287",
"0.5936674",
"0.59228367",
"0.58466995",
"0.5831503",
"0.58115876",
"0.5811013",
"0.5808632",
"0.5804203",
"0.5790236",
"0.57815874",
"0.5775973",
"0.57622325",
"0.57603425",
"0.57498646",
"0.5732556",
"0.5727295",
"0.5723318",
"0.56879836",
"0.56664443",
"0.56592596",
"0.5652885",
"0.565218",
"0.5648042",
"0.56469387",
"0.5644152",
"0.56412274",
"0.5632957",
"0.56203103",
"0.5601245",
"0.5593029",
"0.55586517",
"0.5555464",
"0.5546162",
"0.5530404",
"0.5522855",
"0.5514087",
"0.5509396",
"0.55030555",
"0.5499646",
"0.5494203",
"0.549159",
"0.5485642",
"0.5477654",
"0.5471443",
"0.5466287",
"0.5460694",
"0.54605883",
"0.5460321",
"0.5458995",
"0.54529065",
"0.54462135",
"0.5444987",
"0.544063",
"0.54399586",
"0.5438532",
"0.54357725",
"0.5427832",
"0.54248023",
"0.5418937",
"0.54188913",
"0.54071695",
"0.5399397",
"0.53810954",
"0.5379298",
"0.5378734",
"0.53670275",
"0.5358651",
"0.5355559",
"0.53505",
"0.534768",
"0.5338893",
"0.5335145",
"0.5331734",
"0.53305733",
"0.5322186",
"0.5320923",
"0.53194696",
"0.53187144",
"0.531496",
"0.53146744",
"0.5313165",
"0.5310644",
"0.5305579",
"0.5304825",
"0.530457",
"0.53043085",
"0.53027946",
"0.53022903",
"0.5299592",
"0.52975297"
] | 0.7521482 | 0 |
Load student list from file. | private static List<Student> loadStudentList(File file) throws IOException {
return loadStudentList(new FileInputStream(file));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ArrayList<Student> loadListOfStudents(String fileName) {\n ArrayList<Student> students = new ArrayList<>();\r\n String str = TextReader.StringFromFile(fileName);//Uses the method that returns a complete string with newlines for each studentline.\r\n if (validateInput(str)) {//Uses the validation method to check that the input is valid.\r\n String[] lines = str.split(\"\\n\");\r\n String[] lineParameters;\r\n int countFor = 0;\r\n for (String line : lines) {\r\n if(countFor > 1){\r\n lineParameters = line.split(\",\");\r\n Vote vote = new Vote(new Subject(lineParameters[1]), new Subject(lineParameters[2]), new Subject(lineParameters[3]), new Subject(lineParameters[4]));\r\n Student newStudent = new Student(lineParameters[0], vote);\r\n students.add(newStudent);\r\n }\r\n countFor++;\r\n }\r\n }\r\n\r\n return students;\r\n }",
"public void read() {\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(\"studentData.dat\");\n\n\t\t\tObjectInputStream ois;\n\t\t\ttry {\n\t\t\t\tois = new ObjectInputStream(fis);\n\t\t\t\ttry {\n\t\t\t\t\tstudentList = (ArrayList<Student>) ois.readObject();\n\t\t\t\t} catch (ClassNotFoundException 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\tois.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public List<Student> importStudent(String filename) throws FileNotFoundException {\n List<Student> students = new ArrayList<>();\n FileReader fileReader = new FileReader(DATA_PATH + filename);\n Scanner scanner = new Scanner(fileReader);\n //skip first line\n String firstLine = scanner.nextLine();\n Log.i(\"first line: \" + firstLine);\n\n while (scanner.hasNextLine()) {\n String[] s = scanner.nextLine().split(\",\");\n String fullName = s[0];\n int yearLevel = Integer.parseInt(s[1]);\n Student student = new Student(fullName, yearLevel);\n students.add(student);\n }\n\n scanner.close();\n return students;\n }",
"public void importStudents(String fileName) throws FileNotFoundException\n {\n Scanner inf = new Scanner(new File(fileName));\n while(inf.hasNextLine())\n {\n String first = inf.nextLine();\n String last = inf.nextLine();\n String password = inf.nextLine();\n String p1 = inf.nextLine();\n String p2 = inf.nextLine();\n String p3 = inf.nextLine();\n String p4 = inf.nextLine();\n String p5 = inf.nextLine();\n String p6 = inf.nextLine();\n String p7 = inf.nextLine();\n String p8 = inf.nextLine();\n \n students.add(new Student(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8, this));\n }\n }",
"public static String loadStudentList() {\n\n // Variable used to organize code and allow buffered reader to close\n String bufferedStudentList = \" \"; \n\n // The try...catch block handles the possible error that may occur if \n // there was an issue with accessing the file. \n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(Constants.STUDENT_LIST));\n bufferedStudentList = bufferedReader.readLine();\n bufferedReader.close();\n } catch (IOException exception) {\n System.out.println(exception);\n } \n return bufferedStudentList; \n }",
"public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}",
"static List<Student> loadStudentList(InputStream in) {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))\n .lines()\n .skip(1)\n .map(Student::fromCsv)\n .collect(Collectors.toList());\n }",
"public void loadDataFromFile(String name) throws FileNotFoundException {\n\t\tFileReader reader = new FileReader(name);\n\t\tScanner in = new Scanner(reader);\n\t\twhile(in.hasNextLine()) {\n\t\t\tString readName = \"\";\n\t\t\tString readScore = \"\";\n\t\t\tint intScore = 0;\n\t\t\treadName = in.nextLine();\n\t\t\treadScore = in.nextLine();\n\t\t\ttry {\n\t\t\tintScore = Integer.parseInt(readScore);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tSystem.out.println(\"Incorrect format for \" + readName + \" not a valid score: \" + readScore);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstudents.add(new Student(readName,intScore));\n\t\t}\n\t}",
"public static ArrayList<Student> read(String filename){\n\t\t\n\t\tArrayList<Student> students = new ArrayList<>();\n\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.contains(\" \")){\n\t\t\t\t\tstudents.add(new Student(getGpaFromLine(line), getSatFromLine(line)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn students;\n\t}",
"private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}",
"static Student[] readStudentsFromFile(String filename, int num) {\n\t\ttry (Scanner in = new Scanner(new File(filename))) {\n\t\t\tStudent[] students = new Student[num];\n\t\t\tint index = 0; //prevents ArrayIndexOutOfBounds\n\t\t\tString line;\n\t\t\tString[] input;\n\n\t\t\twhile (in.hasNextLine()) {\n\t\t\t\tline = in.nextLine();\n\t\t\t\tinput = line.split(\",\"); //Splits each String input by the character ','\n\t\t\t\tstudents[index++] = new Student(input[0], Integer.parseInt(input[1]), input[2]);\n\t\t\t}\n\t\t\treturn students;\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"private static boolean loadStudents() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(STUDENTS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a student\n\t\t\n\t\tString line = reader.readLine(); //read the properties of each student in the students.txt file\n\t\t/*read students.txt file, set the input for each studentDetails object and add each StudentDetails object to ALL_STUDENTS ArrayList*/\n\t\twhile(line != null){\n\t\t\tStudentDetails student = new StudentDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each StudentDetails object are separated by tab spaces in the students.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setStudentInput(i, details[i], student)){ //checks if there was an error in setting the StudentDetails object's properties with the values in the students.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Students\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tALL_STUDENTS.add(student);\n\t\t\t/*Add Students who have been fined (total fine > 0) to the FINED_STUDENTS Hashtable*/\n\t\t\taddFinedStudentsToTable(student);\n\t\t\tline = reader.readLine();\n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Students - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}",
"public void load(){\n\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open Streams\n\t\t\tFileInputStream inFile = new FileInputStream(\"user.ser\");\n\t\t\tObjectInputStream objIn = new ObjectInputStream(inFile);\n\t\t\t\n\t\t\t// Load the existing UserList at the head\n\t\t\tthis.head = (User)objIn.readObject();\n\t\t\t\n\t\t\t// Close Streams\n\t\t\tobjIn.close();\n\t\t\tinFile.close();\n\t\t}\n\n\t\tcatch(Exception d) {\n\t\t System.out.println(\"Error loading\");\n\t\t}\n\n\t}",
"public void loadStaffList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxStaff = Integer.parseInt(in.readLine());\n staffList = new Staff[maxStaff];\n int numStaffInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numStaffInFile; i++){\n \n String staffType = in.readLine();\n if (staffType.equals(\"Labourer\")) {\n staffList[i] = new Labourer(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()));\n numStaff++;\n } else if (staffType.equals(\"Manager\")) /*;*/\n {\n staffList[i] = new Manager(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()));\n numStaff++;\n }\n }\n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n \n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }",
"private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }",
"private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }",
"private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }",
"private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}",
"public void loadStudents(File filePath){\r\n Index.resetIndex();\r\n List<Student> students = DataConvert.loadStudentsDataFromCSV(filePath);\r\n List<String> errorMessage = new ArrayList<>();\r\n students.forEach(student -> {\r\n try{\r\n addStudent(student);\r\n } catch (ValidationException ex){\r\n errorMessage.add(\"=========================================\\n\");\r\n errorMessage.add(student.toString() + \" - \" + ex.getMessage());\r\n errorMessage.add(\"=========================================\\n\");\r\n }\r\n });\r\n if(!errorMessage.isEmpty()){\r\n String error = errorMessage.stream().reduce(\"\", (s1, s2)-> s1 += s2);\r\n throw new ValidationException(error);\r\n }\r\n }",
"private ObservableList<Saucer> loadSaucers(){\r\n try {\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileInputStream fis = new FileInputStream(file);\r\n ObjectInputStream input = new ObjectInputStream(fis);\r\n List<Saucer> list = (List<Saucer>) input.readObject();\r\n ObservableList<Saucer> saucers = FXCollections.observableArrayList(list);\r\n\r\n return saucers;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return null;\r\n }\r\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\"})\n\tpublic static ArrayList<StudentCourse> initStudentCourses() throws IOException, ParseException {\n\t\t// read String from text file\n\t\tArrayList<String> stringArray = (ArrayList) IO.read(Main.studentcoursepath.toString());\n\t\t\t\n\t\tif (stringArray.size() == 0){\n\t\t\treturn new ArrayList<StudentCourse>();\n\t\t}\n for (int i = 0 ; i < stringArray.size() ; i++) {\n\t\t\t\tString field = (String) stringArray.get(i);\n\n\t\t\t\t// get individual 'fields' of the string separated by SEPARATOR\n\t\t\t\t// pass in the string to the string tokenizer using delimiter \",\"\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(field, SEPARATOR);\n\n\t\t\t\t//first to fifth tokens\n\t\t\t\tString userID = tokenizer.nextToken().trim();\n\t\t\t\tString userName = tokenizer.nextToken().trim();\n\t\t\t\tString courseID = tokenizer.nextToken().trim();\n\t\t\t\tint indexID = Integer.parseInt(tokenizer.nextToken().trim());\n\t\t\t\tString registerStatus = tokenizer.nextToken().trim();\n\n\t\t\t\t// create Course object from file data\n\t\t\t\tStudentCourse course = new StudentCourse(userID, userName, courseID, indexID, registerStatus);\n\t\t\t\t// add to Courses list\n\t\t\t\tstudentCourseList.add(course) ;\n\t\t}\n\t\treturn studentCourseList ;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Student> retrieveAllStudentObjects() {\r\n\t\tList<Student> listOfStudents = new ArrayList<Student>();\r\n\r\n\t\ttry {\r\n\t\t\tlistOfStudents = readSerializedObject();\r\n\r\n\t\t\tif (listOfStudents == null) {\r\n\t\t\t\tSystem.out.println(\"Unable to read from file!\");\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn listOfStudents;\r\n\t}",
"public void readFileContent(String path) {\n\t\ttry (FileReader fr = new FileReader(path); BufferedReader br = new BufferedReader(fr);) {\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tStudent student = this.convertStringToStudent(line);\n\t\t\t\tthis.addStudent(student);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"File read failed.\", e);\n\t\t}\n\t}",
"public void fillFromFile()\n\t{\n\t\tJFileChooser fc = new JFileChooser();\t//creates a new fileChooser object\n\t\tint status = fc.showOpenDialog(null);\t//creates a var to catch the dialog output\n\t\tif(status == JFileChooser.APPROVE_OPTION)\t\n\t\t{\n\t\t\tFile selectedFile = fc.getSelectedFile ( );\n\t\t\tthis.fileName = selectedFile;\n\t\t\tScanner file = null; //scans the file looking for information to load\n\n\t\t\tif(selectedFile.exists())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfile = new Scanner(fileName); //scans the input file\n\t\t\t\t}\n\t\t\t\tcatch(Exception IOException)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showConfirmDialog (null, \"Unable to import data from the list\");\n\t\t\t\t\tSystem.exit (-1);\n\t\t\t\t}//if there was an error it will pop up this message\n\t\t\t\t\n\t\t\t\tString str = file.nextLine ( ); //names the line\n\t\t\t\tString [] header = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\tsetCourseNumber(header[1]);\n\t\t\t\tsetCourseName(header[0]);\n\t\t\t\tsetInstructor(header[2]);\n\t\t\t\t\n\t\t\t\twhile(file.hasNextLine ( ))\n\t\t\t\t{\n\t\t\t\t\tstr = file.nextLine ( ); //names the line\n\t\t\t\t\tString [] tokens = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\t\tStudent p = new Student();\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tp.setStrNameLast (String.valueOf (tokens[0]));\n\t\t\t\t\t\tp.setStrNameFirst (String.valueOf (tokens[1]));\n\t\t\t\t\t\tp.setStrMajor (String.valueOf (tokens[2]));\n\t\t\t\t\t\tp.setClassification (tokens[3]);\n\t\t\t\t\t\tp.setiHoursCompleted (new Integer (tokens[4]).intValue ( ));\n\t\t\t\t\t\tp.setfGPA (new Float (tokens[5]).floatValue ( ));\n\t\t\t\t\t\tp.setStrStudentPhoto (String.valueOf (tokens[6]));\n\t\t\t\t\t//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tclassRoll.add (p);\n\t\t\t\t\t\t}//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tcatch(Exception IOException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIOException.printStackTrace ( );\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + str + \"'\" + IOException.getMessage());\n\t\t\t\t\t\t}//pops up a message if there were any errors reading from the file\n\t\t\t\t}//continues through the file until there are no more lines to scan\n\t\t\tfile.close ( ); //closes the file\n\n\t\t\t\tif(selectedFile.exists ( )==false)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception IOException)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + selectedFile + \"' \" + IOException.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}//if the user picks a file that does not exist this error message will be caught.\n\t\t\t}\n\t\t}//if the input is good it will load the information from the selected file to and Array List\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.exit (0);\n\t\t\t}\n\t\tthis.saveNeed = true;\n\n\t\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic CopyOnWriteArrayList<User> importUserList() throws IOException, ClassNotFoundException, FileNotFoundException {\r\n\t\tObjectInputStream in;\r\n\t\tCopyOnWriteArrayList<User> tmpUserList = new CopyOnWriteArrayList<User>();\r\n\t\tin= new ObjectInputStream(\r\n\t\t\t\tnew BufferedInputStream(\r\n\t\t\t\t\t\tnew FileInputStream(\"userList.dat\")));\r\n\t\ttmpUserList= (CopyOnWriteArrayList<User>)in.readObject();\r\n\t\tin.close();\r\n\t\treturn tmpUserList;\r\n\t}",
"public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void loadStudRecsFromFile(File file) {\r\n\t\ttry {\r\n\t\t\tJAXBContext context = JAXBContext\r\n\t\t\t\t\t.newInstance(StudRecsWrapper.class);\r\n\t\t\tUnmarshaller um = context.createUnmarshaller();\r\n\t\t\t\r\n\t\t\tStudRecsWrapper wrapper = (StudRecsWrapper) um.unmarshal(file);\r\n\t\t\t\r\n\t\t\tstudRecs.clear();\r\n\t\t\tstudRecs.addAll(wrapper.getStudRecs());\r\n\t\t\tSystem.out.println(\"File loaded!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Cannot load file, does it exist?\");\r\n\t\t}\r\n\t}",
"public List<String> load();",
"private static void saveStudentsList(List<Student> students, File file) throws IOException {\n saveStudentsList(students, new FileOutputStream(file));\n }",
"private void loadData() throws Exception {\n List<Student> listOfStudents = new ArrayList<>();\n DocumentBuilderFactory documentBuilderFactory =\n DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder =\n documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(XMLfile);\n Element root = document.getDocumentElement();\n\n NodeList nodes = root.getChildNodes();\n int len = nodes.getLength();\n for (int i = 0; i < len; i++) {\n Node studentNode = nodes.item(i);\n if (studentNode instanceof Element) {\n Student b = createStudent((Element) studentNode);\n listOfStudents.add(b);\n }\n }\n Map<Long, Student> map= new HashMap<>();\n for (Student s : listOfStudents){\n map.putIfAbsent(s.getId(),s);\n }\n this.setEntities(map);\n }",
"private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tprotected ListEntity parseList(InputStream is) throws Exception {\n\t\tVipStudentList studentList = VipStudentList.parse(is);\n\t\treturn studentList;\n\t}",
"public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}",
"private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }",
"private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"static void loadCourse() {\n\t\tScanner inputStreamC = null; // create object variable for Course\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStreamC = new Scanner(new File(\"course.txt\"));\n\t\t\tinputStreamC.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No Course Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStreamC.hasNext()) {\n\n\t\t\t\tString readCourseID = inputStreamC.next();\n\t\t\t\tString readCourseName = inputStreamC.next();\n\t\t\t\tString readCourseUserName = inputStreamC.next();\n\t\t\t\t\n\t\t\t\tCourse c1 = new Course(readCourseID, readCourseName, readCourseUserName);\n\t\t\t\tcourseInfoArray.add(c1);\n\t\t\t\t//System.out.println(\"Read a Course \" + c1.getCourseID() + \" \" + c1.getCourseName() + \" \"\t+ c1.getCoordinatorUserID());\n\t\t\t\t\n\t\t\t} //eo while\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStreamC.close();\n\t}",
"public void readFromEmployeeListFile()\r\n {\r\n try(ObjectInputStream fromEmployeeListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/employeelist.dta\")))\r\n {\r\n employeeList = (EmployeeList) fromEmployeeListFile.readObject();\r\n employeeList.setSavedStaticEmpRunNR(fromEmployeeListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av ansatt \"\r\n + \"objektene.\\nOppretter tomt ansattregister.\\n\"\r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }",
"public List<Grade> importGrade(String filename) throws FileNotFoundException {\n List<Grade> grades = new ArrayList<>();\n FileReader fileReader = new FileReader(DATA_PATH + filename);\n Scanner scanner = new Scanner(fileReader);\n //skip first line\n String firstLine = scanner.nextLine();\n Log.i(\"first line: \" + firstLine);\n\n while (scanner.hasNextLine()) {\n String[] s = scanner.nextLine().split(\",\");\n String degree = s[0];\n String knowledge = s[1];\n String skill = s[2];\n Grade grade = new Grade(degree, knowledge, skill);\n grades.add(grade);\n }\n\n scanner.close();\n return grades;\n }",
"public SLList readFile(String file) {\n\t\t// Read it back in\n\t\tObjectInputStream i = null;\n\t\tSLList temp = null;\n\n\t\ttry {\n\t\t\ti = new ObjectInputStream(new FileInputStream(file));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t/**\n\t\t * try/catch to verify file has been restored\n\t\t */\n\t\t\n\t\ttry {\n\t\t\ttemp = (SLList) i.readObject();\n\t\t\t//System.out.println(temp);\n\t\t\tSystem.out.println(\"Successfully restored data from file!\");\n\t\t} catch (ClassNotFoundException 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\ttry {\n\t\t\ti.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\treturn temp;\n\t}",
"public static ArrayList<Subject> loadListOfPools(String fileName) {\n ArrayList<Subject> subject = new ArrayList<>();\r\n String str = TextReader.StringFromPools(fileName);//Uses the method that returns a complete string with newlines for each studentline.\r\n if (validateInputFromPool(str)) {//Uses the validation method to check that the input is valid.\r\n String[] lines = str.split(\"\\n\");\r\n String[] lineParameters;\r\n int countFor = 0;\r\n for (String line : lines) {\r\n if(countFor > 1){\r\n lineParameters = line.split(\",\");\r\n Subject sub = new Subject(lineParameters[0],lineParameters[1]);\r\n subject.add(sub);\r\n }\r\n countFor++;\r\n }\r\n }\r\n\r\n return subject;\r\n }",
"public void populateListFromFile() \n\t{\n\t\tBufferedReader bufferedReader = null;\n\t\tallQuestions = new ArrayList<ArrayList<String>>();\n\t\tquestionAndAnswers = new ArrayList<String>();\n\n\t\ttry {\n\t\t bufferedReader = new BufferedReader(new FileReader(\"questions.txt\"));\n\t\t String line = \"\";\n\t\t \n\t\t while ((line = bufferedReader.readLine()) != null) \n\t\t {\t\t\t \t\n\t\t \tif(line.length() > 0)\n\t\t \t\tquestionAndAnswers.add(line);\n\t\t \telse if (line.length() == 0)\n\t\t \t{\n\t\t \t\tallQuestions.add(questionAndAnswers);\n\t\t \t\tquestionAndAnswers = new ArrayList<String>();\n\t\t \t}\n\t\t } \n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t}",
"private void importStudent(ClassPathResource studentFile) throws IOException {\n\t\t//System.out.println(studentFile.getFilename());\n\t\tFileInputStream fileInputStream = new FileInputStream(resourceStudent.getFile());\n\t\t@SuppressWarnings(\"resource\")\n\t\tWorkbook workbook = new XSSFWorkbook(fileInputStream);\n\t\tSheet sheet = workbook.getSheetAt(0);\n\t\tboolean validate = studentReader.validdateFile(sheet);\n\t\tMainClass mainClass = null;\n\t\tList<Student> students = null;\n\t\tif(!validate) {\n\t\t\tSystem.out.println(\"STUDENT SEEDING ERROR!\");\n\t\t\treturn;\n\t\t}\n\t\tmainClass = students.get(0).getMainClass();\n\t\tFaculty faculty = mainClass.getFaculty();\n\t\tLecturer lecturer = mainClass.getLecturer();\n\t\tif(!facultyService.findById(faculty.getFacultyId()).isPresent())\n\t\t\tfacultyService.save(faculty);\n\t\telse\n\t\t\tfaculty = facultyService.findById(faculty.getFacultyId()).get();\n\t\tmainClass.setFaculty(faculty);\n\t\tif(!lecturerService.existsById(lecturer.getId()))\n\t\t\tlecturerService.save(lecturer);\n\t\telse\n\t\t\tlecturer = lecturerService.findById(lecturer.getId()).get();\n\t\tmainClass.setLecturer(lecturer);\n\t\tmainClassService.save(mainClass);\n\t\tstudentService.saveAll(students);\n\t\texcelFileHandlerService.getStudents().clear();\n\t}",
"public static List<String> loadListFromFile(File file) throws InstantiationException, IllegalAccessException {\n\t\n\tList<String> list = new ArrayList<String>();\n\t\n\tif (file.exists()) {\n\t try {\n\t\tScanner s = new Scanner(file);\n\t\twhile (s.hasNext())\n\t\t list.add(s.next());\n\t } catch (FileNotFoundException ex) {\n\t\t// This should never be thrown because we have an if to check it...\n\t }\n\t \n\t}\n\t\n\treturn list;\n\t\n }",
"public void createStudents(String fileContents) {\r\n\t\tplot = false;\r\n\t\tif (this.students != null) {\r\n\t\t\tstudents.clear();\r\n\t\t}\r\n\t\tdates.clear();\r\n\t\tattendancePos = 0;\r\n\t\tdataLoaded = 0;\r\n\t\tthis.students = new ArrayList<Student>();\r\n\t\tString[] studentString = fileContents.split(\"\\n\");\r\n\t\tfor (int i=0; i<studentString.length; i++) {\r\n\t\t\tString[] studentInfo = studentString[i].split(\",\");\r\n\t\t\tArrayList<Integer> attendance = new ArrayList<Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tStudent toAdd = new Student(studentInfo[0], studentInfo[1], studentInfo[2], studentInfo[3], studentInfo[4], studentInfo[5], attendance);\r\n\t\t\t\tstudents.add(toAdd);\r\n\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"File Format is incorrect\", \"Error\", 2);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"@Override\n\tpublic List<Personne> generateStudents(MultipartFile file) throws IllegalStateException, IOException{\n\t\tList<Personne> students=new ArrayList<Personne>();\n\t\tPersonne student=new Personne();\n\t\tString line = \"\";\n\t\tfile.transferTo(new File(\"D:\\\\files\\\\\" + file.getOriginalFilename()));\n\t\ttry {\n\t\t\tBufferedReader br;\n\t\t\tbr = new BufferedReader( new FileReader(\"D:\\\\files\\\\\" + file.getOriginalFilename()));\n\t\t\twhile((line = br.readLine())!=null)\n\t\t\t{\n\t\t\t\tString [] data =line.split(\",\");\n\t\t\t\tPersonne etudiant = new Personne();\n\t\t\t // etudient.setId((long) Integer.parseInt(data[0]));\n\t\t\t\tetudiant.setNom(data[0]);\n\t\t\t\tetudiant.setPrenom(data[1]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\t//etudiant.setNom(data[3]);\n\t\t\t\tstudent=persoRepo.save(etudiant);\n\t\t\t\tif(student !=null) {\n\t\t\t\t\tstudents.add(student);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn students;\n\t\t\n\t}",
"public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}",
"void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }",
"private void loadSavedCourses() {\n courseList = new CourseList(new ArrayList<>());\n try {\n courseList = reader.readCourseList();\n } catch (IOException ioe) {\n System.err.println(\"Course File Missing\");\n } catch (JSONException je) {\n System.err.println(\"Empty File - Course\");\n System.out.println(je);\n }\n }",
"private ArrayList<User> loadUsers(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<User>>(){}.getType();\r\n\t\tArrayList<User> users = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn users;\r\n\t}",
"private ArrayList<BookOfUser> loadBooksOfUser(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<BookOfUser>>(){}.getType();\r\n\t\tArrayList<BookOfUser> bookOfUser = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn bookOfUser;\r\n\t}",
"private static void readUserListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"users.json\")) {\n\n\t\t\tJSONArray userListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < userListJSON.size(); i++) {\n\t\t\t\tJSONObject user = (JSONObject) userListJSON.get(i);\n\t\t\t\tString name = (String) user.get(\"name\");\n\t\t\t\tString surname = (String) user.get(\"surname\");\n\t\t\t\tString username = (String) user.get(\"username\");\n\t\t\t\tString password = (String) user.get(\"password\");\n\t\t\t\tString account = (String) user.get(\"account\");\n\n\t\t\t\tif(account.equals(\"employee\")) {\n\t\t\t\t\tMain.userList.add(new Employee(username, name, surname, password));\n\t\t\t\t} else {\n\t\t\t\t\tMain.userList.add(new Customer(username, name, surname, password));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }",
"public List<Student> getAllStudents() throws IOException {\n\t\tstudentList = studentListGenerator.generateList(\"StudentList.txt\");\n\t\treturn studentList;\n\t}",
"public void loadUsersFromFile(String fileName) {\n\t\ttry {\n\t\t\tusers = UserRecordIO.readUserRecords(fileName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to read file \" + fileName);\n\t\t}\n\t}",
"public static int loadSchools(ArrayList<School> H) {\n\n\t\tboolean isValid = false;\n\n\t\tString values[] = new String[4002];\n\n\t\tString line = \"\";\n\t\tString strLine = \"\";\n\t\tdouble alpha = 0.00;\n\t\tint i = 0;\n\t\tint successfulSchools = 0;\n\t\tschoolsEntered = 0; // as soon as loadSchools is called\n\t\t// schoolsEntered += loadedSchoolsNum;\n\n\t\tString school_file = \"\";\n\n\t\tdo {\n\t\t\tisValid = true;\n\n\t\t\ttry {\n\t\t\t\tSystem.out.print(\"Enter school file name (0 to cancel): \");\n\t\t\t\tschool_file = input.readLine();\n\t\t\t\tif (school_file.equalsIgnoreCase(\"0\")) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"File loading process canceled.\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\tBufferedReader fin = new BufferedReader(new FileReader(\n\t\t\t\t\t\tschool_file));\n\t\t\t\t// After file has been read, we'll start parsing through it and\n\t\t\t\t// populating our School Object with the relevant data.\n\t\t\t\t// get number of schools with a while loop\n\t\t\t\twhile ((line = fin.readLine()) != null) {\n\n\t\t\t\t\tvalues = line.split(\",\");\n\t\t\t\t\tif (values.length == 3) {\n\n\t\t\t\t\t\tif ((Double.parseDouble(values[1]) <= 1.00)\n\t\t\t\t\t\t\t\t&& (Double.parseDouble(values[1]) >= 0.00)) {\n\t\t\t\t\t\t\t// H[schoolsEntered] = new School( values[0],\n\t\t\t\t\t\t\t// Double.parseDouble(values[1]), numStudentsAdded);\n\t\t\t\t\t\t\t// System.out.println(H[schoolsEntered].getName());\n\t\t\t\t\t\t\tif (Integer.parseInt(values[2]) >= 1) {\n\t\t\t\t\t\t\t\t// took out loadedSchoolsNum\n\t\t\t\t\t\t\t\tH.add(new School(values[0], Double\n\t\t\t\t\t\t\t\t\t\t.parseDouble(values[1]),\n\t\t\t\t\t\t\t\t\t\tnumStudentsAdded, Integer\n\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(values[2])));\n\t\t\t\t\t\t\t\tloadedSchoolsNum++;\n\t\t\t\t\t\t\t\tsuccessfulSchools++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tschoolsEntered++;\n\t\t\t\t}\n\n\t\t\t\tfin.close();\n\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"ERROR: File not found!\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tisValid = false;\n\t\t\t} catch (IOException e) {\n\n\t\t\t}\n\n\t\t} while (!isValid);\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(successfulSchools + \" of \" + schoolsEntered\n\t\t\t\t+ \" schools loaded!\");\n\t\tSystem.out.println(\"\");\n\n\t\treturn successfulSchools;\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static void readUserFile() {\n\t\ttry {\n\t\t\tObjectInputStream readFile = new ObjectInputStream(new FileInputStream(userFile));\n\t\t\tVerify.userList = (ArrayList<User>) readFile.readObject();\n\t\t\treadFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//add contents of file to separate lists\n\t\tfor (int i=0; i<Verify.userList.size(); i++) {\n\t\t\tVerify.userIds.add(Verify.userList.get(i).getUserId());\n\t\t\tVerify.usernames.add(Verify.userList.get(i).getUsername());\n\t\t\tif (Verify.userList.get(i).getAccounts() != null) {\n\t\t\t\tVerify.accountList.addAll(Verify.userList.get(i).getAccounts());\n\t\t\t}\n\t\t\tif (Verify.userList.get(i).getRequests() != null) {\n\t\t\t\tVerify.requestList.addAll(Verify.userList.get(i).getRequests());\t\n\t\t\t}\n\t\t}\n\t\tfor (Account account: Verify.accountList) {\n\t\t\tVerify.accountIds.add(account.getAccountId());\n\t\t}\n\t}",
"public void readFromBookingListFile()\r\n {\r\n try(ObjectInputStream fromBookingListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/bookinglist.dta\")))\r\n {\r\n bookingList = (BookingList) fromBookingListFile.readObject();\r\n bookingList.setSavedStaticBookingRunNr(fromBookingListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av booking \"\r\n + \"objektene.\\nOppretter tomt bookingregister.\\n\" \r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }",
"public void loadList(String name){\n }",
"public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }",
"@Override\n\t// read registration records from dataFile\n\tpublic synchronized Info readInfoFromFile(){\n\t\tInfo new_StudInfo = null;\n\t\ttry{\n\t\t\t\tString newLine = br.readLine();\t// read a line from file\n\t\t\t\tif(newLine!=null){\n\t\t\t\t\t// split a record into 3 strings and an integer\n\t\t\t\t\tregInfoLine = newLine.split(\" \");\t\n\t\t\t\t\tnew_StudInfo = new StudentInfo(\n\t\t\t\t\t\t\t\t\t\tregInfoLine[0],\n\t\t\t\t\t\t\t\t\t\tregInfoLine[1],\n\t\t\t\t\t\t\t\t\t\tregInfoLine[2],\n\t\t\t\t\t\t\t\t\t\t(Integer.parseInt(regInfoLine[3])));\n\t\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn new_StudInfo;\n\t}",
"public List<String> loadFromFile(String fileName) {\n String line;\n List<String> listValuesFieldsEmployees = new ArrayList<>();\n\n try (FileReader fileReader = new FileReader(fileName);\n BufferedReader reader = new BufferedReader(fileReader)) {\n while ((line = reader.readLine()) != null) {\n listValuesFieldsEmployees.add(line);\n }\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return listValuesFieldsEmployees;\n }",
"public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }",
"private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public void loadList () {\r\n ArrayList<String> list = fileManager.loadWordList();\r\n if (list != null) {\r\n for (String s : list) {\r\n addWord(s);\r\n }\r\n }\r\n }",
"public void loadListFromCsv() {\n List<Publication> list = new ArrayList<>();\n String line;\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(\"saves/data.csv\"))){\n while ((line = bufferedReader.readLine()) != null){\n String[] attributes = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n String[] formattedAttributes = formatAttributes(attributes);\n Publication book = createPublicationFromAttributes(formattedAttributes);\n list.add(book);\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n\n this.library = list;\n }",
"public DataProcessor(String filename) throws FileNotFoundException{\n\tlst = new ArrayList();\n\tScanner input = new Scanner(new FileReader(filename));\n //skip the first line of the csv file\n\tString escapedLine = input.nextLine();\n \twhile(input.hasNextLine()){\n\t recordCount++;\n\t String line = input.nextLine();\n\t //CORRECTION BLOC to skip quoted commas\n\t if (line.contains(\"\\\"\")){\n\t\tint first= line.indexOf(\"\\\"\");\n\t\twhile(first >0 ){\n\t\t String problem = line.substring(first,line.indexOf(\"\\\"\",first+1)+1);\n\t\t \tint second = line.indexOf(\"\\\"\",first+1);\n\t\t\t//look for comma between quoted\n\t\t\tif(problem.contains(\",\")){\n\t\t\t //replace comma by space not to change string indices\n\t\t\t problem=problem.replace(\",\",\" \");\n\t\t\t line=line.replace(line.substring(first,line.indexOf(\"\\\"\",first+1)+1),problem);\n\t\t\t}\n\t\t\t//look for another quote symbol\n\t\t\tfirst = line.indexOf(\"\\\"\",second+1);\n\t\t}\n\t }\n\t String[] fields = line.split(\",\");\n\t //create Person object to store the suspect's data\n\t Person suspect = new Person(fields[SEX].charAt(0),fields[RACE].charAt(0),Integer.parseInt(fields[DOB]),Integer.parseInt(fields[HEIGHTFT]),fields[EYECOLOR],fields[BUILD].charAt(0));\n\t lst.add(suspect);\n\t}\n\t//close scanner\n\tinput.close();\n }",
"public ArrayList<String> loadRead() {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}",
"public void loadMembers(String filename) {\n try {\r\n Scanner input = new Scanner(new File(filename));\r\n // keep going until the end \r\n while (input.hasNext()) {\r\n String name = input.nextLine();\r\n String address = input.nextLine();\r\n String onLoan = input.nextLine();\r\n // add the member \r\n addMember(name, address);\r\n \r\n if (!onLoan.equals(\"NONE\")) {\r\n \r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n // print an error message \r\n System.err.println(\"File not found\");\r\n }\r\n }",
"public void loadScores() {\n try {\n File f = new File(filePath, highScores);\n if(!f.isFile()){\n createSaveData();\n }\n BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f)));\n\n topScores.clear();\n topName.clear();\n\n String[] scores = reader.readLine().split(\"-\");\n String[] names = reader.readLine().split(\"-\");\n\n for (int i =0; i < scores.length; i++){\n topScores.add(Integer.parseInt(scores[i]));\n topName.add(names[i]);\n }\n reader.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"ArrayList retrievestudentdata() throws ClassNotFoundException;",
"public void readPatientListFromFile()\r\n\t{\n\t\tnextPatientLocation = 0;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Makes file reader objects and passes filename\r\n\t\t\tFileReader fr = new FileReader(patientMasterfile);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\t//reads first line and makes a blank patient \r\n\t\t\tString aReadLine = br.readLine();\r\n\t\t\tPatient tempRead = new Patient();\r\n\t\t\t//loops through all lines in the file\r\n\t\t\twhile(aReadLine != null)\r\n\t\t\t{\r\n\t\t\t\t//resets patient to null\r\n\t\t\t\ttempRead = new Patient();\r\n\t\t\t\t//Splits the read in data and assigns that data to the appropriate attribute \r\n\t\t\t\tString[] splitPatientData = aReadLine.split(\"~~\");\r\n\r\n\t\t\t\ttempRead.patientID = splitPatientData[0];\r\n\t\t\t\ttempRead.forename = splitPatientData[1];\r\n\t\t\t\ttempRead.surname = splitPatientData[2];\r\n\t\t\t\ttempRead.username = splitPatientData[3];\r\n\t\t\t\ttempRead.password = splitPatientData[4];\r\n\t\t\t\ttempRead.houseNumber = splitPatientData[5];\r\n\t\t\t\ttempRead.postcode = splitPatientData[6];\r\n\t\t\t\ttempRead.telephoneNumber = splitPatientData[7];\r\n\t\t\t\ttempRead.dob = splitPatientData[8];\r\n\t\t\t\ttempRead.mode = splitPatientData[9];\r\n\t\t\t\t//adds patient to list and gets the next line\r\n\t\t\t\taddPatientToList(tempRead);\r\n\t\t\t\taReadLine = br.readLine();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//catches any exceptions trown by reading \r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error reading file, \");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"void load(File file);",
"public List<Subject> importSubject(String filename) throws FileNotFoundException {\n List<Subject> subjects = new ArrayList<>();\n FileReader fileReader = new FileReader(DATA_PATH + filename);\n Scanner scanner = new Scanner(fileReader);\n //skip first line\n String firstLine = scanner.nextLine();\n Log.i(\"first line: \" + firstLine);\n\n while (scanner.hasNextLine()) {\n String[] s = scanner.nextLine().split(\",\");\n String subjectName = s[0];\n Subject subject = new Subject(subjectName);\n subjects.add(subject);\n }\n\n scanner.close();\n return subjects;\n }",
"public void fillList (File file) throws FileNotFoundException {\n\t\tif (!file.getName().endsWith(\".srt\")) {\n\t\t\tthrow new IllegalArgumentException(\"Only .srt files supported\");\n\t\t}\n\n\t\t//create file reader tied to the .srt file, used JUST to count the # of lines\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e; //let it propogate up\n\t\t}\n\n\t\tint numOfBlocks = countNumberOfStringBlocks();\n\t\t\n\t\t//don't directly copy into stringList, as there could be errors reading file.\n\t\t//don't want to overwrite current stringList until entire file is read succesfully.\n\t\tStringBlock[] stringListBuffer = new StringBlock[numOfBlocks];\t\t//instantiate the array of stringblocks to the size needed\n\t\t//end of file reached during countNumberOfStringBlocks();\n\t\t\n\t\treader.close();\n\t\t\n\t\tcurrentLineNum = 0;\n\t\t//return reader back to top of the file, to begin parsing/storing chunks\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\tStringBlock stringBlock;\n\t\tint index = 0;\n\t\t\n\t\t//read in stringblocks, and store them in order\n\t\ttry{\n\t\t\twhile ((stringBlock = parseNextStringBlock()) != null) {\n\t\t\t\tstringListBuffer[index] = stringBlock;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t//end of file reached successfully\n\t\t\t\n\t\t\tstringList = stringListBuffer;\n\t\t} catch (IllegalStateException e) {\n\t\t\tthrow e; //let it propogate all the way up to the method where the file is selected\n\t\t}\n\t\t\n\t\t//close reader\n\t\treader.close();\n\t}",
"private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }",
"public void loadScoreFile() {\n try {\n inputStream = new ObjectInputStream(new FileInputStream(HIGHSCORE_FILE));\n scores = (ArrayList<Score>) inputStream.readObject();\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n } catch (ClassNotFoundException e) {\n } finally {\n try {\n if (outputStream != null) {\n outputStream.flush();\n outputStream.close();\n }\n } catch (IOException e) {\n }\n }\n }",
"public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public static ArrayList<Student> get_student_users() throws IOException {\n\t\tArrayList<Student> studentList = new ArrayList<Student>();\n\t\tReadCSV readStudentlist = new ReadCSV(\"students.csv\");\n\t\ttry {\n\t\t\t// auto-generated primary key for authors table\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tList<String> tuple = readStudentlist.next();\n\t\t\t\tif (tuple == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Reads each value in from our string list and inserts them into the appropriate attribute of our student object\n\t\t\t\tIterator<String> i = tuple.iterator();\n\t\t\t\tStudent students = new Student();\n\t\t\t\tstudents.setName(i.next());\n\t\t\t\tString password = MD5.getMd5(i.next());\n\t\t\t\tstudents.setPassword(password);\n\t\t\t\tstudents.setEmail(i.next());\n\t\t\t\tstudents.set_faculty_code(i.next());\n\t\t\t\tstudents.setType(Integer.parseInt(i.next()));\n\t\t\t\tstudentList.add(students);\n\t\t\t}\n\t\t\treturn studentList;\n\t\t} finally {\n\t\t\treadStudentlist.close();\n\t\t}\n\t}",
"public void readFromFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\Project\\\\src\\\\Railway.txt\");\r\n\t\t\tScanner s = new Scanner(f);\r\n\t\t\tpersons = new Person2 [50]; \r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine()){\r\n\t\t\t\tString a = s.nextLine();\r\n\t\t\t\tString b = s.nextLine();\r\n\t\t\t\tString c = s.nextLine();\r\n\t\t\t\tString d = s.nextLine();\r\n\t\t\t\tString e = s.nextLine();\r\n\t\t\t\tString g = s.nextLine();\r\n\t\t\t\tString h = s.nextLine();\r\n\t\t\t\tString j = s.nextLine();\r\n\t\t\t\tPerson2 temp = new Person2 (a,b,c,d,e,g,h,j);\r\n\t\t\t\tpersons[i] = temp;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"public ArrayList loadItems (String file) {\n ArrayList<Item> itemList = new ArrayList<>();\n\n File itemFile = new File(file);\n\n Scanner scanner = null;\n\n try{\n scanner = new Scanner(itemFile);\n\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n\n while(scanner.hasNextLine()){\n String line = scanner.nextLine();\n String [] oneItem = line.split(\"=\");\n itemList.add(new Item(oneItem[0],Integer.parseInt(oneItem[1])));\n }\n\n\n return itemList;\n }",
"public void readFile(File inputFile) throws FileNotFoundException, IOException, ClassNotFoundException {\n\n ArrayList<Student> studentList = null;\n int noOfStudents = 1; int noOfProjects = 0;\n int count = 1;\n String title; String school; String supervisor; Project project = null; \n ArrayList<Project> projectList = new ArrayList<>();\n\n Scanner scan = new Scanner(new FileReader(inputFile));\n String line = null;\n\n while (scan.hasNextLine()) {\n studentList = new ArrayList<>();\n \n if (count == 1) {\n line = scan.nextLine();\n noOfProjects = Integer.parseInt(line);\n System.out.println(line);\n }\n\n line = scan.nextLine();\n String[] projectInfo = line.split(\",\", 5);\n noOfStudents = Integer.parseInt(projectInfo[3]);\n String[] studentInfo = projectInfo[4].split(\",\");\n\n Student student = null;\n \n for (int k = 0; k < studentInfo.length; k+=4) {\n //new Student(AdminNo, Name, Course, Gender)\n student = new Student(studentInfo[k], studentInfo[k+1], studentInfo[k+2], studentInfo[k+3]);\n studentList.add(student); //Add new Student to List\n }\n\n title = projectInfo[0];\n school = projectInfo[1];\n supervisor = projectInfo[2];\n project = new Project(title, school, supervisor, noOfStudents, studentList);\n \n System.out.println(line);\n count++;\n \n projectList.add(project);\n }\n\n for (Student stud: studentList) {\n System.out.println(stud.getAdminNo() + stud.getCourse() + stud.getGender() + stud.getName());\n }\n \n writeToFile(project);\n \n scan.close();\n }",
"public void load(File source);",
"public void readFile(){\n try {\n highscores = new ArrayList<>();\n BufferedReader br = new BufferedReader(new FileReader(\"Highscores.txt\"));\n String line = br.readLine();\n while (line != null){\n try{\n highscores.add(Integer.parseInt(line));\n } catch (NumberFormatException e){}\n line = br.readLine();\n }\n br.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"No file found\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void loadFile(File file) throws FileNotFoundException\n {\n FileReader reader = new FileReader(file);\n\n // Clear table to make sure it only shows tasks from file\n Item.getToDoList().clear();\n if(this.listView != null)\n {\n listView.getItems().clear();\n }\n\n index = 0;\n\n try(BufferedReader temp = new BufferedReader(reader))\n {\n String info;\n boolean check;\n\n while((info = temp.readLine()) != null)\n {\n // Make an array of values\n String[] values = info.split(\",\");\n\n //Array length is 3, since 3 columns. If not that then incorrect file\n if(values.length != 3)\n {\n if(this.status != null)\n {\n status.setText(\"Incompatible File. \");\n }\n break;\n }\n\n // If correct, add information from file to list\n else\n {\n check = !values[2].equals(\"false\");\n Item.getToDoList().add(new Item(values[0], values[1], check));\n }\n }\n\n } catch (IOException exception)\n {\n // If error, let user know\n if(this.status != null)\n {\n status.setText(\"File not found. \");\n }\n\n exception.printStackTrace();\n }\n }",
"public void load(String file){\n try{\n Scanner sc = new Scanner(new FileReader(file));\n ArrayList <String> saving = new ArrayList<String>();\n boolean line = sc.hasNext();\n while(line ==true ){\n String x = sc.next();\n if(!(x.contains(\"CO\")||x.contains(\"CB\"))){\n saving.add(x);\n line = sc.hasNext();\n }\n }\n sc.close();\n setValues(saving);\n }catch(IOException e){\n JOptionPane.showMessageDialog(null, \"error in reading file\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }",
"private static ArrayList read() throws IOException, ClassNotFoundException {\n FileInputStream file = new FileInputStream(\"scores.ser\"); \n ObjectInputStream in = new ObjectInputStream(file); \n \n // Method for deserialization of object \n ArrayList scores = (ArrayList)in.readObject(); \n \n in.close(); \n file.close(); \n \n\t\treturn scores;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static ArrayList<Tweet> load(String fname) {\n\t\tArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t\n\t\ttry {\n\t\t FileInputStream fin = new FileInputStream(fname);\n\t\t ObjectInputStream ois = new ObjectInputStream(fin);\n\t\t tweets = (ArrayList<Tweet>) (ois.readObject());\n\t\t ois.close();\n\t\t} catch (FileNotFoundException ex) {\n\t\t ex.printStackTrace();\n\t\t} catch (IOException ioex) {\n\t\t ioex.printStackTrace();\n\t\t}\n\t\tcatch (ClassNotFoundException classex) {\n\t\t classex.printStackTrace();\n\t\t}\n\t\treturn tweets;\n }",
"public void readPatient() {\n\t\tBufferedReader br;\n\t\tString s;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"patients.txt\"));\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\tString[] fields = s.split(\", \");\n\n\t\t\t\tString ssn = fields[0];\n\t\t\t\tString name = fields[1];\n\t\t\t\tString address = fields[2];\n\t\t\t\tString phoneNum = fields[3];\n\t\t\t\tString insurance = fields[4];\n\t\t\t\tString currentMeds = fields[5];\n\t\t\t\tPatient patient = new Patient(ssn, name, address, phoneNum, insurance, currentMeds);\n\t\t\t\tpat.add(patient);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}",
"TraceList read(File file) throws IOException;",
"public static HighScoresTable loadFromFile(File filename) {\n HighScoresTable newScoresTable = new HighScoresTable(4);\n ObjectInputStream inputStream = null;\n try {\n inputStream = new ObjectInputStream(new FileInputStream(filename));\n List<ScoreInfo> scoreFromFile = (List<ScoreInfo>) inputStream.readObject();\n if (scoreFromFile != null) {\n //scoreFromFile.clear();\n newScoresTable.scoreInfoList.addAll(scoreFromFile);\n }\n } catch (FileNotFoundException e) { // Can't find file to open\n System.err.println(\"Unable to find file: \" + filename);\n //return scoresTable;\n } catch (ClassNotFoundException e) { // The class in the stream is unknown to the JVM\n System.err.println(\"Unable to find class for object in file: \" + filename);\n //return scoresTable;\n } catch (IOException e) { // Some other problem\n System.err.println(\"Failed reading object\");\n e.printStackTrace(System.err);\n //return scoresTable;\n } finally {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n } catch (IOException e) {\n System.err.println(\"Failed closing file: \" + filename);\n }\n }\n return newScoresTable;\n\n\n }",
"void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}",
"public static TaskList loadExistingTaskList(String fileName) {\n TaskList taskList = new TaskList();\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(fileName));\n String line;\n while ((line = br.readLine()) != null) {\n try {\n // process the line\n taskList.addItem(TaskItem.getItemFromLine(line, \"\\\\|\"));\n }\n catch(Exception e1) {\n System.out.println(e1.getMessage());\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"File not found\");\n }\n finally {\n if (br != null) {\n try {\n br.close();\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n }\n return taskList;\n }",
"private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }",
"public void populateList(){\n\t\tfor (int i = 0; i < 10; i++){\n\t\t\tscoreList.add(-1);\t\t\t\n\t\t\tnameList.add(\"\");\n\t\t}\n\t\tint i=0; \n\t\ttry {\n\t\t\tScanner results = new Scanner(new File(\"results.txt\"));\n\t\t\twhile (results.hasNext()){\n\t\t\t\tnameList.set(i, results.next());\n\t\t\t\tscoreList.set(i, results.nextInt());\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (FileNotFoundException e1){\n\t\t\te1.printStackTrace();\n\t\t}\n\t}",
"private void readFileToUser(String fileName){\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\t// FileReader reads text files in the default encoding.\r\n\t\t\tFileReader fileReader = \r\n\t\t\t\t\tnew FileReader(fileName);\r\n\r\n\t\t\t// Always wrap FileReader in BufferedReader.\r\n\t\t\tBufferedReader bufferedReader = \r\n\t\t\t\t\tnew BufferedReader(fileReader);\r\n\r\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\tString[] split = line.split(\",\", 3);\r\n\t\t\t\tString username = split[0];\r\n\t\t\t\tString password = split[1];\r\n\t\t\t\tString user = split[2];\r\n\t\t\t\tusers.add(new User(username,password,user));\r\n\r\n\t\t\t} \r\n\t\t\tbufferedReader.close(); \r\n\t\t}\r\n\t\tcatch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Unable to open file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t\tcatch(IOException ex) {\r\n\t\t\tSystem.out.println(\"Error reading file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t}",
"public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}",
"private ArrayList<Book> loadBooks(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<Book>>(){}.getType();\r\n\t\tArrayList<Book> books = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn books;\r\n\t}",
"@Override\n\tprotected ListEntity readList(Serializable seri) {\n\t\treturn (VipStudentList)seri;\n\t}"
] | [
"0.7232717",
"0.7219571",
"0.71985143",
"0.71688735",
"0.7149905",
"0.7073705",
"0.6986897",
"0.67931193",
"0.6761055",
"0.67464733",
"0.6715512",
"0.66587925",
"0.66538984",
"0.6633142",
"0.6598312",
"0.6548275",
"0.65442824",
"0.6464118",
"0.64520407",
"0.63618594",
"0.6348948",
"0.63358945",
"0.62941295",
"0.62915266",
"0.622185",
"0.61981046",
"0.6196373",
"0.61940664",
"0.61926776",
"0.6183293",
"0.6181014",
"0.6163469",
"0.616273",
"0.6126137",
"0.61247",
"0.6114054",
"0.610512",
"0.6087058",
"0.6082989",
"0.6068419",
"0.60536253",
"0.60483867",
"0.60454583",
"0.60384715",
"0.6028043",
"0.60189605",
"0.6015885",
"0.6009036",
"0.59963995",
"0.598336",
"0.59782076",
"0.59716547",
"0.59711474",
"0.5971058",
"0.5970839",
"0.5960129",
"0.5956074",
"0.5933633",
"0.5917257",
"0.59152526",
"0.59119",
"0.58962923",
"0.5884334",
"0.5880349",
"0.58764327",
"0.5846735",
"0.5845675",
"0.58318144",
"0.5794215",
"0.5793066",
"0.57793754",
"0.57745457",
"0.57643515",
"0.5761305",
"0.5756118",
"0.5748105",
"0.5746188",
"0.574126",
"0.5737244",
"0.573583",
"0.5734105",
"0.5720805",
"0.5718458",
"0.5702716",
"0.570223",
"0.57002884",
"0.56974214",
"0.5694402",
"0.5690081",
"0.5689825",
"0.5687047",
"0.5672845",
"0.56687486",
"0.566606",
"0.565938",
"0.5654238",
"0.56538516",
"0.56497425",
"0.5648057",
"0.5643593"
] | 0.8529146 | 0 |
Load student list from csv data input stream. | static List<Student> loadStudentList(InputStream in) {
return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))
.lines()
.skip(1)
.map(Student::fromCsv)
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loadListFromCsv() {\n List<Publication> list = new ArrayList<>();\n String line;\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(\"saves/data.csv\"))){\n while ((line = bufferedReader.readLine()) != null){\n String[] attributes = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n String[] formattedAttributes = formatAttributes(attributes);\n Publication book = createPublicationFromAttributes(formattedAttributes);\n list.add(book);\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n\n this.library = list;\n }",
"private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }",
"public static ArrayList<Student> get_student_users() throws IOException {\n\t\tArrayList<Student> studentList = new ArrayList<Student>();\n\t\tReadCSV readStudentlist = new ReadCSV(\"students.csv\");\n\t\ttry {\n\t\t\t// auto-generated primary key for authors table\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tList<String> tuple = readStudentlist.next();\n\t\t\t\tif (tuple == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Reads each value in from our string list and inserts them into the appropriate attribute of our student object\n\t\t\t\tIterator<String> i = tuple.iterator();\n\t\t\t\tStudent students = new Student();\n\t\t\t\tstudents.setName(i.next());\n\t\t\t\tString password = MD5.getMd5(i.next());\n\t\t\t\tstudents.setPassword(password);\n\t\t\t\tstudents.setEmail(i.next());\n\t\t\t\tstudents.set_faculty_code(i.next());\n\t\t\t\tstudents.setType(Integer.parseInt(i.next()));\n\t\t\t\tstudentList.add(students);\n\t\t\t}\n\t\t\treturn studentList;\n\t\t} finally {\n\t\t\treadStudentlist.close();\n\t\t}\n\t}",
"void loadCrimeList(InputStream inputStream) {\n // Define a scanner\n try (Scanner scanner = new Scanner(inputStream)) {\n\n // While the scanner has another line to read\n while (scanner.hasNextLine()) {\n\n // Get the next link and split it into parts\n String line = scanner.nextLine();\n String parts[] = line.split(\",\");\n\n //Assign each part to a local var\n String id = parts[0];\n String title = parts[1];\n String dateString = parts[2];\n String solvedString = parts[3];\n\n UUID uuid = UUID.fromString(id);\n Date date = new SimpleDateFormat(\n \"yyyy-MM-dd\",\n Locale.getDefault()\n ).parse(dateString);\n boolean isSolved = (solvedString.equals(\"1\"));\n\n // Add the Crime to the Crime list\n mCrimes.add(\n new Crime(\n uuid,\n title,\n date,\n isSolved\n )\n );\n }\n\n // Date read in, so set the dataLoadedOnce flag to true.\n mDataLoadedOnce = true;\n\n } catch (Exception e) {\n Log.e(\"Read CSV\", e.toString());\n }\n }",
"public void LoadFromCSV(){\n InputStream inputStream = getResources().openRawResource(R.raw.movielist);\n CSVinput csVinput = new CSVinput(inputStream);\n final List<String[]> movList = csVinput.read();\n\n for(String[] data : movList) {\n itemArrAdapt.add(data);\n }\n }",
"private static void readInputDataFromCSV(String pathToCSVfile) throws IOException {\n\n // open the file\n BufferedReader reader = new BufferedReader(new FileReader(pathToCSVfile));\n // read line by line\n String line = null;\n Scanner scanner = null;\n int index = 0;\n inputPlayersList = new ArrayList<>();\n\n while ((line = reader.readLine()) != null) {\n Player pl = new Player();\n scanner = new Scanner(line);\n scanner.useDelimiter(\",\");\n while (scanner.hasNext()) {\n String data = scanner.next();\n if (index == 0)\n pl.setLastName(data);\n else if (index == 1)\n pl.setFirstName(data);\n else if (index == 2)\n pl.setCountry(data);\n else if (index == 3)\n pl.setTicketNumber(data);\n else\n System.out.println(\"Incorrect data: \" + data);\n index++;\n }\n index = 0;\n inputPlayersList.add(pl);\n\n }\n //close reader\n reader.close();\n }",
"public List<Student> importStudent(String filename) throws FileNotFoundException {\n List<Student> students = new ArrayList<>();\n FileReader fileReader = new FileReader(DATA_PATH + filename);\n Scanner scanner = new Scanner(fileReader);\n //skip first line\n String firstLine = scanner.nextLine();\n Log.i(\"first line: \" + firstLine);\n\n while (scanner.hasNextLine()) {\n String[] s = scanner.nextLine().split(\",\");\n String fullName = s[0];\n int yearLevel = Integer.parseInt(s[1]);\n Student student = new Student(fullName, yearLevel);\n students.add(student);\n }\n\n scanner.close();\n return students;\n }",
"public DataProcessor(String filename) throws FileNotFoundException{\n\tlst = new ArrayList();\n\tScanner input = new Scanner(new FileReader(filename));\n //skip the first line of the csv file\n\tString escapedLine = input.nextLine();\n \twhile(input.hasNextLine()){\n\t recordCount++;\n\t String line = input.nextLine();\n\t //CORRECTION BLOC to skip quoted commas\n\t if (line.contains(\"\\\"\")){\n\t\tint first= line.indexOf(\"\\\"\");\n\t\twhile(first >0 ){\n\t\t String problem = line.substring(first,line.indexOf(\"\\\"\",first+1)+1);\n\t\t \tint second = line.indexOf(\"\\\"\",first+1);\n\t\t\t//look for comma between quoted\n\t\t\tif(problem.contains(\",\")){\n\t\t\t //replace comma by space not to change string indices\n\t\t\t problem=problem.replace(\",\",\" \");\n\t\t\t line=line.replace(line.substring(first,line.indexOf(\"\\\"\",first+1)+1),problem);\n\t\t\t}\n\t\t\t//look for another quote symbol\n\t\t\tfirst = line.indexOf(\"\\\"\",second+1);\n\t\t}\n\t }\n\t String[] fields = line.split(\",\");\n\t //create Person object to store the suspect's data\n\t Person suspect = new Person(fields[SEX].charAt(0),fields[RACE].charAt(0),Integer.parseInt(fields[DOB]),Integer.parseInt(fields[HEIGHTFT]),fields[EYECOLOR],fields[BUILD].charAt(0));\n\t lst.add(suspect);\n\t}\n\t//close scanner\n\tinput.close();\n }",
"public static void main(String[] args) throws FileNotFoundException, IOException {\r\n \r\n Directory d = new Directory();\r\n \r\n if (args.length != 1) {\r\n System.out.println(\"Usage: java CSVReaderTest <filename>\");\r\n }\r\n else {\r\n FileReader fr = new FileReader(args[0]);\r\n BufferedReader c = new BufferedReader(fr);\r\n\r\n int lineNum = 0;\r\n boolean eof = false;\r\n \r\n while (!eof) {\r\n String line = c.readLine();\r\n \r\n if (line == null) {\r\n eof = true;\r\n }\r\n else{\r\n // Allocate an array of the necessary size to return the strings\r\n String[] values = new String[4];\r\n // Start beginIndex at the beginning of the String, position 0\r\n int beginIndex = 0;\r\n\r\n for (int i = 0; i < 3; i++) {\r\n int endIndex;\r\n endIndex = line.indexOf(',', beginIndex);\r\n\r\n // if the argument begins and ends with quotes, remove them\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(endIndex - 1) == '\"') {\r\n values[i] = line.substring(beginIndex + 1, endIndex - 1);\r\n\r\n } else {\r\n values[i] = line.substring(beginIndex, endIndex);\r\n }\r\n\r\n beginIndex = endIndex + 1;\r\n }\r\n\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(line.length() - 1) == '\"') {\r\n values[3] = line.substring(beginIndex + 1, line.length() - 1);\r\n } else {\r\n values[3] = line.substring(beginIndex, line.length());\r\n }\r\n \r\n if (lineNum > 1) {\r\n lineNum = lineNum + 1;\r\n Student s = new Student(values[0]);\r\n s.setFirstName(values[1]);\r\n s.setLastName(values[2]);\r\n s.setPhoneNumber(values[3]);\r\n d.addStudent(s);\r\n System.out.println(s);\r\n }\r\n\r\n }\r\n }\r\n c.close();\r\n }\r\n \r\n Student c = new Student(\"mengl1\");\r\n c.setFirstName(\"Meng\");\r\n c.setLastName(\"Li\");\r\n c.setPhoneNumber(\"412-807-0153\");\r\n \r\n Student a = new Student(\"mengl2\");\r\n a.setFirstName(\"Mengl\");\r\n a.setLastName(\"Li\");\r\n a.setPhoneNumber(\"412-807-0154\");\r\n \r\n Student b = new Student(\"terryhong\");\r\n b.setFirstName(\"terry\");\r\n b.setLastName(\"hong\");\r\n b.setPhoneNumber(\"412-464-475\");\r\n\r\n d.addStudent(c);\r\n d.addStudent(a);\r\n d.addStudent(b);\r\n \r\n //System.out.println(d.searchByAndrewId(\"mengl2\"));\r\n //d.deleteStudent(\"terryhong\");\r\n System.out.println(d.size());\r\n // System.out.println(d.searchByLastName(\"Li\"));\r\n\r\n }",
"public static ArrayList<Student> loadListOfStudents(String fileName) {\n ArrayList<Student> students = new ArrayList<>();\r\n String str = TextReader.StringFromFile(fileName);//Uses the method that returns a complete string with newlines for each studentline.\r\n if (validateInput(str)) {//Uses the validation method to check that the input is valid.\r\n String[] lines = str.split(\"\\n\");\r\n String[] lineParameters;\r\n int countFor = 0;\r\n for (String line : lines) {\r\n if(countFor > 1){\r\n lineParameters = line.split(\",\");\r\n Vote vote = new Vote(new Subject(lineParameters[1]), new Subject(lineParameters[2]), new Subject(lineParameters[3]), new Subject(lineParameters[4]));\r\n Student newStudent = new Student(lineParameters[0], vote);\r\n students.add(newStudent);\r\n }\r\n countFor++;\r\n }\r\n }\r\n\r\n return students;\r\n }",
"@SuppressWarnings(\"resource\")\r\n\tpublic static ArrayList<UserInfo> getUserDataFromCsvFile()\r\n\t{\r\n\t\t\r\n\t\tArrayList<UserInfo> unfList=null;\r\n\t\ttry{\r\n\t\t\tFile myObj= new File(\"E:\\\\Selenium Setup\\\\datadriven.csv\");\r\n\t\t\tunfList = new ArrayList<UserInfo>();\r\n\t\t\tScanner myReader= new Scanner(myObj);\r\n\t\t\tint count=0;\r\n\t\t\twhile (myReader.hasNextLine()) \r\n\t\t\t{\r\n\t\t\t\tString data= myReader.nextLine();\r\n\t\t\t\tif (count !=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] info =data.split(\"\\\\,\");\r\n\t\t\t\t\tunfList.add(new UserInfo(info[0],info[1]));\r\n\t\t\t\t\t//unfList.add(new UserInfo(info[0], info[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t++count;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n\t\t\treturn unfList;\r\n\t}",
"@Override\n public void csvImport(String filename) {\n try {\n FileReader r = new FileReader(filename);\n Scanner in = new Scanner(r);\n\n while (in.hasNext()) {\n String firstInput = in.next().trim();\n String firstName = firstInput.substring(0, firstInput.length() - 1).trim();\n String lastInput = in.next().trim();\n String lastName = lastInput.substring(0, lastInput.length() - 1).trim();\n String ID = in.next().substring(0, 5);\n int pID = Integer.parseInt(ID);\n String grade = in.next();\n\n Student s = new Student(firstName, lastName, pID);\n Grade g = new Grade(grade);\n\n map.put(s, g);\n }\n checker = true;\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found\");\n checker = false;\n }\n }",
"public void read() {\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(\"studentData.dat\");\n\n\t\t\tObjectInputStream ois;\n\t\t\ttry {\n\t\t\t\tois = new ObjectInputStream(fis);\n\t\t\t\ttry {\n\t\t\t\t\tstudentList = (ArrayList<Student>) ois.readObject();\n\t\t\t\t} catch (ClassNotFoundException 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\tois.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tprotected ListEntity parseList(InputStream is) throws Exception {\n\t\tVipStudentList studentList = VipStudentList.parse(is);\n\t\treturn studentList;\n\t}",
"public void createArrayList() throws IOException,ParseException\r\n\t {\n\t \t\r\n\t try(ICsvBeanReader beanReader = new CsvBeanReader(new FileReader(CSV_FILENAME), \r\n\t \t\tCsvPreference.STANDARD_PREFERENCE))\r\n\t {\r\n\t // the header elements are used to map the values to the bean\r\n\t final String[] headers = beanReader.getHeader(true);\r\n\t final CellProcessor[] processors = getProcessors();\r\n\t Complete customer;\r\n\t String gender,fullname;\r\n\t while ((customer = beanReader.read(Complete.class, headers, processors)) != null)\r\n\t {\r\n\t fullname = customer.getFirstname() + \" \" + customer.getLastname();\r\n\t if(customer.getGender().equals(\"f\"))\r\n\t \t gender = \"female\";\r\n\t \telse\r\n\t gender = \"male\";\r\n\t Date dob=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDob()); \r\n\t String pattern = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n \tString date = simpleDateFormat.format(dob);\r\n\t String age = calcAge(date);\r\n\t if(customer.getCategory().equals(\"student\"))\r\n\t {\r\n\t \tString grade = calcGrade(customer.getSec_percent());\r\n\t \tstudentList.add(new Student(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n\t \tcustomer.getContact_number(),Integer.parseInt(customer.getRoll_no()),customer.getClass_no(),Integer.parseInt(customer.getTotal_marks())\r\n\t \t,grade,Integer.parseInt(customer.getSec_percent()),customer.getHs_stream()));\r\n\t \t\t\r\n\t } \r\n\t else //for teacher\r\n\t {\r\n\t \tDate doj=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDoj()); \r\n\t \tString pattern1 = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat(pattern);\r\n \tString join_date = simpleDateFormat.format(doj);\r\n\t \tString str_sub_teachers = customer.getSubject_teaches();\r\n\t \tString service_period = calService(join_date);\r\n\t \tList<String> sub_teachers = new ArrayList<String>(Arrays.asList(str_sub_teachers.split(\"-\")));\r\n\t \t\t\t\r\n\t \t\tteacherList.add(new Teacher(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n \t\t\t\tcustomer.getContact_number(),customer.getEmp_no(),customer.getClass_teacher_of(),join_date,service_period\r\n \t\t\t\t,customer.getPrevious_school(),customer.getPost(),Integer.parseInt(customer.getSalary()),sub_teachers));\r\n }\r\n\t \r\n\t } //while\r\n\t }\r\n\t System.out.println(\"ArrayList Sucessfully Created\");\t\r\n\t \t\r\n\t }",
"public List<Lender> readCSVFile(String path){\r\n\r\n List<Lender> inputList = new ArrayList<>();\r\n try{\r\n File inputF = new File(path);\r\n InputStream inputFS = new FileInputStream(inputF);\r\n BufferedReader br = new BufferedReader(new InputStreamReader(inputFS));\r\n // skip the header of the csv\r\n inputList = br.lines().skip(1).map(mapToItem).collect(Collectors.toList());\r\n br.close();\r\n } catch (IOException e) {\r\n throw new QuoteException(\"Error reading the csv file\", e);\r\n }\r\n\r\n return inputList ;\r\n }",
"protected static ArrayList<String> load() throws Exception {\r\n\t\tArrayList<String> list;\r\n\t\tFileReader fileRead = new FileReader(csv);\r\n\t\tBufferedReader buff = Files.newBufferedReader(Paths.get(\"story.csv\"));\r\n\t\tlist = buff.lines().map(line -> line.split(\",\")).flatMap(Arrays::stream)\r\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\r\n\t\tbuff.close();\r\n\t\tfileRead.close();\r\n\r\n\t\treturn list;\r\n\t}",
"public void openPlayerDataFromCSV() throws FileNotFoundException {\n csvReader = new BufferedReader(new FileReader(PATH_TO_CSV));\n }",
"public static void loadcars() {\n Cars xx = new Cars();\n System.out.println(\"Load cars\");\n listcars.clear();\n try {\n File fileload = new File(\"cars.csv\");\n BufferedReader in = new BufferedReader(new FileReader(fileload));\n String st;\n while((st = in.readLine()) != null) {\n String[] strs = st.split(\"[,//;]\");\n addcar(strs[0], strs[1], strs[2],Integer.parseInt(strs[3]));\n }\n in.close();\n System.out.println(\"cars data restored from cars.csv\");\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n\n }",
"public void readCsvFile(String path) {\n\n // make sure the ArrayList is empty before you start recording the data\n if (!Records.isEmpty()) {\n Records.clear();\n }\n try {\n // read data from the .csv file\n System.out.println(\"Reading array list....\");\n BufferedReader br = new BufferedReader(new FileReader(path));\n // Skip the first line\n String line = br.readLine();\n while ((line = br.readLine()) != null) {\n\n String[] fields = line.split(\",\");\n Record record = new Record( // the fields in .csv are jumbled\n Integer.parseInt(fields[2]), // skierID\n Integer.parseInt(fields[3]), // liftID\n Integer.parseInt(fields[1]), // dayNum\n Integer.parseInt(fields[4])); // time\n Records.add(record);\n }\n\n br.close();\n System.out.println(\"!!Reading completed!!\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void readData(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\r\n String line = \"\";\r\n try {\r\n while ((line = reader.readLine()) != null) {\r\n //Split line by \",\"\r\n String[] fields = line.split(\",\");\r\n //Log.d(\"csvParseFieldLength\", String.valueOf(fields.length));\r\n ArrayList<Race> races = new ArrayList<>();\r\n if (fields[9].equals(\"\"))\r\n break;\r\n else {\r\n Swimmer s = new Swimmer(fields[0],fields[10], fields[9], Integer.parseInt(fields[8]), fields[7], races);\r\n swimmers.add(s);\r\n s.addRace(new Race(Integer.parseInt(fields[2]), Integer.parseInt(fields[3]), 0, null, (fields[4] + \" \" + fields[5])));\r\n \r\n EventID e = new EventID(eventId);\r\n String b = fields[12];\r\n \r\n \r\n if (!b.equals(\" \")) \r\n \te.addNames(b);\r\n \r\n \r\n \r\n }\r\n }\r\n } catch (IOException ex) {\r\n //Log.d(\"csvParseSwim\", \"Error reading data from file on line \" + line);\r\n }\r\n }",
"public void read()\r\n\t{\r\n\t\tScanner input = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\r\n\t\t\tinput = new Scanner(new File(\"netflix.csv\")).useDelimiter(\"[,\\r\\n]\");\r\n\r\n\t\t\twhile (input.hasNext())\r\n\t\t\t{\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tString title = input.next();\r\n\r\n\t\t\t\tString rating = input.next();\r\n\r\n\t\t\t\tint year = Integer.parseInt(input.next());\r\n\r\n\t\t\t\tint score = Integer.parseInt(input.next());\r\n\t\t\t\tMovie a = new Movie(title, rating, year, score);\r\n\t\t\t\tdata[i] = a;\r\n\t\t\t\ti++;\r\n\t\t\t\tactualSize++;\r\n\r\n\t\t\t}\r\n\t\t\tinput.close();\r\n\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}",
"@Override\n public ToDoList readCSV(String csvPath) throws InvalidArgumentException {\n this.csvPath = csvPath;\n this.toDoList = new ToDoList();\n\n BufferedReader inputFile = null;\n try {\n inputFile = new BufferedReader(new FileReader(this.csvPath));\n\n String line = inputFile.readLine();\n if (line == null) {\n inputFile.close();\n return this.toDoList;\n } // Empty CSV file, no need for processing.\n this.processHeader(line);\n while ((line = inputFile.readLine()) != null) {\n this.processToDoItem(line);\n }\n inputFile.close();\n return this.toDoList;\n } catch (FileNotFoundException fnfe) {\n throw new InvalidArgumentException(\"OOPS! File not found!\");\n } catch (IOException ioe) {\n throw new InvalidArgumentException(\"There is somthing wrong!\");\n }\n }",
"public ArrayList<Player> importPlayerData() {\n \n try {\n //Try to access player.csv in the given directory\n\t\t\tFile file = new File(\"data\\\\player.csv\");\n Scanner fileIn = new Scanner(file);\n \n fileIn.skip(\"userName,fullName,password,gold,exp,noOfLand\");\n \n\t\t\t//Use comma as delimiter in extracting various player info\n\t\t\tfileIn.useDelimiter(\",|\\r\\n|\\n\");\n \n while (fileIn.hasNext()) {\n String userName = fileIn.next().trim();\n String fullName = fileIn.next().trim();\n String password = fileIn.next().trim();\n int gold = fileIn.nextInt();\n int exp = fileIn.nextInt();\n\t\t\t\tint noOfLand = fileIn.nextInt();\n\t\t\t\t\n\t\t\t\t//Create new players based on extracted info\n Player player = new Player(userName, fullName, password, gold, exp, noOfLand);\n\t\t\t\t\n\t\t\t\t//Add players to playerList\n playerList.add(player);\n }\n \n }\n \n catch (IOException e) {\n //Specify the location of IOException\n\t\t\te.printStackTrace();\n }\n\t\t\n\t\treturn playerList;\n\t}",
"List<String[]> readCsv(String inputFilePath)throws IOException;",
"private static List<Student> loadStudentList(File file) throws IOException {\n return loadStudentList(new FileInputStream(file));\n }",
"private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }",
"private static boolean loadStudents() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(STUDENTS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a student\n\t\t\n\t\tString line = reader.readLine(); //read the properties of each student in the students.txt file\n\t\t/*read students.txt file, set the input for each studentDetails object and add each StudentDetails object to ALL_STUDENTS ArrayList*/\n\t\twhile(line != null){\n\t\t\tStudentDetails student = new StudentDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each StudentDetails object are separated by tab spaces in the students.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setStudentInput(i, details[i], student)){ //checks if there was an error in setting the StudentDetails object's properties with the values in the students.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Students\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tALL_STUDENTS.add(student);\n\t\t\t/*Add Students who have been fined (total fine > 0) to the FINED_STUDENTS Hashtable*/\n\t\t\taddFinedStudentsToTable(student);\n\t\t\tline = reader.readLine();\n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Students - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}",
"@Override\n\tpublic void parseCSV(String csv) {\n\t\t\n\t}",
"private void loadAllCountData(){\n // load from csv\n try{\n FileReader file = new FileReader(\"/home/ubuntu/user_counts_small.csv\");\n //FileReader file = new FileReader(\"/Users/YHWH/Desktop/cloud computing/team project/user_counts.csv\");\n BufferedReader buff = new BufferedReader(file);\n String line = \"\";\n boolean eof = false;\n\n while(!eof){\n line = buff.readLine();\n if(line == null){\n eof = true;\n }\n else{\n String[] data = line.split(\"\\t\"); //0->id, 1->selfCount, 2->prevCount\n wholeCountData.put(data[0], Integer.parseInt(data[2]));\n }\n }\n buff.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }",
"public void loadCSVData() throws IOException, SQLException {\r\n //SQL statement to load csv information into data table\r\n String insertvaluesSQL = \"INSERT INTO data\"\r\n + \"(InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country)\"\r\n + \" VALUES (?,?,?,?,?,?,?,?);\";\r\n\r\n //code to read csv file taken from W03 practical\r\n BufferedReader br = new BufferedReader(new FileReader(filePath));\r\n String line = br.readLine();\r\n String[] informationArray;\r\n while (line != null) {\r\n informationArray = line.split(\",\");\r\n PreparedStatement preparedStatement = connection.prepareStatement(insertvaluesSQL);\r\n //the first '?' corresponds to the 0th term in the information array\r\n //the second '?' corresponds to the 1st term in the information array\r\n for (int i = 1; i < 9; i++) {\r\n preparedStatement.setString(i, informationArray[i - 1]);\r\n }\r\n preparedStatement.executeUpdate();\r\n line = br.readLine();\r\n }\r\n Statement statement = connection.createStatement();\r\n statement.executeUpdate(\"DELETE FROM data WHERE InvoiceNo = 'InvoiceNo';\");\r\n statement.close();\r\n }",
"private ArrayList<String> getFileData(InputStream is) {\n ArrayList<String> restaurantData = new ArrayList<>();\n\n // Initialize the reader for the csv file\n BufferedReader reader = new BufferedReader(new InputStreamReader(is,\n Charset.forName(\"UTF-8\")));\n\n // Read each line into the ArrayList\n try {\n // Read the file\n String row;\n while ((row = reader.readLine()) != null) {\n restaurantData.add(row);\n }\n } catch (IOException ex) {\n Log.i(TAG, \"Error reading line\", ex);\n } finally {\n try {\n // Close the file\n reader.close();\n } catch (IOException ex) {\n Log.i(TAG, \"Error closing file\", ex);\n }\n }\n\n // Return data\n return restaurantData;\n }",
"public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}",
"public List<Student> getAllStudentData() {\r\n\t\tList<Student> list = new ArrayList<Student>();\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"select * from student\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStudent stud = new Student();\r\n\r\n\t\t\t\tstud.setRollno(rs.getInt(1));\r\n\t\t\t\tstud.setFname(rs.getString(2));\r\n\t\t\t\tstud.setLname(rs.getString(3));\r\n\t\t\t\tstud.setEmail(rs.getString(4));\r\n\t\t\t\tstud.setGender(rs.getString(5));\r\n\t\t\t\tstud.setDOB(rs.getString(6));\r\n\t\t\t\tstud.setAddress(rs.getString(7));\r\n\t\t\t\tstud.setContact(rs.getString(8));\r\n\r\n\t\t\t\tlist.add(stud);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}",
"private static List<StudentRecord> convert(List<String> lines) {\n\t\tObjects.requireNonNull(lines);\n\t\t\n\t\tArrayList<StudentRecord> result = new ArrayList<>(lines.size());\n\t\t\n\t\tfor(String data : lines) {\n\t\t\tif(data.length() == 0) continue; //preskoci prazne linije\n\t\t\tScanner sc = new Scanner(data);\n\t\t\tsc.useDelimiter(\"\\t\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tresult.add(new StudentRecord(sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next()));\n\t\t\t}catch(NoSuchElementException e) {\n\t\t\t\tsc.close();\n\t\t\t\tthrow new NoSuchElementException(\"Data not formatted correctly.\");\n\t\t\t}\n\t\t\tsc.close();\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public List readCSVIntoList(String path, List appendToThisList,\n\t\t\tImportType type) {\n\n\t\tif (appendToThisList != null) {\n\t\t\ttry {\n\t\t\t\tint ver = 153;\n\n\t\t\t\tif (fileReader == null) fileReader = new CsvReader(path);\n\t\t\t\tfileReader.readHeaders();\n\n\t\t\t\twhile (fileReader.readRecord()) {\n\t\t\t\t\tswitch (type) {\n/*\n\t\t\t\t\tcase Advantage:\n\t\t\t\t\t\treadAdv(appendToThisList, ver);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase Skill:\n\t\t\t\t\t\treadSkill(appendToThisList, ver);\n\t\t\t\t\t\tbreak;\n*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tcase FlowChart:\n\t\t\t\t\t\treadStep(appendToThisList, ver);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfileReader.close();\n\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n//\t\t\t\tLog.e(\"CsvRead failed FNF: \", e.toString());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n//\t\t\t\tLog.e(\"CsvRead failed IO: \", e.toString());\n\t\t\t}\n\t\t}\n\t\tfileReader = null;\n\t\treturn appendToThisList;\n\t}",
"public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }",
"public static LinkedList<Patient> CSVImport(String str) {\n\t\treturn CSVImport(new File(str));\n\t}",
"static Student[] readStudentsFromFile(String filename, int num) {\n\t\ttry (Scanner in = new Scanner(new File(filename))) {\n\t\t\tStudent[] students = new Student[num];\n\t\t\tint index = 0; //prevents ArrayIndexOutOfBounds\n\t\t\tString line;\n\t\t\tString[] input;\n\n\t\t\twhile (in.hasNextLine()) {\n\t\t\t\tline = in.nextLine();\n\t\t\t\tinput = line.split(\",\"); //Splits each String input by the character ','\n\t\t\t\tstudents[index++] = new Student(input[0], Integer.parseInt(input[1]), input[2]);\n\t\t\t}\n\t\t\treturn students;\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"private static ArrayList<Glootie> loadAliensFromFile(String pathToCSV) throws Exception{\r\n\t\tArrayList<Glootie> alienArray = new ArrayList<>();\r\n\t\tBufferedReader csvReader = new BufferedReader(new FileReader(pathToCSV));\r\n\t\t//Read and ignore header row:\r\n\t\tString row = csvReader.readLine();\r\n\t\t//Read remain data from CSV file\r\n\t\twhile ((row = csvReader.readLine()) != null) {\r\n\t\t\tString[] data = row.split(\",\");\r\n\t\t\t// Add new Glootie to array\r\n\t\t\talienArray.add(new Glootie(data));\r\n\t\t}\r\n\t\tcsvReader.close();\r\n\r\n\t\treturn alienArray;\r\n\t}",
"private void readingFiles() {\r\n\r\n File sdCard = Environment.getExternalStorageDirectory();\r\n File directory = new File(sdCard.getAbsoluteFile() + \"/MyApplication\");\r\n\r\n //List of names\r\n File name = new File(directory, \"nameList.csv\");\r\n FileInputStream fIn = null;\r\n try {\r\n fIn = new FileInputStream(name);\r\n InputStreamReader isr = new InputStreamReader(fIn);\r\n char[] inputBuffer = new char[READ_BLOCK_SIZE];\r\n String s = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer, 0, charRead);\r\n s += readString;\r\n inputBuffer = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s.split(\",\");\r\n nameList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n nameList = new ArrayList<String>();\r\n }\r\n\r\n //List of latitudes\r\n File lat = new File(directory, \"latList.csv\");\r\n FileInputStream fIn1 = null;\r\n try {\r\n fIn1 = new FileInputStream(lat);\r\n InputStreamReader isr = new InputStreamReader(fIn1);\r\n char[] inputBuffer1 = new char[READ_BLOCK_SIZE];\r\n String s1 = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer1)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer1, 0, charRead);\r\n s1 += readString;\r\n inputBuffer1 = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s1.split(\",\");\r\n latList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n latList = new ArrayList<String>();\r\n }\r\n\r\n //List of longitudes\r\n File lng = new File(directory, \"lngList.csv\");\r\n FileInputStream fIn2 = null;\r\n try {\r\n fIn2 = new FileInputStream(lng);\r\n InputStreamReader isr = new InputStreamReader(fIn2);\r\n char[] inputBuffer2 = new char[READ_BLOCK_SIZE];\r\n String s2 = \"\";\r\n int charRead;\r\n while ((charRead = isr.read(inputBuffer2)) > 0) {\r\n String readString = String.copyValueOf(inputBuffer2, 0, charRead);\r\n s2 += readString;\r\n inputBuffer2 = new char[READ_BLOCK_SIZE];\r\n }\r\n\r\n String[] retrievedStringArray = s2.split(\",\");\r\n lngList = new ArrayList<String>(Arrays.asList(retrievedStringArray));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n lngList = new ArrayList<String>();\r\n }\r\n if (lngList.get(0) == \"\") {\r\n lngList.remove(0);\r\n }\r\n if (latList.get(0) == \"\") {\r\n latList.remove(0);\r\n }\r\n if (nameList.get(0) == \"\") {\r\n nameList.remove(0);\r\n }\r\n }",
"public void loadDataFromFile(String name) throws FileNotFoundException {\n\t\tFileReader reader = new FileReader(name);\n\t\tScanner in = new Scanner(reader);\n\t\twhile(in.hasNextLine()) {\n\t\t\tString readName = \"\";\n\t\t\tString readScore = \"\";\n\t\t\tint intScore = 0;\n\t\t\treadName = in.nextLine();\n\t\t\treadScore = in.nextLine();\n\t\t\ttry {\n\t\t\tintScore = Integer.parseInt(readScore);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tSystem.out.println(\"Incorrect format for \" + readName + \" not a valid score: \" + readScore);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstudents.add(new Student(readName,intScore));\n\t\t}\n\t}",
"ArrayList retrievestudentdata() throws ClassNotFoundException;",
"public void importStudents(String fileName) throws FileNotFoundException\n {\n Scanner inf = new Scanner(new File(fileName));\n while(inf.hasNextLine())\n {\n String first = inf.nextLine();\n String last = inf.nextLine();\n String password = inf.nextLine();\n String p1 = inf.nextLine();\n String p2 = inf.nextLine();\n String p3 = inf.nextLine();\n String p4 = inf.nextLine();\n String p5 = inf.nextLine();\n String p6 = inf.nextLine();\n String p7 = inf.nextLine();\n String p8 = inf.nextLine();\n \n students.add(new Student(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8, this));\n }\n }",
"public static String loadStudentList() {\n\n // Variable used to organize code and allow buffered reader to close\n String bufferedStudentList = \" \"; \n\n // The try...catch block handles the possible error that may occur if \n // there was an issue with accessing the file. \n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(Constants.STUDENT_LIST));\n bufferedStudentList = bufferedReader.readLine();\n bufferedReader.close();\n } catch (IOException exception) {\n System.out.println(exception);\n } \n return bufferedStudentList; \n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic CopyOnWriteArrayList<User> importUserList() throws IOException, ClassNotFoundException, FileNotFoundException {\r\n\t\tObjectInputStream in;\r\n\t\tCopyOnWriteArrayList<User> tmpUserList = new CopyOnWriteArrayList<User>();\r\n\t\tin= new ObjectInputStream(\r\n\t\t\t\tnew BufferedInputStream(\r\n\t\t\t\t\t\tnew FileInputStream(\"userList.dat\")));\r\n\t\ttmpUserList= (CopyOnWriteArrayList<User>)in.readObject();\r\n\t\tin.close();\r\n\t\treturn tmpUserList;\r\n\t}",
"public static Stream<List<String>> parse(InputStream in) {\n BufferedReader br = UTF8IoUtils.readerFromStream(in);\n return br.lines().map(CSVUtils::parseLine);\n }",
"@Override\n\t@Transactional\n\tpublic Corpus importCSV(InputStream stream, User user, String name) throws IOException\n\t{\n\t\tCorpus corpus = new Corpus();\n\t\tcorpus.setUser(user);\n\t\tcorpus.setName(name);\n\t\tcorpus.setState(Collect.State.SHUTDOWN);\n\t\tcorpus = repository.save(corpus);\n\n\t\tICsvBeanReader reader = new CsvBeanReader(new InputStreamReader(stream),CsvPreference.STANDARD_PREFERENCE);\n\t\treader.getHeader(true);\n\t\tfinal String[] header = getHeaders();\n\n\t\tTweet tweet;\n\t\tint i =0;\n\t\twhile ((tweet = reader.read(Tweet.class,header,getProcessors())) != null && i < LIMIT)\n\t\t{\n\n\t\t\ttweet.setId(null);\n\t\t\ttweet.setCorpus(corpus);\n\t\t\ttweetRepository.save(tweet);\n\t\t\ti++;\n\t\t}\n\n\t\treturn repository.findById(corpus.getId());\n\t}",
"private void readNodes() throws FileNotFoundException{\n\t\tScanner sc = new Scanner(new File(\"Resources\\\\ListOfNodes.csv\"));\n\t\tsc.nextLine(); //Skip first line of headers\n\t\twhile(sc.hasNext()) { \n\t\t\tCSVdata = sc.nextLine().split(\",\"); // Add contents of each row to String[]\n\t\t\tnodes.add(new GraphNode<String>(CSVdata[0], CSVdata[1])); // Add new node to object list\n\t\t}\n\t\tsc.close();\n\t}",
"public void readEntityCSV(String line) {\n List<String> items = Arrays.asList(line.split(\",\"));\n this.setId(Long.valueOf(items.get(0)));\n this.noOfRounds = Integer.parseInt(items.get(1));\n this.caliber = Float.parseFloat(items.get(2));\n this.manufacturer = items.get(3);\n this.price = Float.parseFloat(items.get(4));\n }",
"private ArrayList<User> loadUsers(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<User>>(){}.getType();\r\n\t\tArrayList<User> users = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn users;\r\n\t}",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\"})\n\tpublic static ArrayList<StudentCourse> initStudentCourses() throws IOException, ParseException {\n\t\t// read String from text file\n\t\tArrayList<String> stringArray = (ArrayList) IO.read(Main.studentcoursepath.toString());\n\t\t\t\n\t\tif (stringArray.size() == 0){\n\t\t\treturn new ArrayList<StudentCourse>();\n\t\t}\n for (int i = 0 ; i < stringArray.size() ; i++) {\n\t\t\t\tString field = (String) stringArray.get(i);\n\n\t\t\t\t// get individual 'fields' of the string separated by SEPARATOR\n\t\t\t\t// pass in the string to the string tokenizer using delimiter \",\"\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(field, SEPARATOR);\n\n\t\t\t\t//first to fifth tokens\n\t\t\t\tString userID = tokenizer.nextToken().trim();\n\t\t\t\tString userName = tokenizer.nextToken().trim();\n\t\t\t\tString courseID = tokenizer.nextToken().trim();\n\t\t\t\tint indexID = Integer.parseInt(tokenizer.nextToken().trim());\n\t\t\t\tString registerStatus = tokenizer.nextToken().trim();\n\n\t\t\t\t// create Course object from file data\n\t\t\t\tStudentCourse course = new StudentCourse(userID, userName, courseID, indexID, registerStatus);\n\t\t\t\t// add to Courses list\n\t\t\t\tstudentCourseList.add(course) ;\n\t\t}\n\t\treturn studentCourseList ;\n\t}",
"public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}",
"private static ArrayList<Ms3Person> readCSV(String fileName) {\r\n\t\tArrayList<Ms3Person> personsList = new ArrayList<>();\r\n\t\ttry (Scanner sc = new Scanner(new File(fileName))) {\r\n\t\t\t// skip the first line which is having column headers name\r\n\t\t\tsc.nextLine();\r\n\t\t\tint index = 1;\r\n\t\t\t// loop will go till end of file is reached ie.\r\n\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t// read single line at a time\r\n\t\t\t\tString personData = sc.nextLine();\r\n\t\t\t\tif(index >=5999)\r\n\t\t\t\t\tSystem.out.println(index+\" index\"+personData);\r\n\t\t\t\t//System.out.println(personData);\r\n\t\t\t\t//split the string by delimiter ,\r\n\t\t\t\tif(personData.length()>2) {\r\n\t\t\t\t\tString singlePersonRecord[] = personData.split(\",\");\r\n\t\t\t\t\t//the data we get is in form of sTring we need to convert\r\n\t\t\t\t\t//it to required data type for usage\r\n\t\t\t\t\tMs3Person person = convertDataToRequiredDataType(singlePersonRecord,index);\r\n\t\t\t\t\tif (person != null) {\r\n\t\t\t\t\t\t// add the person object in ArrayList\r\n\t\t\t\t\t\tpersonsList.add(person);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// bad data so create new file & write data\r\n // writing to the logfile\r\n \r\n \r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"index: \" + index);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tif(personData.length()<1) {//if no more line is there or only empty lines left\r\n\t\t\t\t\t\tSystem.out.println(\"finished reading the file...\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// if any exception arises while reading the file data that exception\r\n\t\t\t// will be caught in this block\r\n\t\t\tSystem.out.println(\"EXCEPTION: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn personsList;\r\n\t}",
"public static ArrayList<ArrayList<String>> getAllDataFromFile(String csvInputPath, char sep) {\n ArrayList<ArrayList<String>> allData = new ArrayList<>();\r\n try (CSVReader reader = new CSVReader(new InputStreamReader(new FileInputStream(csvInputPath)), sep, '\"', '|');) {\r\n String[] nextLine;\r\n int numRow = 0;\r\n while ((nextLine = reader.readNext()) != null && numRow < MAX_ROW_NUMBER) {\r\n ArrayList<String> allRow = new ArrayList<>();\r\n allRow.addAll(Arrays.asList(nextLine));\r\n allData.add(allRow);\r\n numRow += 1;\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageExcel.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n\r\n } catch (IOException ex) {\r\n Logger.getLogger(ManageExcel.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return allData;\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Student> retrieveAllStudentObjects() {\r\n\t\tList<Student> listOfStudents = new ArrayList<Student>();\r\n\r\n\t\ttry {\r\n\t\t\tlistOfStudents = readSerializedObject();\r\n\r\n\t\t\tif (listOfStudents == null) {\r\n\t\t\t\tSystem.out.println(\"Unable to read from file!\");\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn listOfStudents;\r\n\t}",
"public void fillBoardFromCSV(String pathToCSV){\r\n \r\n BufferedReader br = null;\r\n String line = \" \";\r\n int index = 0;\r\n \r\n \r\n try{\r\n br = new BufferedReader(new FileReader(pathToCSV));\r\n while ((line = br.readLine()) != null) {\r\n String[] lines = line.split(\",\");\r\n System.out.println(lines.length);\r\n for(int i = 0; i < 11; i++){\r\n if(lines[i].equals(\"f\")){\r\n board[index][i] = new Flat(index,i);\r\n }\r\n if(lines[i].equals(\"s\")){\r\n board[index][i] = new Slot(index,i);\r\n }\r\n }\r\n index++; \r\n }\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n if (br != null) {\r\n try {\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n \r\n \r\n }",
"public Set<Airport> loadFile(final String csvFile) throws CoreException;",
"@Override\n\tprotected ListEntity readList(Serializable seri) {\n\t\treturn (VipStudentList)seri;\n\t}",
"public static void bulkLoadFromInputStream(Connection cnn,String loadDataSql, InputStream dataStream) throws Exception {\n\t\tif(dataStream==null){\n\t\t\tLog.info(\"InputStream is null ,No data is imported\");\n\t\t\tthrow new IOException(\"inputstream is null!\");\n\t\t}\n\n\t\tStatement myStatement = (com.mysql.jdbc.Statement)cnn.createStatement();\n\n\t\tmyStatement.setLocalInfileInputStream(dataStream);\n\t\t\t\t\n\t\tmyStatement.execute(loadDataSql);\n\t}",
"public int loadData(Reader csv, KeywordFactory kwf) \n throws InterruptedException, IOException\n {\n return loadData(csv, kwf, false);\n }",
"public LoadCSV(String file_position){\r\n this.file_position = file_position;\r\n }",
"@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"List<String[]> readCsv(String inputFilePath, char separator)throws IOException;",
"@Override\n DBO consume(String csv) throws TransformerException;",
"List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;",
"public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }",
"public ArrayList<Invoice> readFromCsv() throws IOException {\n if (!FileIOHelper.exists(this.orderCsv)) return new ArrayList<>(); // Empty array list\n BufferedReader csvFile = FileIOHelper.getFileBufferedReader(this.orderCsv);\n List<String[]> csvLines = readAll(csvFile, 1);\n ArrayList<Invoice> items = new ArrayList<>();\n if (csvLines.size() == 0) return items;\n csvLines.forEach((str) -> items.add(new Invoice(str)));\n return items;\n }",
"private void loadData() throws Exception {\n List<Student> listOfStudents = new ArrayList<>();\n DocumentBuilderFactory documentBuilderFactory =\n DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder =\n documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(XMLfile);\n Element root = document.getDocumentElement();\n\n NodeList nodes = root.getChildNodes();\n int len = nodes.getLength();\n for (int i = 0; i < len; i++) {\n Node studentNode = nodes.item(i);\n if (studentNode instanceof Element) {\n Student b = createStudent((Element) studentNode);\n listOfStudents.add(b);\n }\n }\n Map<Long, Student> map= new HashMap<>();\n for (Student s : listOfStudents){\n map.putIfAbsent(s.getId(),s);\n }\n this.setEntities(map);\n }",
"public void loadStudents(File filePath){\r\n Index.resetIndex();\r\n List<Student> students = DataConvert.loadStudentsDataFromCSV(filePath);\r\n List<String> errorMessage = new ArrayList<>();\r\n students.forEach(student -> {\r\n try{\r\n addStudent(student);\r\n } catch (ValidationException ex){\r\n errorMessage.add(\"=========================================\\n\");\r\n errorMessage.add(student.toString() + \" - \" + ex.getMessage());\r\n errorMessage.add(\"=========================================\\n\");\r\n }\r\n });\r\n if(!errorMessage.isEmpty()){\r\n String error = errorMessage.stream().reduce(\"\", (s1, s2)-> s1 += s2);\r\n throw new ValidationException(error);\r\n }\r\n }",
"public List<Country> readCountriesFromCSV(String fileName){\n try {\n Scanner scanner = new Scanner(new File(fileName));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n while(scanner.hasNextLine()){\n lsta.add(createCountry(scanner.nextLine().split(\",\")));\n// System.out.println(pyr.get_pharaoh()+\"|\"+pyr.get_modern_name()+\"|\"+pyr.get_site()+\"|\"+pyr.get_height()+\"|\");\n }\n scanner.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(CityCSVDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return lsta;\n }",
"public static int loadSchools(ArrayList<School> H) {\n\n\t\tboolean isValid = false;\n\n\t\tString values[] = new String[4002];\n\n\t\tString line = \"\";\n\t\tString strLine = \"\";\n\t\tdouble alpha = 0.00;\n\t\tint i = 0;\n\t\tint successfulSchools = 0;\n\t\tschoolsEntered = 0; // as soon as loadSchools is called\n\t\t// schoolsEntered += loadedSchoolsNum;\n\n\t\tString school_file = \"\";\n\n\t\tdo {\n\t\t\tisValid = true;\n\n\t\t\ttry {\n\t\t\t\tSystem.out.print(\"Enter school file name (0 to cancel): \");\n\t\t\t\tschool_file = input.readLine();\n\t\t\t\tif (school_file.equalsIgnoreCase(\"0\")) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"File loading process canceled.\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\tBufferedReader fin = new BufferedReader(new FileReader(\n\t\t\t\t\t\tschool_file));\n\t\t\t\t// After file has been read, we'll start parsing through it and\n\t\t\t\t// populating our School Object with the relevant data.\n\t\t\t\t// get number of schools with a while loop\n\t\t\t\twhile ((line = fin.readLine()) != null) {\n\n\t\t\t\t\tvalues = line.split(\",\");\n\t\t\t\t\tif (values.length == 3) {\n\n\t\t\t\t\t\tif ((Double.parseDouble(values[1]) <= 1.00)\n\t\t\t\t\t\t\t\t&& (Double.parseDouble(values[1]) >= 0.00)) {\n\t\t\t\t\t\t\t// H[schoolsEntered] = new School( values[0],\n\t\t\t\t\t\t\t// Double.parseDouble(values[1]), numStudentsAdded);\n\t\t\t\t\t\t\t// System.out.println(H[schoolsEntered].getName());\n\t\t\t\t\t\t\tif (Integer.parseInt(values[2]) >= 1) {\n\t\t\t\t\t\t\t\t// took out loadedSchoolsNum\n\t\t\t\t\t\t\t\tH.add(new School(values[0], Double\n\t\t\t\t\t\t\t\t\t\t.parseDouble(values[1]),\n\t\t\t\t\t\t\t\t\t\tnumStudentsAdded, Integer\n\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(values[2])));\n\t\t\t\t\t\t\t\tloadedSchoolsNum++;\n\t\t\t\t\t\t\t\tsuccessfulSchools++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tschoolsEntered++;\n\t\t\t\t}\n\n\t\t\t\tfin.close();\n\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"ERROR: File not found!\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tisValid = false;\n\t\t\t} catch (IOException e) {\n\n\t\t\t}\n\n\t\t} while (!isValid);\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(successfulSchools + \" of \" + schoolsEntered\n\t\t\t\t+ \" schools loaded!\");\n\t\tSystem.out.println(\"\");\n\n\t\treturn successfulSchools;\n\n\t}",
"public void loadItems() {\n\t\tArrayList<String> lines = readData();\n\t\tfor (int i = 1; i < lines.size(); i++) {\n\t\t\tString line = lines.get(i);\n\t\t\t\n\t\t\tString[] parts = line.split(\",\");\n\t\t\t\n//\t\t\tSystem.out.println(\"Name: \" + parts[0]);\n//\t\t\tSystem.out.println(\"Amount: \" + parts[1]);\n//\t\t\tSystem.out.println(\"Price: \" + parts[2]);\n//\t\t\tSystem.out.println(\"-------\");\n\t\t\t\n\t\t\tString name = parts[0].trim();\n\t\t\tint amount = Integer.parseInt(parts[1].trim());\n\t\t\tdouble price = Double.parseDouble(parts[2].trim());\n\t\t\t\n\t\t\tItem item = new Item(name, amount, price);\n\t\t\titemsInStock.add(item);\n\t\t}\n\t}",
"private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }",
"public void load(){\n\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open Streams\n\t\t\tFileInputStream inFile = new FileInputStream(\"user.ser\");\n\t\t\tObjectInputStream objIn = new ObjectInputStream(inFile);\n\t\t\t\n\t\t\t// Load the existing UserList at the head\n\t\t\tthis.head = (User)objIn.readObject();\n\t\t\t\n\t\t\t// Close Streams\n\t\t\tobjIn.close();\n\t\t\tinFile.close();\n\t\t}\n\n\t\tcatch(Exception d) {\n\t\t System.out.println(\"Error loading\");\n\t\t}\n\n\t}",
"private static ArrayList<QueryCoordinates> loadCoordinatesFromCSVString(String csvStr, boolean debugMode) {\n\t\tArrayList<QueryCoordinates> records = new ArrayList<QueryCoordinates>();\n\t\ttry {\n\t\t\tCSVParser csv = CSVParser.parse(csvStr,\n\t\t\t\t\tCSVFormat.DEFAULT.withFirstRecordAsHeader().withIgnoreHeaderCase().withTrim());\n\t\t\tfor (CSVRecord csvRecord : csv) {\n\t\t\t\ttry {\n\t\t\t\t\tdouble startLon = Double.parseDouble(csvRecord.get(\"start_lon\"));\n\t\t\t\t\tdouble startLat = Double.parseDouble(csvRecord.get(\"start_lat\"));\n\t\t\t\t\tdouble endLon = Double.parseDouble(csvRecord.get(\"end_lon\"));\n\t\t\t\t\tdouble endLat = Double.parseDouble(csvRecord.get(\"end_lat\"));\n\t\t\t\t\trecords.add(new QueryCoordinates(startLon, startLat, endLon, endLat));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t// ignore invalid rows and try to read all other...\n\t\t\t\t\tString errorMsg = \"CSV input file seems to be formatted incorrectly. Every data field has to contain a float value.\";\n\t\t\t\t\tprintError(errorMsg, null, 0, debugMode, e);\n\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tString errorMsg = \"CSV input file could not be read. Make sure the separator character is a comma: ','\";\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t} catch (IllegalStateException e) {\n\t\t\tString errorMsg = \"CSV input file seems to be formatted incorrectly. Make sure the file has a header row like \\\"start_lon\\\",\\\"start_lat\\\",\\\"end_lon\\\",\\\"end_lat\\\".\";\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tString errorMsg = \"CSV input file seems to be formatted incorrectly. Make sure the file has a header row like \\\"start_lon\\\",\\\"start_lat\\\",\\\"end_lon\\\",\\\"end_lat\\\".\";\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t}\n\t\treturn records;\n\t}",
"@Override\n protected void processLine(String line) {\n String[] lines = line.split(\",\");\n for (String l : lines) {\n data.add(l);\n }\n }",
"public List<Utilisateur> generateData() throws FileNotFoundException, IOException {\n Reader reader = new FileReader(\"F:\\\\Bibliothèques\\\\Documents\\\\MIAGE M1\\\\WEB\\\\TPWeb\\\\src\\\\main\\\\webapp\\\\data.csv\");\n\n CSVReader<Utilisateur> csvPersonReader = new CSVReaderBuilder<Utilisateur>(reader).entryParser(new UtilisateurEntryParser()).build();\n\n List<Utilisateur> persons = csvPersonReader.readAll();\n\n return persons;\n\n }",
"static void loadCourse() {\n\t\tScanner inputStreamC = null; // create object variable for Course\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStreamC = new Scanner(new File(\"course.txt\"));\n\t\t\tinputStreamC.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No Course Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStreamC.hasNext()) {\n\n\t\t\t\tString readCourseID = inputStreamC.next();\n\t\t\t\tString readCourseName = inputStreamC.next();\n\t\t\t\tString readCourseUserName = inputStreamC.next();\n\t\t\t\t\n\t\t\t\tCourse c1 = new Course(readCourseID, readCourseName, readCourseUserName);\n\t\t\t\tcourseInfoArray.add(c1);\n\t\t\t\t//System.out.println(\"Read a Course \" + c1.getCourseID() + \" \" + c1.getCourseName() + \" \"\t+ c1.getCoordinatorUserID());\n\t\t\t\t\n\t\t\t} //eo while\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStreamC.close();\n\t}",
"private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static List<Sample> readCSV(String Location){\n\t\tList<Sample> SampleList= new ArrayList<Sample>();\n\n\t\tFileReader fileReader = null;\n\n\t\tCSVParser csvFileParser = null;\n\n\t\tCSVFormat csvFileFormat = CSVFormat.DEFAULT.withSkipHeaderRecord();\n\t\ttry {\n\n\t\t\t//initialize FileReader object\n\t\t\tfileReader = new FileReader(Location);\n\n\t\t\t//initialize CSVParser object\n\t\t\tcsvFileParser = new CSVParser(fileReader, csvFileFormat);\n\n\t\t\t//Get a list of CSV file records\n\t\t\tList<CSVRecord> csvRecords = csvFileParser.getRecords(); \n\n\t\t\tint start=0;\n\t\t\tString check = csvRecords.get(0).get(0);\n\t\t\tif(check.equals(\"Time\")){\n\t\t\t\tstart=1;\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstart=0;\n\t\t\t}\n\n\t\t\t//Read the CSV file records \n\t\t\tfor (int j = start; j < csvRecords.size(); j++) {\n\n\t\t\t\tCSVRecord record = csvRecords.get(j);\n\t\t\t\tList<wifi> listOfWifi= new ArrayList<wifi>();\n\n\n\t\t\t\tboolean end=true;\n\t\t\t\tfor( int i=6; i<record.size()&&end; ){\n\t\t\t\t\tif(record.get(i).trim().equals(\"\") && record.get(i+1).trim().equals(\"\")){\n\t\t\t\t\t\tend=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(i+3<record.size()){\n\t\t\t\t\t\tlistOfWifi.add(new wifi(record.get(i), record.get(i+1), record.get(i+3), record.get(i+2)));\n\t\t\t\t\t}\n\t\t\t\t\ti+=4;\n\t\t\t\t}\t\t\n\t\t\t\tString recordlat;\n\t\t\t\tString recordlon;\n\t\t\t\tString recordAlt;\n\n\t\t\t\tif (record.get(2).equals(\"?\")){\n\t\t\t\t\trecordlat=\"-200\";\n\t\t\t\t\trecordlon=\"-200\";\n\t\t\t\t\trecordAlt=\"-200\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\trecordlat=record.get(2); \n\t\t\t\t\trecordlon=record.get(3);\n\t\t\t\t\trecordAlt=record.get(4);\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t\t\tSample sample= new Sample(record.get(0), record.get(1),recordlat,recordlon,recordAlt,\n\t\t\t\t\t\t\trecord.get(5), listOfWifi);\n\t\t\t\t\tSampleList.add(sample);\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tSystem.out.println(\"not in format 46 CSV file\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} \n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Error in CsvFileReader !!!\");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileReader.close();\n\t\t\t\tcsvFileParser.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error while closing fileReader/csvFileParser !!!\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn SampleList;\n\t}",
"public Set<Airport> loadFile(final File csvFile) throws CoreException;",
"protected void loadFile(String resourcePath) {\n // Locate the resource in the classpath\n //URL fileUrl = this.getClass().getResource(resourcePath);\n //File f = new File(fileUrl.getFile());\n List<String[]> data = new LinkedList<>();\n String readLine;\n String[] splitLine;\n\n InputStream in = this.getClass().getResourceAsStream(resourcePath);\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n /*\n Attempt to read the data from the csv file, provided the input stream was\n actually opened and store the String[] by splitting.\n */\n try {\n log.info(\"Reading data from {}\", resourcePath);\n while((readLine = reader.readLine()) != null) {\n splitLine = readLine.split(DELIMITER);\n\n if (this.validateData(splitLine))\n data.add(splitLine);\n else\n log.error(\"Skipping {}\", readLine);\n }\n }\n catch(IOException e) {\n log.debug(e.getLocalizedMessage());\n }\n finally {\n IOUtils.closeQuietly(reader);\n IOUtils.closeQuietly(in);\n }\n\n //Using toMap collector to provide a keyMapper function that serves as a test for duplicates based on the passenger ID.\n //https://stackoverflow.com/questions/52148400/remove-duplicates-from-a-list-of-string-array\n //This will use the first element as a key and the currently selected element as the value for mapping\n this.lines = new LinkedList<>(\n data.stream().collect(Collectors.toMap(arr -> arr[0], Function.identity(),\n (a, b) -> a)).values());\n\n log.info(\"File {} with {} lines has been loaded\", resourcePath, lines.size());\n }",
"public List<T> readDataFromStream(InputStream stream, boolean readFirstLine) throws IOException {\n\n List<T> typeBeans = new LinkedList<>();\n try (ICsvBeanReader beanReader = new CsvBeanReader(new BufferedReader(new InputStreamReader(stream)),\n CsvPreference.TAB_PREFERENCE)) {\n if (readFirstLine) {\n beanReader.getHeader(true);\n }\n T typeBean;\n boolean carryOn = true;\n while (carryOn) {\n try {\n typeBean = beanReader.read(clazz, headers, cellProcessors);\n if (typeBean != null) {\n typeBeans.add(typeBean);\n } else {\n carryOn = false;\n }\n } catch (SuperCsvException e) {\n // we need this as the data file MAY contain rubbish\n LOGGER.warning(\"Ignoring data error in line: \" + beanReader.getLineNumber());\n }\n\n }\n }\n return typeBeans;\n }",
"public static void readRecord(Calendar cal) {\n\n boolean firstLine = true;\n boolean found = false;\n String ActivityName = \" \";\n Role r;\n String Month = \" \";\n\n int Year = 0;\n\n try {\n\n Scanner x = new Scanner(new File(\"P5Calendar.csv\"));\n\n while (x.hasNext() && !found) {\n\n String[] line = x.nextLine().split(\",\");\n\n if (firstLine) {\n firstLine = false;\n continue;\n }\n\n Year = Integer.parseInt(line[0]);\n Month = line[1];\n ActivityName = line[2];\n\n r = new Role(line[3].replaceAll(\"\\\\(.*\\\\)\", \"\"),\n line[3].substring(line[3].indexOf(\"(\") + 1, line[3].indexOf(\")\")));\n\n Activity act = new Activity(Year, Month, ActivityName, r);\n\n cal.addActivity(act);\n\n }\n\n x.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"private ArrayList<CSVRecord> processCsvData(String csvFile) {\n ArrayList<CSVRecord> records = new ArrayList<>();\n\n File csvData = new File(\"src/main/resources/csv/\" + csvFile + \".csv\");\n\n try {\n CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), CSVFormat.EXCEL);\n records.addAll(parser.getRecords());\n } catch (IOException exception) {\n logger.error(\"Unable to parse CSV file: \" + exception.getMessage());\n }\n\n return records;\n }",
"private ArrayList<BookOfUser> loadBooksOfUser(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<BookOfUser>>(){}.getType();\r\n\t\tArrayList<BookOfUser> bookOfUser = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn bookOfUser;\r\n\t}",
"@Test\n\tpublic void testReadCsvFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readCsvFile(\"movies.csv\");\n\t\tassertEquals(\"toy story\", parsedLines.get(0));\n\t}",
"static Map<Integer, Map<String, Object>> readCsv(BufferedReader in) throws IOException {\n\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\",\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\t\n\t\t\t/*code found for the regex expression found at \n\t\t\t* http://stackoverflow.com/questions/1757065/java-splitting-a-comma-separated-string-but-ignoring-commas-in-quotes\n\t\t\t* by user Bart Kiers\n\t\t\t*/\n\t\t\tString[] val = valString.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t}\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the list\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}",
"public static void main(String[] args){\n String path=\"C:/Users/SAMUEL/imag98908es.csv\";\n String linea=\" \";\n try{\n BufferedReader br= new BufferedReader(new FileReader(path));\n ArrayList<Integer> datos=new ArrayList<Integer>();\n while((linea=br.readLine())!=null){\n String[] valores=linea.split(\",\");\n List<String> list=Arrays.asList(valores);\n System.out.println(list);\n }\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }catch(IOException e){\n e.printStackTrace();\n }\n }",
"public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public static void processStudentData(String[] splitString) throws \r\n\t\t\t\t\t\t\t\t\t\tIllegalArgumentException {\r\n\t\r\n\t\tStudent student;\r\n\t\t\r\n\t\tif (splitString[1].equals(\"ADD\")) {\r\n\t\t\t\r\n\t\t\t // Create a new student object\r\n\t\t\t student = new Student(splitString[2], splitString[3], splitString[4], splitString[5]);\r\n\t\t\r\n\t\t\tif (listOfStudents.contains(student)) {\r\n\t\t\t\tSystem.out.println(\"List already contains the Student data with student ID \" + splitString[2]);\r\n\t\t\t} // End if\r\n\t\t\telse { \r\n\t\t\t\t// Add method to add student to list\r\n\t\t\t\tlistOfStudents.add(student);\r\n\t\t\t\t\r\n\t\t\t} // End else\r\n\t\t\t\t\r\n\t\t} // End if\r\n\t\t\r\n\t\telse if(splitString[1].equals(\"DEL\")) {\r\n\t\t\t\r\n\t\t\t// Create a new student object\r\n\t\t\t student = new Student(splitString[2], splitString[3], splitString[4], splitString[5]);\r\n\t\t\t// Remove method to remove Student from list\r\n\t\t\tlistOfStudents.remove(student);\r\n\t\t\tSystem.err.println(\"Student was removed in the list with Student ID \" + splitString[2]);\r\n\t\t} // End if\r\n\t\telse if (!(splitString[1].equals(\"ADD\")) && \r\n\t\t\t\t!(splitString[1].equals(\"DEL\"))) {\r\n\t\t\tthrow new IllegalArgumentException(\"Line does not contain 'ADD' or 'DEL' \" + splitString[1]);\r\n\t\t\t\r\n\t\t} // End else if\r\n\t\t\r\n\t}",
"@Override\n public void importItems(){\n if (DialogUtils.askYesNo(\"Confirm\", \"<html>Importing individuals will REPLACE all existing individuals.<br>Are you sure you want to do this?</html>\") == DialogUtils.NO) {\n return;\n }\n\n try {\n File file = DialogUtils.chooseFileForOpen(\"Import File\", new ExtensionsFileFilter(new String[] { \"csv\" }), null);\n if (file != null) {\n //remove current data\n MedSavantClient.PatientManager.clearPatients(LoginController.getSessionID(), ProjectController.getInstance().getCurrentProjectID());\n new ImportProgressDialog(file).showDialog();\n }\n } catch (Exception ex) {\n ClientMiscUtils.reportError(\"Unable to import individuals. Please make sure the file is in CSV format and that Hospital IDs are unique.\", ex);\n }\n }",
"private void processCSVFile( BufferedReader csvFile ) throws IOException {\r\n\t\t\r\n\t\tboolean headerRowRead = false;\r\n\t\tString[] headerArray = null;\r\n\t\t\r\n\t\t//loop through all rows and create contacts\r\n\t\tString row = csvFile.readLine();\r\n\t\t\r\n\t\twhile (row != null) {\r\n\t\t\t\r\n\t\t\tif (row.length()==0 || row.startsWith(\"#\") || row.startsWith(\";\") ) {\t\t\r\n\t\t\t\t\r\n\t\t\t\t//empty or comment row: skip\r\n\t\t\t\t\r\n\t\t\t} else if (!headerRowRead) {\r\n\t\t\t\t\r\n\t\t\t\t//header row is the first non-blank, not-comment row in the CSV file\r\n\t\t\t\t//the required header row contains the attribute names\r\n\t\t\t\t\r\n\t\t\t\theaderRowRead = true;\r\n\t\t\t\t\r\n\t\t\t\t//read header\r\n\t\t\t\theaderArray = parseCSVLine( row, true); \t\t\r\n\t\t\t\tLogger.debug(\"header: \" + row);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\r\n\t\t\t\tHashMap<String,String> contactObject = ContactsImport.getRowValues(headerArray, row);\r\n\t\t\t\tcreateContact(contactObject);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trow = csvFile.readLine(); //read next line form csv file\r\n\t\t}\r\n\t\t\r\n\t\tLogger.debug(\"finished\");\r\n\r\n\t}",
"List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;",
"public List<String> convertCsvToJava() {\n List<String> bookList = new ArrayList<String>();\n try {\n String csvFileToRead = STRING1;\n BufferedReader br = null;\n String line = \"\";\n String splitBy = \",\";\n \n try {\n\n br = new BufferedReader(new FileReader(csvFileToRead));\n while ((line = br.readLine()) != null) {\n\n // split on comma(',')\n String[] books = line.split(splitBy);\n String stringBook = \"\";\n for(int i=0;i<12;i++){\n if (i<11){\n stringBook=stringBook.concat(books[i]+\",\"); \n }else{\n stringBook=stringBook.concat(books[i]);\n }\n }\n bookList.add(stringBook);\n }\n } catch (FileNotFoundException e) {\n LOGGER.info(e);\n\n } catch (IOException e) {\n LOGGER.info(e);\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n LOGGER.info(e);\n }\n }\n }\n } catch (Exception e) {\n LOGGER.info(e);\n }\n return bookList;\n\n }",
"private Collection<User> loadUsers(InputStream is) throws IOException{\r\n\t\t\r\n\t\t//wrap input stream with a buffered reader to allow reading the file line by line\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<Collection<User>>(){}.getType();\r\n\t\tCollection<User> users = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn users;\r\n\r\n\t}",
"public static List<String> loadTickers(final InputStream pStream)\n\t\tthrows IOException\n\t{ \n\t\tList<String> tickers = new ArrayList<String>(); \n\t\t\n\t\tCSVReader reader = new CSVReader(new InputStreamReader(pStream));\n\t\t \n\t\tList<String[]> rows = reader.readAll();\n\t\t\n\t\tfor (String[] row : rows)\n\t\t{\n\t\t\tString ticker = row[0];\n\t\t\ttickers.add(ticker);\n\t\t}\n\t\t\n\t\treturn tickers;\n\t}",
"private Agent loadFromFile(String _login)\n {\n Agent agent = new Agent();\n File file = new File(_login + \".csv\");\n FileReader fr;\n BufferedReader br;\n String line;\n try {\n fr = new FileReader(file);\n br = new BufferedReader(fr);\n\n line = br.readLine();\n\n int numCients;\n { // to restrain the scope of csvData\n String[] csvData = line.split(\",\");\n agent.setID(Integer.parseInt(csvData[0]));\n agent.setName(csvData[1]);\n agent.setSalary(Double.parseDouble(csvData[2]));\n agent.setSalesBalance(Double.parseDouble(csvData[3]));\n\n numCients = Integer.parseInt(csvData[4]);\n }\n\n for(int i = 0; i<numCients; i++) {\n line = br.readLine();\n\n Client client = new Client();\n int numProp;\n\n {\n String[] csvData = line.split(\",\");\n client.setID(Integer.parseInt(csvData[0]));\n client.setName(csvData[1]);\n client.setIncome(Double.parseDouble(csvData[2]));\n\n numProp = Integer.parseInt(csvData[3]);\n }\n\n for(int j=0; j<numProp; j++)\n {\n line = br.readLine();\n\n String[] csvData = line.split(\",\");\n\n if(csvData[0].equals(\"house\")) {\n House property = new House();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasGarden(Boolean.parseBoolean(csvData[6]));\n property.setHasPool(Boolean.parseBoolean(csvData[7]));\n\n client.addProperty(property);\n }\n else if(csvData[0].equals(\"apt\"))\n {\n Apartment property = new Apartment();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasTerrace(Boolean.parseBoolean(csvData[6]));\n property.setHasElevator(Boolean.parseBoolean(csvData[7]));\n property.setFloor(Integer.parseInt(csvData[8]));\n property.setNumber(Integer.parseInt(csvData[9]));\n\n client.addProperty(property);\n }\n }\n\n agent.addClient(client);\n }\n fr.close();\n br.close();\n return agent;\n }\n catch (NumberFormatException nfEx) {\n JOptionPane.showMessageDialog(null, \"There was a problem when retrieving \" +\n \"the agent's data.\\n Please try again\");\n return null;\n }\n catch (IOException ioEx) {\n JOptionPane.showMessageDialog(null, \"This user doesn't exist....\");\n return null;\n }\n }"
] | [
"0.7247635",
"0.72460604",
"0.66753143",
"0.6651086",
"0.6611883",
"0.64808154",
"0.6386331",
"0.63328683",
"0.63144577",
"0.62617964",
"0.6249435",
"0.6244701",
"0.62343454",
"0.6227997",
"0.6221771",
"0.6219366",
"0.6194645",
"0.61308354",
"0.6088568",
"0.6087337",
"0.6063002",
"0.60571295",
"0.6038416",
"0.60078806",
"0.5945641",
"0.59398824",
"0.59214604",
"0.59182984",
"0.59065217",
"0.59009486",
"0.5871126",
"0.5827107",
"0.5806947",
"0.57663393",
"0.57660913",
"0.5757761",
"0.5740623",
"0.57277536",
"0.5727143",
"0.5726231",
"0.5722298",
"0.5715884",
"0.57082003",
"0.56973726",
"0.5692774",
"0.56910515",
"0.56904376",
"0.5673883",
"0.56578106",
"0.5657087",
"0.5648176",
"0.5641336",
"0.5638585",
"0.5626494",
"0.5623366",
"0.558339",
"0.5581571",
"0.55698067",
"0.5564487",
"0.5545913",
"0.55373776",
"0.5534091",
"0.55324155",
"0.5527005",
"0.5526692",
"0.5520952",
"0.55048877",
"0.5493581",
"0.54933286",
"0.548822",
"0.548587",
"0.5473783",
"0.5466764",
"0.54622906",
"0.54600686",
"0.54592925",
"0.5456561",
"0.54460627",
"0.5440217",
"0.54357237",
"0.54353005",
"0.5434759",
"0.54245603",
"0.5422968",
"0.5420648",
"0.54154176",
"0.53613824",
"0.535934",
"0.53559005",
"0.53554034",
"0.5348197",
"0.5340302",
"0.5339005",
"0.53319985",
"0.53225285",
"0.53032035",
"0.5300806",
"0.5292732",
"0.52862114",
"0.52813834"
] | 0.7821375 | 0 |
Save student list to file (as csv). | private static void saveStudentsList(List<Student> students, File file) throws IOException {
saveStudentsList(students, new FileOutputStream(file));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void writeToStudentsFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(STUDENTS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tIterator<StudentDetails> iter = ALL_STUDENTS.listIterator(1); //Get all StudentDetails objects from index 1 of ALL_STUDENTS. This is because the value at index 0 is just a dummy student\n\t\twhile(iter.hasNext()){\n\t\t\tStudentDetails student = iter.next();\n\t\t\tbw.write(student.ParseForTextFile()); //writes the Parsed Form of the StudentDetails object to the students.txt file\n\t\t}\n\t\t\n\t\tbw.close();\n\t}",
"public void save() {\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(\"studentData.dat\");\n\n\t\t\tObjectOutputStream oos;\n\t\t\ttry {\n\t\t\t\toos = new ObjectOutputStream(fos);\n\n\t\t\t\toos.writeObject(studentList);\n\t\t\t\toos.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"File is finished writing to the hard drive\");\n\t}",
"public void WriteStudentstoFile(String path) {\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\twriter = new PrintWriter(path, \"UTF-8\");\n\t\t\tArrayList<Student> data = GetAllStudentData();\n\t\t\tfor (int i = 0; i <= data.size() - 1; i++) {\n\t\t\t\tString f = data.get(i).regID + \",\" + data.get(i).name + \",\" + data.get(i).fatherName + \",\"\n\t\t\t\t\t\t+ data.get(i).section + \",\" + data.get(i).department;\n\t\t\t\twriter.println(f);\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"public void outputToCSV() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"test_data.csv\", \"UTF-8\");\n\n //For every object in array list, print surname, initials and extension, separated by commmas\n for (int i=0; i<toArrayList().size(); i++) {\n writer.println(toArrayList().get(i).getSurname() + \",\" + toArrayList().get(i).getInitials() + \",\" +\n toArrayList().get(i).getExtension());\n }\n writer.close();\n }",
"public void saveAsCsv() {\n\n try(BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(\"saves/data.csv\"))){\n for(Publication book : library){\n StringBuilder stringBuilder = new StringBuilder();\n\n stringBuilder.append(\"\\\"\").append(book.getClass().getSimpleName()).append(\"\\\"\"); // type\n stringBuilder.append(\",\"); // delimiter\n stringBuilder.append(\"\\\"\").append(book.getTitle()).append(\"\\\"\"); // title\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getAuthor().toString()).append(\"\\\"\"); // author\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getPages()).append(\"\\\"\"); // pages\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getIsbn()).append(\"\\\"\"); // isbn\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getReleaseYear()).append(\"\\\"\"); // year\n stringBuilder.append(\"\\n\");\n\n bufferedWriter.write(stringBuilder.toString()); // creates a line of one publication information and puts it to file\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n }",
"public static void save() {\r\n\t\ttry {\r\n\t\t\tFile csv = new File(\"src/transaction.csv\");\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(csv, false));\r\n\t\t\tbw.write(\"type,account number,amount,year,month,date,cleared\");\r\n\t\t\tbw.newLine();\r\n\t\t\tfor (int i = 0; i < transList.size(); i++) {\r\n\t\t\t\tbw.write(transList.get(i).toFile());\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void exportToCSV();",
"private void saveListToFile() {\n try {\n PrintStream out = new PrintStream(\n openFileOutput(LIST_FILENAME, MODE_PRIVATE)\n );\n\n for (int i = 0; i < listArr.size(); i++) {\n out.println(listArr.get(i));\n }\n\n out.close();\n\n } catch (IOException ioe) {\n Log.e(\"saveListToFile\", ioe.toString());\n }\n }",
"public void saveToFile()\n\t{\t\n\t\tsetCourseToFileString(courseToFileString);\n\t\t\ttry \n\t {\n\t FileWriter fw = new FileWriter(fileName);\n\t fw.write (this.getCourseToFileString ( ));\n\t for(Student b : this.getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t}",
"public void saveFile()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\t\n\t\tfor(CSVItem cItem : itemList)\n\t\t{\n\t\t\tsb.append(cItem.buildCSVString()).append(newLine);\n\t\t\t\n\t\t}\n\t\tString fileString = sb.toString();\n\t\t\n\t\t File newTextFile = new File(filePath);\n\n FileWriter fw;\n\t\ttry {\n\t\t\tfw = new FileWriter(newTextFile);\n\t\t\t fw.write(fileString);\n\t\t fw.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 \n\n\t}",
"static void writeStudentsToFile(Student[] students, String filename) {\n\t\ttry (FileWriter out = new FileWriter(filename)) {\n\n\t\t\tfor (Student s : students)\n\t\t\t\tout.write(s.toString() + \"\\n\");\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void savecars(){\n Cars xx = new Cars();\n System.out.println(\"save cars\");\n String outtext;\n try {\n File rentfile = new File(\"cars.csv\");\n FileWriter out = new FileWriter(rentfile);\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n String newline = System.getProperty(\"line.separator\");\n outtext = xx.getBrand()+ \";\"+ xx.getModel()+ \";\"+ xx.getReference()+ \";\"+ xx.getYear()+ newline;\n out.write(outtext);\n }\n out.close();\n System.out.println(\"cars data saved in cars.csv\");\n } catch (IOException i) {\n i.printStackTrace();\n }\n }",
"public static void save(ArrayList<String> inputsInOrder) throws IOException {\r\n\t\tboolean start = true;\r\n\r\n\t\tFileWriter filewrite = new FileWriter(csv);\r\n\t\tfor (String str : inputsInOrder) {\r\n\t\t\tif (start == true) {\r\n\t\t\t\tfilewrite.write(str);\r\n\t\t\t\tstart = false;\r\n\t\t\t} else {\r\n\t\t\t\tfilewrite.write(\",\");\r\n\t\t\t\tfilewrite.write(str);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfilewrite.flush();\r\n\t\tfilewrite.close();\r\n\t}",
"private void miSalvareActionPerformed(java.awt.event.ActionEvent evt) { \n if (!model.isEmpty()) {\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa salvati lista de contacte?\", \"Salvare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n try {\n JFileChooser chooser = new JFileChooser();\n chooser.showSaveDialog(this);\n File list = new File(chooser.getSelectedFile().getAbsolutePath() + \".csv\");\n PrintWriter writer = new PrintWriter(list);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"Nume\");\n sb.append(\",\");\n sb.append(\"Prenume\");\n sb.append(\",\");\n sb.append(\"Data nasterii\");\n sb.append(\",\");\n sb.append(\"Numar Telefon\");\n sb.append(\",\");\n sb.append(\"\\r\\n\");\n\n listaContacte.stream().map((c) -> {\n sb.append(c.getNume());\n return c;\n }).map((c) -> {\n sb.append(\",\");\n sb.append(c.getPrenume());\n return c;\n }).map((c) -> {\n sb.append(\",\");\n String dataNasterii[] = c.getDataNasterii().toString().split(\"-\");\n String a = dataNasterii[0];\n String l = dataNasterii[1];\n String z = dataNasterii[2];\n String dt = z + \".\" + l + \".\" + a;\n sb.append(dt);\n sb.append(\",\");\n sb.append(c.getNrTel().toString());\n return c;\n }).forEachOrdered((_item) -> {\n sb.append(\"\\r\\n\");\n });\n\n writer.write(sb.toString());\n writer.close();\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n }",
"public void writeToCsv()\r\n {\r\n //listeye urunler eklendiginde cagrılacak (Products.csv)\r\n PrintWriter pWrite = null;\r\n try {\r\n pWrite = new PrintWriter(new File(\"Products.csv\"));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n StringBuilder sBuilder = new StringBuilder();\r\n for (Product theProduct : allProducts ) {\r\n if (theProduct.getSize() == null && theProduct.getGender()!= null){\r\n sBuilder.append(theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else if(theProduct.getGender() == null && theProduct.getSize() == null){\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getTag() + \";\"+\r\n theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else {\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\" + theProduct.getSize() + \";\"\r\n + (theProduct).getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n\r\n }\r\n pWrite.write(sBuilder.toString());\r\n pWrite.flush();\r\n pWrite.close();\r\n }",
"public void SaveFile(String filePath) throws IOException {\r\n\t\tif (students == null) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please load a roster before saving a file\", \"Error\", 2);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString fileContents = \"ID,First Name,Last Name,Program,Level,ASURITE\";\r\n\t\tfor (int i=0; i<dates.size(); i++) {\r\n\t\t\tfileContents += \",\" + dates.get(i);\r\n\t\t}\r\n\t\tfileContents += \"\\n\";\r\n\t\t\r\n\t\tfor (int i=0; i<students.size(); i++) {\r\n\t\t\tfileContents+=students.get(i).toString();\r\n\t\t\tfor (int j=0; j<dates.size(); j++) {\r\n\t\t\t\tfileContents+=\",\" + students.get(i).getAttendance().get(j);\r\n\t\t\t}\r\n\t\t\tfileContents+=\"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\tfilePath+=\".csv\";\r\n\t\tFileWriter myFile = new FileWriter(filePath); \r\n\t\tmyFile.write(fileContents);\r\n\t\tmyFile.close();\r\n\t\tJOptionPane.showMessageDialog(null, \"File written successfully!\", \"Success\", 1);\r\n\t}",
"@Override\n\tpublic void exportToCSV() {\n\n\t}",
"public void generateCSV(numList l) {\r\n\t\tFile file = new File(\"E:\\\\altruism results/\" + filename + \".csv\"); //the storage path of the csv file\r\n\t\ttry {\r\n\t\t\tif (file.exists() == false) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\tFileWriter fw = new FileWriter(file);\r\n\t\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\t\t\twriter.write(\"altruism,selfish\\r\\n\");\r\n\t\t\tfor (int i = 0; i < numList.TIME; i++) {\r\n\t\t\t\twriter.write(l.aList[i] + \",\");\r\n\t\t\t\twriter.write(l.sList[i] + \"\\r\\n\");\r\n\t\t\t}\r\n\r\n\t\t\twriter.flush();\r\n\t\t\twriter.close();\r\n\t\t\tfw.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }",
"@Override\n public void csvExport(String filename) {\n PrintWriter out = null;\n try {\n out = new PrintWriter(filename);\n\n for (Student key : map.keySet()) {\n out.println(key.getFirst() + \", \" + key.getLast() + \", \" + key.getID() + \", \" + map.get(key).getLetter());\n }\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found\");\n } finally {\n out.close();\n }\n }",
"public ArrayList<String> toCSV() {\n ArrayList<String> record = new ArrayList<>();\n record.add(Double.toString(getLocation().getLatitude()));\n record.add(Double.toString(getLocation().getLongitude()));\n record.add(getName());\n return record;\n }",
"public void exportLocations(List<MyLocation> locationList) {\n\n StringBuilder data = new StringBuilder();\n // Adding File Header\n data.append(\"ID,Latitude,Longitude,Provider,startTime,endTime,accuracy,adminArea,countryCode,featureName,Locality,subAdminArea,addressLine,Interactions\");\n\n // Adding Data\n for(MyLocation location : locationList) {\n data.append(\"\\n\"\n +location.getId()+\",\"\n +location.getLatitude()+\",\"\n +location.getLongitude()+\",\"\n +location.getProvider()+\",\"\n +location.getStartTime()+\",\"\n +location.getEndTime()+\",\"\n +location.getAccuracy()+\",\"\n +location.getAdminArea()+\",\"\n +location.getCountryCode()+\",\"\n +location.getFeatureName()+\",\"\n +location.getLocality()+\",\"\n +location.getSubAdminArea()+\",\"\n +location.getAddressLine()+\",\"\n +location.getNumOfInteractions());\n }\n\n try{\n // Saving file onto device\n FileOutputStream out = context.openFileOutput(\"locations_export.csv\", Context.MODE_PRIVATE);\n out.write((data.toString()).getBytes());\n out.close();\n\n // Exporting\n File fileLocation = new File(context.getFilesDir(), \"locations_export.csv\");\n Uri path = FileProvider.getUriForFile(context, \"com.kdkvit.wherewasi.provider\", fileLocation);\n Intent fileIntent = new Intent(Intent.ACTION_SEND);\n fileIntent.setType(\"text/csv\");\n fileIntent.putExtra(Intent.EXTRA_SUBJECT, \"Data\");\n fileIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n fileIntent.putExtra(Intent.EXTRA_STREAM, path);\n context.startActivity(Intent.createChooser(fileIntent, \"Export CSV\"));\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void toSave() {\n File file4=new File(\"trial.txt\");\n try\n {\n String row;\n BufferedWriter bw=new BufferedWriter(new FileWriter(file4));\n for(int i=0;i<jt.getRowCount();i++)\n {\n row = \"\";\n for(int j=0;j<jt.getColumnCount();j++)\n {\n row += (jt.getValueAt(i, j) +\",\");\n }\n row = row.substring(0, row.length()-1);\n //System.out.println(row);\n bw.write(row);\n bw.newLine();\n }\n bw.close();\n \n \n JOptionPane.showMessageDialog(rootPane,\"Details saved succesfully\");\n }\n \n catch(Exception ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Exception occured\");\n }\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic void writeSerializedObject(List list) {\r\n\t\tFileOutputStream fos = null;\r\n\t\tObjectOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tfos = new FileOutputStream(System.getProperty(\"user.dir\") + \"\\\\Databases\\\\students.dat\");\r\n\t\t\tout = new ObjectOutputStream(fos);\r\n\t\t\tout.writeObject(list);\r\n\t\t\tout.close();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"public void saveFile(String fileName)\n {\n try\n {\n Formatter file = new Formatter(fileName);\n for (Item item: myList)\n {\n file.format(item.getFirstName() +\"\\n\" + item.getLastName() +\"\\n\"+ item.getPhoneNumber()+\"\\n\"+ item.getEmail()+\"\\n\");\n }\n file.close();\n }\n\n catch (Exception ex)\n {\n System.out.println(\"Error saving...\");\n }\n\n System.out.println(\"\");\n }",
"public void writeList()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPrintWriter writer = new PrintWriter(categoryName + \".txt\");\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < questions.size(); i++) // go through ArrayList\r\n\t\t\t{\r\n\t\t\t\twriter.println(questions.get(i).getQuestion() + \",\" + \r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer1() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer2() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer3() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer4() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getCorrectAnswer());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException fnf)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File was not found\");\r\n\t\t}\r\n\t}",
"public static void writeCsvFile(List<Person> currentState, Path exportPath) {\n requireNonNull(currentState);\n File dir = new File(exportPath.toString());\n dir.mkdirs();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yy HH-mm-ss\");\n Date date = new Date();\n String exportUniqueName = \"export[\" + dateFormat.format(date) + \"].csv\";\n Path exportFilePath = Paths.get(exportPath.toString() , exportUniqueName);\n try {\n FileUtil.createIfMissing(exportFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n try {\n serializeObjectToCsvFile(exportFilePath, currentState);\n } catch (IOException e) {\n logger.warning(\"Error writing from CsvFile file \" + exportFilePath);\n }\n }",
"public void saveBooks(){\n\t\ttry{\t\n\t\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"../bin/books.csv\"));\t\n\t\t\tIterator bookIterator = bookMap.keySet().iterator();\n\t\t\twhile(bookIterator.hasNext() != false){\n\t\t\t\tString current = bookIterator.next().toString();\n\t\t\t\tfor(int i=0;i<bookMap.get(current).size();i++){\t\n\t\t\t\t\tpw.write(bookMap.get(current).get(i).getTitle() \n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getAuthor()\n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getYear()\n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getType()\n\t\t\t\t\t\t+ \",\" + bookMap.get(current).get(i).getId());\n\t\t\t\t\tpw.write(\"\\n\");\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tpw.close();\n\t\t\tSystem.out.println(\"\\tDone!\");\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\n\t}",
"public void saveAllVehiclesToFile(ArrayList<DeliveryVehicle> vehicleList) throws java.io.IOException {\n\n // write object to file\n FileOutputStream fos = new FileOutputStream(_filePath); //object to hold a file, e.g. EmployeeData.txt\n PrintStream writer = new PrintStream(fos); //object to write data\n\n //For loop to read each employee and write them to the file\n for(DeliveryVehicle vehicle : vehicleList){\n writer.println(vehicle);\n }\n\n writer.close();//close the writer\n fos.close();//close the file\n\n }",
"private void writeCsv(float[] vals, String stimulus, PrintWriter outfile) throws FileNotFoundException {\n for (int i = 0; i < vals.length; i++) {\n outfile.append(vals[i] + \",\");\n }\n outfile.append(stimulus);\n outfile.append(\"\\n\");\n\n }",
"private void writeToFile(List<Record> records) {\n try (\n FileWriter writer = new FileWriter(FILE_PATH);\n BufferedWriter bufferedWriter =\n new BufferedWriter(writer);\n PrintWriter out = new PrintWriter(bufferedWriter)\n\n ) {\n\n for (Record record : records) {\n out.format(\"%d;%s;%s;%s;%s;%s\\n\",\n record.getId(),\n record.getFirstName(),\n record.getLastName(),\n record.getPhone().getNumber(),\n record.getPhone().getType(),\n record.getCategory().getId());\n }\n// writer.close();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }",
"public static void writeStudents(String outputFilePath, boolean append) throws IOException\r\n\t{\r\n\t\twriteToFile(\"html_templates/etudiants/header.html\", outputFilePath, true);\r\n\t\t\r\n\t\tPrintStream fileWriter = new PrintStream(new FileOutputStream(new File(outputFilePath), append), false, \"UTF-8\");\r\n\t\t\r\n\t\tStudent[] allStudents = CtrlStudent.getStudents(\"../test/etudiants2014_2015.csv\");\r\n\t\t\r\n\t\tfileWriter.println(\"<li data-role=\\\"list-divider\\\">\");\r\n\t\tfileWriter.println(\"Etudiant<span class=\\\"ui-li-count\\\" title=\\\"Groupe\\\" style=\\\"right: 40px !important;\\\">Groupe</span>\");\r\n\t\tfileWriter.println(\"</li>\");\r\n\t\t\r\n\t\tfor (int i = 0; i < allStudents.length; i++)\r\n\t\t{\r\n\t\t\tfileWriter.println(\"<li data-find=\\\"\" + allStudents[i].getFname() + \" \" + allStudents[i].getLname().toUpperCase() + \"\\\">\");\r\n\t\t\tfileWriter.print(\"<a href=\\\"#projets\\\">\" + allStudents[i].getLname().toUpperCase() + \" \" + allStudents[i].getFname() + \"<span class=\\\"ui-li-count\\\" title=\\\"Groupe\\\">Groupe \" + allStudents[i].getStudGroup().getLibelle() + \"</span>\\n\");\r\n\t\t\tfileWriter.println(\"</a>\");\r\n\t\t\tfileWriter.println(\"</li>\");\r\n\t\t}\r\n\t\t\r\n\t\twriteToFile(\"html_templates/etudiants/footer.html\", \"OPTIweb.html\", true);\r\n\t\t\r\n\t\tfileWriter.close();\r\n\t}",
"public void exportFile() {\n\t\ttry {\n\t\t\tFileWriter file_write = new FileWriter(\"accounts/CarerAccounts.txt\", false);\n\t\t\tString s = System.getProperty(\"line.separator\");\n\t\t\tfor (int i=0; i < CarerAccounts.size();i++) {\n\t\t\t\tString Users = new String();\n\t\t\t\tfor (int user: CarerAccounts.get(i).getUsers()) {\n\t\t\t\t\tUsers += Integer.toString(user) + \"-\";\n\t\t\t\t}\n\t\t\t\tString individual_user = CarerAccounts.get(i).getID() + \",\" + CarerAccounts.get(i).getUsername() + \",\" + CarerAccounts.get(i).getPassword() + \",\" + CarerAccounts.get(i).getFirstName() + \",\" + CarerAccounts.get(i).getLastName() + \",\" + CarerAccounts.get(i).getEmailAddress() + \",\" + Users;\n\t\t\t\tfile_write.write(individual_user + s);\n\t\t\t}\n\t\t\tfile_write.close();\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to export file.\");\n\t\t}\n\t}",
"public void saveCSV(Collection<? extends Collection<String>> data, File file) {\r\n\t\tfinal FileWriter out;\r\n\t\tString output;\r\n\r\n\t\ttry {\r\n\t\t\tout = new FileWriter(file);\r\n\r\n\t\t\tfor (Collection<String> row : data) {\r\n\t\t\t\toutput = \"\";\r\n\r\n\t\t\t\tfor (String value : row)\r\n\t\t\t\t\toutput += value + \",\";\r\n\r\n\t\t\t\t// Remove the last comma.\r\n\t\t\t\toutput = output.substring(0, output.length() - 1);\r\n\r\n\t\t\t\toutput += \"\\n\";\r\n\r\n\t\t\t\tout.append(output);\r\n\t\t\t}\r\n\r\n\t\t\tout.flush();\r\n\t\t\tout.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void writeToEmployeeListFile()\r\n {\r\n\ttry(ObjectOutputStream toEmployeeListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/employeelist.dta\")))\r\n\t{\r\n toEmployeeListFile.writeObject(employeeList);\r\n employeeList.saveStaticEmpRunNr(toEmployeeListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Ansatt objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }",
"public void save(List<Task> list) throws IOException {\n FileWriter writer = new FileWriter(file);\n StringBuilder output = new StringBuilder();\n for (Task t : list) {\n output.append(formatTask(t));\n output.append(\"\\n\");\n }\n writer.write(output.toString());\n writer.close();\n }",
"public void writeDataToCsv(String filename , ArrayList<TestDataInstance> inputData) {\n \n String header = \"\";\n \n File outFile = null;\n int dataCount = 0;\n try {\n outFile = new File(filename);\n \n FileWriter fw = new FileWriter(outFile);\n \n BufferedWriter bw = new BufferedWriter(fw);\n \n bw.write(header);\n \n for(TestDataInstance data : inputData) {\n bw.newLine();\n bw.write(data.toSamiamCsvString());\n dataCount++;\n }\n \n System.out.println(\"Written \" + dataCount + \" rows of data to SAMIAM CSV format @ \" + filename);\n \n } catch(Exception e) {\n e.printStackTrace();\n }\n \n }",
"public void saveFile(int theValue) {\n if (!outputInitialized) {\n return;\n }\n int largest = 0;\n for (int i=0; i<totSamples.length; i++) {\n if (totSamples[i]> largest) {\n largest = totSamples[i];\n }\n //myArray[i] = list_Samples[i].getListBoxItems();\n }\n String fname = ano + nf(mes, 2)+ nf(dia, 2) + nf(hora, 2) + nf(min, 2) + nf(sec, 2);\n foutput = createWriter(\"dados_\"+fname +\".csv\");\n\n\n\n for (int i=0; i<largest; i++) {\n String line =\"\";\n String[] val = new String[6];\n for (int j=0; j < numSamples; j++) {\n if (i < totSamples[j]) {\n ListBoxItem lb1 = list_Samples[j].getItem(i);\n val[j]=lb1.getText();\n } else {\n val[j]=\"\";\n }\n line += val[j]+\",\";\n } \n if (outputInitialized) {\n foutput.println(i+\",\"+line);\n }\n }\n foutput.flush(); // Writes the remaining data to the file\n foutput.close();\n}",
"public void saveStaffList(String fileName) {\n try {\n BufferedWriter out = new BufferedWriter(new FileWriter(fileName));\n out.write(maxStaff+\"\\r\\n\");\n \n out.write(numStaff+\"\\r\\n\");\n \n \n for (int i = 0; i < numStaff; i++) {\n if (staffList[i] instanceof Labourer) {\n out.write(staffList[i].toFile());\n } else if (staffList[i] instanceof Manager) {\n out.write(staffList[i].toFile());\n }\n }\n out.close();\n } catch (IOException iox) {\n System.out.println(\"Error saving to \" + fileName);\n }\n }",
"public void dataFileCreate() {\r\n\t\tString COMMA_DELIMITER = \",\";\r\n\t\tString NEW_LINE_SEPERATOR = \"\\n\";\r\n\t\tString FILE_HEADER = \"Title,First Name,Last Name,Email,Phone Number\";\r\n\t\ttry {\r\n\t\t\tList<Customer> dataList = new ArrayList<Customer>();\r\n\t\t\tdataList.add(\r\n\t\t\t\t\tnew Customer(title, customerFirstName, customerLastName, custromerEmailId, customerPhoneNumber));\r\n\r\n\t\t\tFileWriter fileWriter = new FileWriter(\"CustomerDetails.csv\");\r\n\t\t\tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\r\n\t\t\tbufferWriter.append(FILE_HEADER);\r\n\r\n\t\t\tfor (Customer c : dataList) {\r\n\t\t\t\tbufferWriter.write(NEW_LINE_SEPERATOR);\r\n\t\t\t\tbufferWriter.write(c.getTitle());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getFirstName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getLastName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getEmailAddress());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(String.valueOf(c.getPhone()));\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t}\r\n\r\n\t\t\tbufferWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n public void csvExport(String filename, Grade grade) {\n PrintWriter out = null;\n try {\n out = new PrintWriter(filename);\n\n for (Student key : map.keySet()) {\n if (map.get(key).getLetter().equals(grade.getLetter())) {\n out.println(key.getFirst() + \", \" + key.getLast() + \", \" + key.getID());\n }\n }\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found\");\n } finally {\n out.close();\n }\n }",
"public void export(List<User> listUsers, HttpServletResponse response) throws IOException {\n\t\t/*\n\t\t * NB commented code moved to setResponseHeader method in AbstractExporter class and modified\n\t\t * \n\t\t * // the code below is for generating the file name for the csv file //using\n\t\t * time stamp\n\t\t * \n\t\t * //creates date format object DateFormat dateFormatter = new\n\t\t * SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\");\n\t\t * \n\t\t * //creates time stamp that format the current date and time String timestamp =\n\t\t * dateFormatter.format(new Date());\n\t\t * \n\t\t * \n\t\t * // users_ can be any name of your choice //creates file name. String fileName\n\t\t * = \"users_\" + timestamp + \".csv\";\n\t\t * \n\t\t * //set information for HttpServletResponse for the browser to download the\n\t\t * file // as csv file response.setContentType(\"text/csv\");\n\t\t * \n\t\t * //header for the file to be downloaded. String headerKey =\n\t\t * \"Content-Disposition\"; String headerValue = \"attachment; filename=\" +\n\t\t * fileName; response.setHeader(headerKey, headerValue);\n\t\t * \n\t\t */\n\t\tsuper.setResponseHeader(response,\"text/csv\",\".csv\",\"users_\");\n\t\t\n\t\t//creates csv writer from csv library\n\t\tICsvBeanWriter csvWriter = new CsvBeanWriter(response.getWriter(),\n\t\t\t\tCsvPreference.STANDARD_PREFERENCE);\n\t\t\n\t\t//header line of the csv file\n\t\tString[] csvHeader = {\"User ID\",\"E-mail\",\"First Name\",\"Last Name\",\"Role\",\"Enabled\"};\n\t\t\n\t\t//map fields for the actual data to be exported\n\t\t//this field mapping must correspond with the class entity variable names\n\t\tString[] fieldMapping = {\"id\",\"email\",\"firstName\",\"lastName\",\"roles\",\"enabled\"};\n\t\t\n\t\t//writes the header\n\t\tcsvWriter.writeHeader(csvHeader);\n\t\t\n\t\t//iterate through each of the list of users\n\t\tfor(User user : listUsers) {\n\t\t\tcsvWriter.write(user, fieldMapping);\n\t\t}\n\t\t\n\t\t//close the writer\n\t\tcsvWriter.close();\n\t\t\n\t}",
"public static void serializeObjectToCsvFile(Path filePath, List<Person> currentState) throws IOException {\n FileUtil.writeToFile(filePath, toCsvString(currentState));\n }",
"private void saveEmployee()\n {\n Employee tempEmployee = new Employee();\n String line = \"\";\n try\n {\n PrintWriter out = new PrintWriter(fileName);\n for(int i = 0; i < employees.size(); i++)\n {\n tempEmployee = (Employee) employees.get(i);\n line = tempEmployee.getName() + \",\" + tempEmployee.getHours() + \",\" +\n tempEmployee.getRate();\n out.println(line);\n }\n out.close(); \n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }",
"private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}",
"private void saveItems() {\n PrintWriter writer = null;\n try {\n FileOutputStream fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(\n fos)));\n\n for (int idx = 0; idx < mAdapter.getItemCount(); idx++) {\n\n writer.println(mAdapter.getItem(idx));\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (null != writer) {\n writer.close();\n }\n }\n }",
"private void writeCSVToFile(List<String[]> dataRows, String filepath) {\n try {\n FileWriter output = new FileWriter(filepath);\n CSVWriter csvWriter = new CSVWriter(output);\n\n csvWriter.writeAll(dataRows);\n\n csvWriter.close();\n\n System.out.println(\"Your order has been succesfully sent to Foodora\");\n\n } catch (IOException e) {\n System.out.println(\"Could not write to Foodora output file\");\n }\n\n }",
"void saveStudents(ArrayList<Student> studentList) throws SQLException {\n clearTable(\"Students\");\n Connection conn = getConnection();\n String setStatement, studentName, prefRole;\n double attendance;\n int studentID, groupID;\n for (int i = 0; i < studentList.size(); i++) {\n Student currentStudent = studentList.get(i);\n studentName = currentStudent.getName();\n prefRole = currentStudent.getPrefRole();\n attendance = currentStudent.getAttendance();\n studentID = currentStudent.getStudentID();\n groupID = currentStudent.getGroupID();\n setStatement = \"INSERT INTO Students(studentID, studentName, prefRole, attendance, groupID) VALUES ('\"\n + studentID + \"', '\"\n + studentName + \"', '\"\n + prefRole + \"', '\"\n + attendance + \"', '\"\n + groupID + \"')\";\n Statement stm = conn.createStatement();\n stm.execute(setStatement);\n }\n }",
"public void writeList() {\n try{\n PrintWriter out = new PrintWriter(new FileWriter(\"OutFile.txt\"));\n\n for (int i = 0; i < SIZE; i++) {\n // The get(int) method throws IndexOutOfBoundsException, which must be caught.\n out.println(\"Value at: \" + i + \" = \" + list.get(i));\n }\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public static void saveStudentCourses(ArrayList<StudentCourse> CourseToUpdate) throws IOException {\n\t\tArrayList <String> courseList = new ArrayList<String>() ;// to store Courses data\n\n for (int i = 0 ; i < CourseToUpdate.size() ; i++) {\n\t\t\t\tStudentCourse course = CourseToUpdate.get(i);\n\t\t\t\tStringBuilder stringBuild = new StringBuilder();\n\t\t\t\tstringBuild.append(course.getUserid().trim());\n\t\t\t\tstringBuild.append(SEPARATOR);\n\t\t\t\tstringBuild.append(course.getUsername().trim());\n\t\t\t\tstringBuild.append(SEPARATOR);\n\t\t\t\tstringBuild.append(course.getCourseID().trim());\n\t\t\t\tstringBuild.append(SEPARATOR);\n\t\t\t\tstringBuild.append(course.getIndexID());\n\t\t\t\tstringBuild.append(SEPARATOR);\n\t\t\t\tstringBuild.append(course.getRegisterStatus());\n\t\t\t\t\n\t\t\t\tcourseList.add(stringBuild.toString()) ;\n\t\t\t}\n\t\t\tIO.write(Main.studentcoursepath.toString(), courseList);\n\t}",
"private void exportFile()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdrinkListFileOutput = new BufferedWriter(new FileWriter(drinkListFile));\n\t\t\tdrinkListFileOutput.write(exportDrinkList);//insert string of drinks\n\t\t\tdrinkListFileOutput.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Successfully saved drinks\");\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.toString();//change this\n\t\t\tJOptionPane.showMessageDialog(null, \"Drink save error: \" + e.toString());//change this);\n\t\t}\n\n\n\n\t}",
"public void save(){\n\t\t\n\t\ttry {\n\t\t\t\t \n\t\t\t// Open Streams\n\t\t\tFileOutputStream outFile = new FileOutputStream(\"user.ser\");\n\t\t\tObjectOutputStream outObj = new ObjectOutputStream(outFile);\n\t\t\t\t \n\t\t\t// Serializing the head will save the whole list\n\t\t\toutObj.writeObject(this.head);\n\t\t\t\t \n\t\t\t// Close Streams \n\t\t\toutObj.close();\n\t\t\toutFile.close();\n\t\t}\n\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error saving\");\n\t\t}\n\t\t\t\n\t}",
"public void createCSV(ArrayList<String> result, String output){\t\r\n\t\ttry{\r\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(output);\r\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, \"MS949\");\r\n\t\t\tBufferedWriter fw = new BufferedWriter(outputStreamWriter);\r\n\t\t\tfor(String line : result){\r\n\t\t\t\tfw.write(line+\"\\n\");\r\n\t\t\t}\r\n\t\t\tfw.flush();\r\n\t\t\tfw.close();\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static void writeFile ( LinkedList contactsList ) {\n\t\ttry {\n PrintWriter writer = new PrintWriter ( \"contacts.txt\" );\n for ( int row = 0; row < contactsList.size ( ); row++ ) {\n \t// this is basically a toString right here, adapted to the original contacts.txt\n \tString line = contactsList.get ( row ).getFirst ( ) + \",\" + contactsList.get ( row ).getLast ( ) + \",\" + contactsList.get ( row ).getPhone ( ) \n \t\t\t+ \",\" + contactsList.get ( row ).getAddress ( ) + \",\" + contactsList.get ( row ).getCity ( ) + \",\" + contactsList.get ( row ).getZip ( );\n writer.println ( line );\n }\n writer.close();\n } catch ( FileNotFoundException fnf ) {\n System.out.println(\"File was not found.\");\n }\n\t}",
"public static void writeUsers(ArrayList<User> userList, \r\n String filename) throws IOException {\r\n File file = new File(filename);\r\n PrintWriter out = new PrintWriter(\r\n new FileWriter(file, false));\r\n for (User user: userList) {\r\n out.println(user); \r\n }\r\n out.close();\r\n }",
"public void saveToFile(String fileName, ArrayList<String> namesList, ArrayList<ArrayList<Double>> numList)\r\n {\r\n try\r\n {\r\n fileName = fileName + \"/\" + namesList.size() + \"Cities.txt\";\r\n FileWriter filePointer = new FileWriter(fileName, false); //false will replace what is there (append)\r\n PrintWriter output = new PrintWriter(filePointer);\r\n for(int i = 0; i < namesList.size(); i++)\r\n {\r\n String line = namesList.get(i) + \" \" \r\n + numList.get(i).get(0) + \" \" + numList.get(i).get(1) + \"\\n\";\r\n output.write(line);\r\n }\r\n output.close();\r\n }\r\n catch(IOException exp)\r\n {\r\n JOptionPane.showMessageDialog(null, \"Points not Saved\" \r\n + \"Save Error\" + JOptionPane.WARNING_MESSAGE);\r\n }\r\n }",
"private void saveCSV(ActionEvent actionEvent) {\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n int result = fileChooser.showOpenDialog(this);\n if (result == JFileChooser.APPROVE_OPTION) {\n String selectedFile = fileChooser.getSelectedFile().getAbsolutePath();\n StatisticsFile statisticsFile = new StatisticsFile(selectedFile);\n try{\n statisticsFile.writeInCvs(my_map.getSettlements());\n }catch(IOException ioException){\n ioException.printStackTrace();\n }\n }\n }",
"public static void writeActivityRecords(String fileName, ArrayList<Activity> courses) throws IOException {\n\t\tPrintStream fileWriter = new PrintStream(new File(fileName));\n\t\tfor (Activity c : courses) {\n\t\t\tfileWriter.println(c.toString());\n\t\t}\n\t\tfileWriter.close();\n\t}",
"private void saveMarkovToCSVFileInformation(){\n //Clear out the current NewCensusColumnDetails before saving.\n this.currentMarkovChain.setNewCensusColumnDetails(new ArrayList<NewCensusColumnDetails>());\n \n ArrayList<NewCensusColumnDetails> newCensusColumnDetails = new ArrayList<>();\n \n ArrayList<cerl.gui.utilities.Class> censusClasses = this.currentMarkovChain.getCensusClasses();\n List<SurveyColumnValuesGrouping> surveyGroupings = this.currentMarkovChain.getSelectSurveyClass().getSurveyColumnValuesGroupings();\n\n /**\n * These will be used to find the min and max values stored in the grid. \n * \n * Row data starts at index 1.\n * Column data starts at index 2.\n */\n int rowToStartAt = START_EDITABLE_ROW;\n \n for(int surveyCounter = 0; surveyCounter < surveyGroupings.size(); surveyCounter++){ //rows\n int currentColumnNumber = START_EDITABLE_COL;\n SurveyColumnValuesGrouping surveyGrouping = surveyGroupings.get(surveyCounter);\n\n double newTotalRandomNumber = 0;\n ArrayList<Integer> oldValueLookUpColumns = new ArrayList<Integer>();\n\n for(int censusCounter = 0; censusCounter < censusClasses.size(); censusCounter++){ //columns\n cerl.gui.utilities.Class censusClass = censusClasses.get(censusCounter);\n oldValueLookUpColumns.add(censusClass.getColumnNumber());\n\n double[] minMaxValues = this.myTable.getMinMaxObject(rowToStartAt + surveyCounter, currentColumnNumber);\n\n double foundMin = minMaxValues[0];\n double foundMax = minMaxValues[1];\n\n double foundRandomNumber = 0.0;\n if(foundMin == foundMax){\n foundRandomNumber = foundMax;\n }else {\n foundRandomNumber = ThreadLocalRandom.current().nextDouble(foundMin, foundMax);\n foundRandomNumber = Math.round(foundRandomNumber * 100.0) / 100.0;\n }\n\n newTotalRandomNumber += foundRandomNumber;\n if(currentColumnNumber < END_EDITABLE_COL){\n currentColumnNumber++;\n }\n }\n\n //set min and max numbers\n //New column header that will appear in the new csv file\n NewCensusColumnDetails details = new NewCensusColumnDetails(\n surveyGrouping.toString(), \n newTotalRandomNumber,\n oldValueLookUpColumns,\n 0\n );\n\n newCensusColumnDetails.add(details);\n }\n \n newCensusColumnDetails = setCensusTotalColumns(newCensusColumnDetails);\n \n //Add the new NewCensusColumnDetails to the current MarkovChain object\n this.currentMarkovChain.setNewCensusColumnDetails(newCensusColumnDetails);\n }",
"public void saveContenttoFile(ArrayList<String> content,ArrayList<String> header, String pathResult){\n\t\ttry{\n\t\t\t//File file = new File(path+\"/\"+gene+\".csv\");\n\t\t\tFile file = new File(pathResult);\n\t\t\tif(!file.exists()){\n\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(file,true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw, 1000000);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tbw.write(content.get(0));\n\t\t\tcontent.remove(0); \n\t\t\tfor(String str: content) {\n\t\t\t\tif(str!=null ){\n\t\t\t\t\tbw.append(\",\" +\"\\\"\"+str+\"\\\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.newLine();\n\t\t\tbw.close();\n\t\t\tfw.close();\n\t\t}catch(IOException ioe){\n\t\t\tSystem.out.println(\"IOException occurred:\");\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn;\n\t}",
"public File writeToCSV() throws FileNotFoundException {\n\t\tFile attendanceSheet = new File(\"attendence_\" + \n\t\t\t\tCalendar.getInstance().toString() + \".csv\");\n\t\tPrintStream out = new PrintStream(attendanceSheet);\n\t\tout.println(\"Student name, Attendance\");\n\t\tfor (String student : isPresent.keySet()) {\n\t\t\tout.print(student + \", \");\n\t\t\tif (isPresent.get(student)) {\n\t\t\t\tout.println(\"Here\");\n\t\t\t} else {\n\t\t\t\tout.println(\"Absent\");\n\t\t\t}\n\t\t}\n\t\treturn attendanceSheet;\n\t}",
"public void exportCsv() throws IOException\n {\n File csvOutputFile = new File(\"datas.csv\");\n try (PrintWriter writer = new PrintWriter(csvOutputFile)) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Temps\");\n sb.append(\",\");\n for (String title : this.getModelLabels())\n {\n sb.append(title);\n sb.append(\",\");\n }\n sb.append(\"\\n\");\n for (int i = 0; i < this.getEtatPopulation().size(); i++)\n {\n sb.append(i);\n sb.append(\",\");\n for (double value : this.getEtatPopulation().get(i))\n {\n sb.append(value);\n sb.append(\",\");\n }\n sb.append(\"\\n\");\n }\n writer.write(sb.toString());\n System.out.println(\"Datas Successfully Exported !\");\n }\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n }\n\n }",
"private void saveFile(File file){\n\t\ttry{\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\t\t\t\r\n\t\t\tfor(QuizCard card:cardList){\r\n\t\t\t\twriter.write(card.getQuestion() + \"/\");\r\n\t\t\t\twriter.write(card.getAnswer() + \"\\n\");\r\n\t\t\t}\r\n\t\t\twriter.close();\r\n\t\t} catch (IOException ex){\r\n\t\t\tSystem.out.println(\"couldn't write the cardList out\");\r\n\t\t\tex.printStackTrace();}\r\n\t}",
"void writeRecordsToFile(List<IRecord> recordList) throws IOException;",
"public void saveScores(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(topScores.get(0) + \"-\" + topScores.get(1) + \"-\" + topScores.get(2) + \"-\" + topScores.get(3) + \"-\" + topScores.get(4));\n writer.newLine();\n writer.write(topName.get(0) + \"-\" + topName.get(1) + \"-\" + topName.get(2) + \"-\" + topName.get(3) + \"-\" + topName.get(4));\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void saveFile() throws FileNotFoundException {\r\n try {\r\n PrintWriter out = new PrintWriter(FILE_NAME);\r\n //This puts back the labels that the loadFile removed\r\n out.println(\"date,cust_email,cust_location,product_id,product_quantity\");\r\n int i = 0;\r\n\r\n while (i < orderInfo.size()) {\r\n String saved = orderInfo.get(i).toString();\r\n out.println(saved);\r\n i++;\r\n }\r\n out.close();\r\n } catch (FileNotFoundException e) {\r\n }\r\n\r\n }",
"private void saveToFile(Agent agent, String _login)\n {\n File file = new File(_login + \".csv\");\n FileWriter fw;\n BufferedWriter bw;\n try {\n fw = new FileWriter(file, false);\n bw = new BufferedWriter (fw);\n String csvData = agent.getCSVData();\n bw.write(csvData);\n bw.close();\n fw.close();\n }\n catch(IOException ioEx) {\n JOptionPane.showMessageDialog(null, ioEx.getMessage());\n }\n }",
"private void save(List<String[]> data, Integer numFichier, String nomFichier) throws IOException {\n FileWriter fileWriter = null;\n CSVWriter cSVWriter2 = null;\n //-------------------------------------------------------------\n // Construction du nom de fichier\n //-------------------------------------------------------------\n\n\n// String nomFichier = constructionNomFichier(flux);\n\n// // Mini rappel sur les ternaire en java : variable = (condition) ? valeur_si_vrai : valeur_si_faux; \n// String pays = (flux.getJournalLie() != null && flux.getJournalLie().getPays() != null && !flux.getJournalLie().getPays().isEmpty()) ? flux.getJournalLie().getPays() : \"XX\";\n// String ville = (flux.getJournalLie() != null && flux.getJournalLie().getCodeVille() != null && !flux.getJournalLie().getCodeVille().isEmpty()) ? flux.getJournalLie().getCodeVille() : \"XX\";\n// String langue = (flux.getJournalLie() != null && flux.getJournalLie().getLangue() != null && !flux.getJournalLie().getLangue().isEmpty()) ? flux.getJournalLie().getLangue() : \"XX\";\n// String codeJournal = (flux.getJournalLie() != null && flux.getJournalLie().getCodeJournal() != null && !flux.getJournalLie().getCodeJournal().isEmpty()) ? flux.getJournalLie().getCodeJournal() : \"XX\";\n// String codeTypeFlux = (flux.getTypeFlux() != null && flux.getTypeFlux().getCodeType() != null && !flux.getTypeFlux().getCodeType().isEmpty()) ? flux.getTypeFlux().getCodeType() : \"XXX\";\n//\n// nomFichier = langue + \"_\" + pays + \"_\" + codeJournal + \"_\" + codeTypeFlux;\n\n //--------------------------------------------------------------------------------\n // Enregistrement \n //--------------------------------------------------------------------------------\n try {\n fileWriter = new FileWriter(exportPath + nomFichier + \"__F__\" + numFichier.toString() + \".csv\");\n\n if (escapebySlash) {\n cSVWriter2 = new CSVWriter(fileWriter, '\\t', '\"', '\\\\');\n } else {\n cSVWriter2 = new CSVWriter(fileWriter, '\\t', '\"');\n }\n\n cSVWriter2.writeAll(data);\n\n\n } catch (Exception e) {\n logger.debug(\"Erreur lors de l'enregistrement\");\n } finally {\n if (cSVWriter2 != null) {\n try {\n cSVWriter2.close();\n } catch (Exception e) {\n }\n }\n\n if (fileWriter != null) {\n try {\n fileWriter.close();\n } catch (Exception e) {\n }\n }\n }\n\n data.clear(); // On purge le fichier data\n //---------------------------------------------------------------------------\n // Assemblage \n //---------------------------------------------------------------------------\n // Si ce n'est pas le premier fichier. Il faut réassembler\n// if (numFichier != 0) {\n// File f1 = new File(exportPath + nomFichier + \"__F__0.csv\");\n// File fCurrent = new File(exportPath + nomFichier + \"__F__\" + numFichier.toString() + \".csv\");\n// \n// String content = FileUtils.readFileToString(fCurrent);\n// FileUtils.write(f1, content, true);\n// \n// fCurrent.delete();\n// }\n }",
"public static void writeCSV(Calendar cal) {\n\n try {\n\n BufferedWriter bw = null;\n\n String fileString = \"P5Calendar.csv\";\n String fileLine = \"\";\n\n FileWriter fw = new FileWriter(fileString, false);\n bw = new BufferedWriter(fw);\n\n ArrayList<Activity> activities = cal.getActivities();\n\n for (int j = 0; j < 1; j++) {\n bw.write(\"Year\" + \",\" + \"Month\" + \",\" + \"Activity\" + \",\" + \"Role\" + \"\\n\");\n }\n\n for (int i = 0; i < activities.size(); i++) {\n Activity activity = activities.get(i);\n bw.append(activity.Year + \",\" + activity.Month + \",\" + activity.Name + \",\" + activity.Roles);\n }\n\n bw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n }",
"public static void WriteToACsv(AddressbookModel addressbook,String addressbookname){\n final String COMMA_DELIMITER = \",\";\n final String LINE_SEPARATOR = \"\\n\";\n String PATH=\"C:\\\\Users\\\\Srikar\\\\IdeaProjects\\\\Addressbook\\\\src\\\\com\\\\mphasis\\\\data\"+\"\\\\\"+addressbookname;\n final String HEADER = \"Firstname,LastName,Address,City,Pincode,Number\";\n List personList=addressbook.getAddressbook();\n FileWriter fileWriter=null;\n try{\n fileWriter=new FileWriter(PATH);\n fileWriter.append(HEADER);\n fileWriter.append(\"\\n\");\n Iterator it=personList.iterator();\n while (it.hasNext()){\n Person person=(Person) it.next();\n fileWriter.append(person.getFirstname());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getLastname());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getAddress());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getCity());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getZip());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getPhone());\n fileWriter.append(LINE_SEPARATOR);\n }\n }\n catch(Exception ee)\n {\n ee.printStackTrace();\n }\n finally\n {\n try\n {\n fileWriter.close();\n }\n catch(IOException ie)\n {\n System.out.println(\"Error occured while closing the fileWriter\");\n ie.printStackTrace();\n }\n }\n }",
"private void writeBatchToFile(ArrayList<SensorEntry> batch) {\n\n\t\tFile file = new File(currFolder + \"/\" + entriesRecorded + \".csv\");\n\n\t\ttry {\n\n\t\t\tFileOutputStream outputStream = new FileOutputStream(file);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t\toutputStream.write(Constants.INS_DATA_HEADER.getBytes());\n\t\t\t}\n\n\t\t\tfor (SensorEntry e : batch)\n\t\t\t\toutputStream.write((e.toRawString() + \",\" + e.getTimeRecorded() + \"\\n\").getBytes());\n\n\t\t\toutputStream.close();\n\n\t\t\tsetsOfEntriesRecorded++;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void writeCSVtable(String outBuffer) throws IOException\n {\n String csvFile;\n // Create a file chooser\n File currentDir = new File(\"\").getAbsoluteFile();\n final JFileChooser fc = new JFileChooser(currentDir);\n // In response to a button click:\n int returnVal = fc.showSaveDialog(null);\n // open file\n File file = fc.getSelectedFile();\n // obtain filename\n csvFile = file.getName();\n\n // open the file\n fWriter = new FileWriter(csvFile); \n // write ALL the to the file in 1 burst\n fWriter.write(outBuffer); \n // close the file\n fWriter.close();\n }",
"public static void exportUserList() throws IOException {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(\r\n\t\t\t\tnew BufferedOutputStream(\r\n\t\t\t\t\t\tnew FileOutputStream(\"userList.dat\")));\r\n\t\tout.writeObject(userList);\r\n\t\tout.close();\r\n\t}",
"private static void saveToFile(ArrayList<Favourite> allFav) {\n\t\t\n\t\tBufferedWriter writer=null;\n\t\t\n\t\ttry {\n\t\t\twriter=new BufferedWriter(new FileWriter(Constants.KEY_FAV_FILE));\n\t\t\tString save=\"\";\n\t\t\tfor(Favourite f:allFav) {\n\t\t\t\tsave+=fileFormat(f);\n\t\t\t}\n\t\t\twriter.write(save);\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\n\t\t}finally{\n\t\tif(writer!=null){\n\t\t\ttry{\n\t\t\t\twriter.close();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\n\t\n}\n\n\t\t\n\t}",
"String toCSVString();",
"public void getList() {\n\n\t\tFile opFile = new File(\"/home/bridgeit/Desktop/newfile.txt\");\n\t\ttry {\n\t\t\topFile.createNewFile();\n\t\t\tFileWriter fwriter = new FileWriter(opFile);\n\n\t\t\tfor (int i = 0; i < slist.size(); i++) {\n\n\t\t\t\tfwriter.append(slist.returnItem(i) + \" \");\n\n\t\t\t}\n\t\t\tfwriter.close();\n\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}",
"private static void writeToBooksFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(BOOKS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tSet<Integer> keys = ALL_BOOKS.keySet(); //returns list of all keys in ALL_BOOKS\n\t\tfor(int key : keys){\n\t\t\tbw.write(ALL_BOOKS.get(key).ParseForTextFile()); //writes the Parsed Form of the BookDetails object to the books.txt file\n\t\t}\n\t\tbw.close();\n\t}",
"String[] toCSV() throws Exception;",
"private void chatSave() {\n try{\n //create a text file to write the chatList to\n PrintStream print =\n new PrintStream(new FileOutputStream(\"log.txt\", true));\n //write each line of the array to the file \n for (String str:chatList)\n print.println(str);\n //once each record has been written to the file, close it.\n print.close();\n } catch (IOException e) {\n // exception handling\n }\n }",
"public void saveListToFile() {\r\n\t\ttry {\r\n\t\t\tObjectOutputStream oos = null;\r\n\t\t\ttry {\r\n\t\t\t\toos = new ObjectOutputStream(new FileOutputStream(FTP_LIST_FILE));\r\n\t\t\t\toos.writeObject(FTPList.self);\r\n\t\t\t\toos.flush();\r\n\t\t\t} finally {\r\n\t\t\t\toos.close();\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }",
"public static void writeNewCSV(Calendar cal) {\n\n try {\n\n BufferedWriter bw = null;\n\n String fileString = \"P5Calendar.csv\";\n String fileLine = \"\";\n\n FileWriter fw = new FileWriter(fileString, true);\n bw = new BufferedWriter(fw);\n\n ArrayList<Activity> activities = cal.getActivities();\n\n int lastElement = activities.size();\n Activity activity = activities.get(lastElement - 1);\n bw.write(activity.Year + \",\" + activity.Month + \",\" + activity.Name + \",\" + activity.Roles.name + \" \" + \"(\"\n + activity.Roles.subRole + \")\" + \"\\n\");\n\n bw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n }",
"private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}",
"public void writeToCsv(ArrayList<Invoice> items) throws IOException {\n String[] header = {\"ID\", \"Items\", \"Subtotal\", \"State\", \"CreatedAt\", \"CompletedAt\", \"StaffID\", \"TableID\", \"Total\", \"AmountPaid\", \"PaymentType\", \"Receipt\"};\n BufferedWriter csvFile = FileIOHelper.getFileBufferedWriter(this.orderCsv);\n ArrayList<String[]> toWrite = new ArrayList<>();\n toWrite.add(header);\n items.forEach((i) -> toWrite.add(i.toCsv()));\n writeToCsvFile(toWrite, csvFile);\n }",
"void SaveBook(String fileName)\r\n\t\t{\r\n\t\t\tFile f = new File(fileName);\r\n\t\t\t\r\n\t\t\tFileWriter writer;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\twriter = new FileWriter(f);\r\n\t\t\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\twriter.write(this.get(i).getContactName());\r\n\t\t\t\twriter.write(\",\");\r\n\t\t\t\twriter.write(Integer.toString(this.get(i).getContactNumber()));\r\n\t\t\t\twriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\twriter.flush();\r\n\t\t\t\twriter.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public void writeScores() throws IOException {\n if (this.list.isPresent() && this.toSave) {\n try (DataOutputStream out = new DataOutputStream(new FileOutputStream(this.file))) {\n for (final Pair<String, Integer> p : this.list.get()) {\n out.writeUTF(p.getX());\n out.writeInt(p.getY().intValue());\n }\n this.toSave = false;\n } catch (IOException e) {\n System.out.println(\"IOException on writing scores\");\n }\n }\n\n }",
"public void flushSudentsContentInFile(String path) {\n\t\ttry (Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path, false), \"UTF-8\"))) {\n\t\t\tfinal String[] res = new String[] { \"\" };\n\t\t\tthis.getStudents().forEach(student -> {\n\t\t\t\tString ress = student.toString();\n\t\t\t\tres[0] += ress + \"\\n\";\n\t\t\t});\n\t\t\twriter.write(res[0]);\n\t\t\twriter.flush();\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"File write failed.\", e);\n\t\t}\n\t}",
"public static void writeToCSV() {\n final String CSV_SEPARATOR = \",\";\n final String QUOTE = \"\\\"\";\n if (!Crawler.getKeyWordsHits().isEmpty()) {\n try (BufferedWriter bufferedWriter =\n new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\"results.csv\", true), StandardCharsets.UTF_8))) {\n\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> {\n String oneLine = QUOTE + keyWord + QUOTE +\n CSV_SEPARATOR +\n hitsNumber;\n try {\n bufferedWriter.write(oneLine);\n bufferedWriter.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n String lastLine = QUOTE + Crawler.getUrl() + QUOTE + CSV_SEPARATOR + Crawler.getTotalHits();\n bufferedWriter.write(lastLine);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n Crawler.setKeyWordsHits(new HashMap<>());\n Crawler.setTotalHits(0);\n }",
"public static void appendToCSV(List<Item> items) throws IOException {\n File file = new File(USER_ITEMS_FILE);\n FileWriter fileWriter = new FileWriter(file, true);\n try (BufferedWriter writer = new BufferedWriter(fileWriter);\n CSVPrinter csvPrinter = new CSVPrinter(writer, CSVFormat.EXCEL);\n ){\n for (Item i: items) {\n if (!\"itemNo\".equals(i.getItemNo())) {\n csvPrinter.printRecord(i.getItemNo(), i.getRoom().getStatus(), i.getCategory().getCategory(), i.getType().getProductTypeString(), i.getMake(), i.getModel(), i.getSerial(), i.getReceipt(), i.getPhoto(), i.getValue(), i.getComments(), FORMATTER.format(new Date()).toString(), i.isDeleted().booleanValue(), i.email);//4/30 JGP added i.email string\n }\n }\n }\n }",
"@FXML\n public void handleExport() throws Exception{\n \n Writer writer = null;\n String filename = file.getText();\n file.clear();\n \n try {\n File file = new File(filename+\".csv\");\n writer = new BufferedWriter(new FileWriter(file));\n for (MarkLayer1 mark : data) {\n\n String text = mark.getStunum()+\";\" + mark.getCoursename() + \";\" + mark.getClassM()\n + \";\"+ mark.getExam()+\";\"+mark.getFinalM()+\"\\n\";\n\n writer.write(text);\n msg.setText(\"Export Success\");\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n msg.setText(\"Error with export\");\n }\n finally {\n\n writer.flush();\n writer.close();\n } \n \n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent ae) {\n\t\tFile file = FileChooser.SaveCsvFile();\r\n\t\tif(file==null)\r\n\t\t\treturn;\r\n\t\tBufferedWriter bw = null;\r\n\t\ttry {\r\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\r\n\t\t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t\tbw.write(\"Phonenumber\");\r\n\t\t\tbw.newLine();\r\n\t\t\tfor(int i = 0;i<CSVFrame.model.getRowCount();i++) {\r\n\t\t\t\tRecord r = CSVFrame.model.getRowAt(i);\r\n\t\t\t\tSystem.out.println(r.getPhone());\r\n\t\t\t\tbw.write(r.getPhone());\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Finished creating suppression file\");\r\n\t\t} catch(IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tbw.close();\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}",
"public static void writeFile(ArrayList<Integer> data, String path) {\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(path);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos);\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n//\t\t\tfor (String dt : data) {\n//\t\t\t\tbw.write(dt);\n//\t\t\t\tbw.newLine();\n//\t\t\t}\n\n\t\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t\tbw.write(data.get(i).toString());\n\t\t\t\tif (i < data.size() - 1)\n\t\t\t\t\tbw.write(\", \");\n\n\t\t\t\t// bw.newLine();\n\t\t\t}\n\t\t\tbw.newLine();\n\t\t\tbw.close();\n\t\t\tosw.close();\n\t\t\tfos.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void generateCsvFileWithFinalData(File path) // String sFileName\n {\n String COMMA_DELIMITER = \",\";\n String NEW_LINE_SEPARATOR = \"\\n\";\n try\n {\n // String path to our created output data file\n String finalFilePath = String.valueOf(path.getParent()) + \"\\\\test.csv\";\n FileWriter writer = new FileWriter(finalFilePath);\n\n for (Player player : sortedFinalPlayerList) {\n writer.append(player.getLastName());\n writer.append(COMMA_DELIMITER);\n writer.append(player.getFirstName());\n writer.append(COMMA_DELIMITER);\n writer.append(player.getCountry());\n writer.append(COMMA_DELIMITER);\n writer.append(String.valueOf(player.getLongCommSubsCounter()));\n writer.append(NEW_LINE_SEPARATOR);\n }\n\n //generate whatever data you want\n writer.flush();\n writer.close();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"public WriteToFile(List<Person> peopleList){\r\n\r\n try {\r\n // write over existing file if exists or create new\r\n FileWriter myWriter = new FileWriter(\"sorted-names-list.txt\", false);\r\n for (Person person: peopleList){\r\n // Get person name in order to append to text file\r\n String wholeName = person.getFirstName() + \" \" + person.getLastName();\r\n System.out.println(wholeName);\r\n myWriter.write(wholeName);\r\n myWriter.write(\"\\n\");\r\n }\r\n myWriter.close();\r\n System.out.println(\"Successfully wrote to the file.\");\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }",
"private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }",
"public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\t// if(StringUtils.isNotEmpty(empId)) {\n\t\t\t\t// filePath += \"/\" + empId;\n\t\t\t\t// }\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(EMPLOYEE_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (EmployeeDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\t// log.debug(\"Writing transaction record for Employee id :\"+\n\t\t\t\t\t\t// transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getEmpId());\n\t\t\t\t\t\trecord.add(transaction.getName());\n\t\t\t\t\t\trecord.add(transaction.getDesignation());\n\t\t\t\t\t\trecord.add(transaction.getManagerName());\n\t\t\t\t\t\trecord.add(transaction.getProjectName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getActive());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}",
"private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void writeDataToCsvUsingStringArrayForAssay(PrintWriter writer, List<AssayTabDTO> assayTabList, List<ReferenceTabDTO> referenceTabDTOList, List<StructureDetailsTabDTO> structureDetailsTabDTOList) {\n\n String[] CSV_ASSAY_TITLE = {\"Assay Details\"};\n\n String[] CSV_ASSAY_HEADER = {\"ASSAY_ID\", \"REF_ID\", \"GVK_ID\", \"PROTEIN\", \"STANDARD_NAME\", \"MUTANT\", \"WILD_TYPE\", \"NEW_RESIDUE\", \"OLD_RESIDUE\", \"OPERATION\", \"ASSAY_POSITION\", \"TARGET_PROFILE\", \"P_S_M\", \"BUFFER\", \"BUFFER_CONC\", \"BUFFER_PREFIX\", \"BUFFER_UOM\", \"SUBSTRATE\", \"SUBSTRATE_CONC\", \"SUBSTRATE_PREFIX\", \"SUBSTRATE_UOM\", \"RADIO_LIGAND\", \"RADIO_LIGAND_PREFIX\", \"RADIO_LIGAND_UOM\", \"RADIO_LIGAND_CONC\", \"CO_ADMINISTERED\", \"CO_ADMINISTERED_PREFIX\", \"CO_ADMINISTERED_UOM\", \"CO_ADMINISTERED_VALUE\", \"IN_PRESENCE_OF\", \"IN_PRESENCE_OF_CONC\", \"IN_PRESENCE_OF_PREFIX\", \"IN_PRESENCE_OF_UOM\", \"INCUBATION_TIME\", \"INCUBATION_PREFIX\", \"INCUBATION_UOM\", \"TEMPERATURE\", \"TEMPERATURE_PREFIX\", \"TEMPERATURE_UOM\", \"PH_PREFIX\", \"PH\"};\n\n try (\n CSVWriter csvWriter = new CSVWriter(writer,\n CSVWriter.DEFAULT_SEPARATOR,\n CSVWriter.DEFAULT_ESCAPE_CHARACTER,\n CSVWriter.DEFAULT_LINE_END);\n ) {\n csvWriter.writeNext(CSV_ASSAY_TITLE);\n csvWriter.writeNext(CSV_ASSAY_HEADER);\n for (AssayTabDTO assayTabDataReturn : assayTabList) {\n for (ReferenceTabDTO referenceTabDTO : referenceTabDTOList) {\n for (StructureDetailsTabDTO structureDetailsTabDTO : structureDetailsTabDTOList) {\n String[] assayData = new String[]{\n assayTabDataReturn.getAssayId() + \"\",\n referenceTabDTO.getRefId() + \"\",\n structureDetailsTabDTO.getGvkId() + \"\",\n assayTabDataReturn.getProtein() + \"\",\n assayTabDataReturn.getStandardName() + \"\",\n assayTabDataReturn.getMutant() + \"\",\n assayTabDataReturn.getWildType() + \"\",\n assayTabDataReturn.getNewResidue() + \"\",\n assayTabDataReturn.getOldResidue() + \"\",\n assayTabDataReturn.getOperation() + \"\",\n assayTabDataReturn.getAssayPosition() + \"\",\n assayTabDataReturn.getTargetProfile() + \"\",\n assayTabDataReturn.getP_s_m() + \"\",\n assayTabDataReturn.getBuffer() + \"\",\n assayTabDataReturn.getBufferConc() + \"\",\n assayTabDataReturn.getBufferPrefix() + \"\",\n assayTabDataReturn.getBufferUom() + \"\",\n assayTabDataReturn.getSubstrate() + \"\",\n assayTabDataReturn.getSubstrateConc() + \"\",\n assayTabDataReturn.getSubstratePrefix() + \"\",\n assayTabDataReturn.getSubstrateUom() + \"\",\n assayTabDataReturn.getRadioLigand() + \"\",\n assayTabDataReturn.getRadioLigandPrefix() + \"\",\n assayTabDataReturn.getRadioLigandUom() + \"\",\n assayTabDataReturn.getRadioLigandConc() + \"\",\n assayTabDataReturn.getCoAdministered() + \"\",\n assayTabDataReturn.getCoAdministeredPrefix() + \"\",\n assayTabDataReturn.getCoAdministeredUom() + \"\",\n assayTabDataReturn.getCoAdministeredValue() + \"\",\n assayTabDataReturn.getInPresenceOf() + \"\",\n assayTabDataReturn.getInPresenceOfConc() + \"\",\n assayTabDataReturn.getInPresenceOfPrefix() + \"\",\n assayTabDataReturn.getInPresenceOfUom() + \"\",\n assayTabDataReturn.getIncubationTime() + \"\",\n assayTabDataReturn.getIncubationPrefix() + \"\",\n assayTabDataReturn.getIncubationUom() + \"\",\n assayTabDataReturn.getTemperature() + \"\",\n assayTabDataReturn.getTemperaturePrefix() + \"\",\n assayTabDataReturn.getTemperatureUom() + \"\",\n assayTabDataReturn.getPhPrefix() + \"\",\n assayTabDataReturn.getPh() + \"\"\n\n };\n\n csvWriter.writeNext(assayData);\n }\n }\n\n }\n\n\n } catch (Exception e) {\n System.out.println(\"Exception occured into the AssayTab Data Export\" + e.getMessage());\n e.printStackTrace();\n }\n\n }",
"public static void write(String fileName, List data) throws IOException {\n PrintWriter out = new PrintWriter(new FileWriter(fileName));\n\n try {\n\t\tfor (int i =0; i < data.size() ; i++) {\n \t\tout.println((String)data.get(i));\n\t\t}\n }\n finally {\n out.close();\n }\n }"
] | [
"0.7156864",
"0.7096417",
"0.70749116",
"0.69732803",
"0.6900457",
"0.6898588",
"0.68957514",
"0.68082833",
"0.66950524",
"0.66845846",
"0.6681555",
"0.6632648",
"0.6601198",
"0.6498064",
"0.64667296",
"0.6459523",
"0.64544445",
"0.64525884",
"0.64321446",
"0.6419272",
"0.6317763",
"0.6316403",
"0.6315244",
"0.629962",
"0.6245345",
"0.624201",
"0.62416196",
"0.62123615",
"0.6204553",
"0.62037534",
"0.61829585",
"0.61662966",
"0.61587816",
"0.61465836",
"0.61414784",
"0.6132983",
"0.6128863",
"0.6124621",
"0.6108642",
"0.6105974",
"0.6099825",
"0.60915744",
"0.6073215",
"0.6054566",
"0.6054209",
"0.6052036",
"0.6046824",
"0.6043696",
"0.6019398",
"0.60149544",
"0.6000747",
"0.5996144",
"0.5981919",
"0.5972402",
"0.5960735",
"0.5945226",
"0.5938445",
"0.5935467",
"0.5929126",
"0.5925472",
"0.59204936",
"0.5907219",
"0.5902372",
"0.58943737",
"0.58941567",
"0.588981",
"0.58862185",
"0.58794534",
"0.58688396",
"0.58673066",
"0.58658916",
"0.5861795",
"0.5855188",
"0.5842782",
"0.5832214",
"0.5823758",
"0.58215344",
"0.5820244",
"0.5814491",
"0.581247",
"0.581092",
"0.58093673",
"0.5797207",
"0.5792324",
"0.5785787",
"0.5784048",
"0.57789856",
"0.5774982",
"0.5764965",
"0.5747689",
"0.57391846",
"0.5718192",
"0.57079047",
"0.5699884",
"0.5697714",
"0.5697435",
"0.56959397",
"0.569424",
"0.5690785",
"0.5690297"
] | 0.7502504 | 0 |
Select top noncontract students from the list. | static List<Student> selectTopNonContractStudents(List<Student> students, double topPercentage) {
if (topPercentage < 0 || topPercentage > 1) {
throw new IllegalArgumentException(
"Percentage of students to select should be in bounds of 0...1"
);
}
List<Student> rating = students.stream()
.filter(s -> !s.isContract())
.sorted(Comparator.comparingDouble(s -> -s.getAverageScore()))
.collect(Collectors.toList());
return rating.subList(0, (int) Math.floor(rating.size() * topPercentage));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Student findWithoutSectionsBy(int studentNumber);",
"public ArrayList<Student> filterSearchStudentList(int stuNum){\n \n ArrayList<Student> filteredList = new ArrayList<Student>();\n \n int existance = 0;\n\n for(int i = 0; i<studList.size(); i++){\n \n if(studList.get(i).getStuNumber() <= stuNum){\n \n Student keyListOb = new Student(studList.get(i).getFullName(), studList.get(i).getStuNumber(), studList.get(i).getGPA());\n filteredList.add(keyListOb);\n }\n \n else{\n existance++;\n }\n }\n if(existance == studList.size()){\n System.out.println(\"\\nNo results\");\n }\n\n for(int i =0; i<filteredList.size();i++){\n System.out.println(\"Student Name: \" + filteredList.get(i).getFullName() + \", Student Number: \" + filteredList.get(i).getStuNumber() + \", Student GPA: \" + filteredList.get(i).getGPA());\n }\n\n return filteredList;\n }",
"public static List<Course> sortElNumOfStdSkipFirstLimitByTwo(List<Course> courseList){\n return courseList.\n stream().\n sorted(Comparator.comparing(Course::getNumberOfStudents)).\n skip(1).\n limit(2).\n collect(Collectors.toList());\n }",
"String getTopSelectClause(int top);",
"public List<Course> getTopNCourses(int N) throws CannotGetCoursesException{\n if(N < 1) return null;\n PriorityQueue<Course> topNCourses = new PriorityQueue<>(N,\n Comparator.comparingInt(Course::getLearnersCount));\n StepikResponse stepikResponse;\n int currentPage = 1;\n try {\n do {\n if(showProgress) System.out.println(\"Просмотр страницы #\" + currentPage);\n Call<StepikResponse> getCoursesCaller = stepikService.getCourses(currentPage);\n stepikResponse = getCoursesCaller.execute().body();\n if(stepikResponse == null){\n throw new CannotGetCoursesException(\"Response is null\");\n }\n if(stepikResponse.getCourses() == null){\n throw new CannotGetCoursesException(\"Response has not courses\");\n }\n for(Course course : stepikResponse.getCourses()){\n topNCourses.offer(course);\n if(topNCourses.size() > N){\n topNCourses.poll(); //removing course with less learners count\n }\n }\n currentPage++;\n } while(stepikResponse.getMeta() != null && stepikResponse.getMeta().isHasNext());\n }catch (IOException ioe){\n throw new CannotGetCoursesException(ioe.getMessage());\n }\n\n List<Course> courseList = new ArrayList<>(topNCourses);\n courseList.sort(Comparator.comparingInt(Course::getLearnersCount).reversed());\n\n return courseList;\n }",
"Collection<Section> findByNotStudentNo(int studentNumber);",
"public static MyStudent studentWithHighest ( List<MyStudent> list) {\n\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-1).findFirst().get();\n\t}",
"Student findWithSectionsBy(int studentNumber);",
"String getTopWhereClause(int top);",
"public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }",
"public static List<Course> sortElNumOfStdLimitByTwo(List<Course> courseList){\n return courseList.stream().\n sorted(Comparator.comparing(Course::getNumberOfStudents)).\n limit(2).\n collect(Collectors.toList());\n }",
"@Override\n\tpublic Student selectStudent() {\n\t\treturn null;\n\t}",
"public List<Integer> findTopGenesByPaperCnt( Integer n ) throws DAOException;",
"@Override\n\tpublic List<Student> geStudents() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<DrankB> findCommodityByTop() {\n\t\treturn pageMapper.findCommodityByTop();\r\n\t}",
"public static MyStudent SecondHighest (List<MyStudent> list) {\n\t\t\t\n\t\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-2).findFirst().get();\n\t\t\t\n\t\t}",
"public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }",
"List<MorePracticeClass> notSelectClass(@Param(\"orgName\") String orgName, @Param(\"className\") String className, @Param(\"orgId\") Integer orgId, @Param(\"orgList\") List<Org> orgList, RowBounds rowBounds);",
"public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}",
"List<Student> selectByExample(StudentExample example);",
"private int removeBestProfessor() {\n if (professors.size() == 1){\n return 2; // MEAN LOSS\n } else {\n if (professors.get(0).getName().equals(DefaultValues.NAME_FIRST_PROF)){\n professors.remove(1);\n } else {\n professors.remove(0);\n }\n return 1;\n }\n }",
"@Override\r\n\tpublic List<Student> selectStudent(String name, String alias) {return null;\r\n\t}",
"@Override\n\tpublic List stulist(int page, int limit) {\n\t\treturn null;\n\t}",
"public static void runExercise3() {\n students.stream().filter(student -> student.getAge() > 22).limit(5).forEach(y -> System.out.println(y.getName() + \" \" + y.getAge()));\n }",
"private static Predicate<Courses> numberOfStudentsPredecateMethod(int numberOfStudentsThreshhold) {\n\t\treturn course -> course.getNumberOfStudents() > numberOfStudentsThreshhold;\n\t}",
"List<Student> selectByExample(StudentCriteria example);",
"public List<Subject> getfifthsubj(String course) {\n\t\treturn sub_dao.getfifthsubj(course);\r\n\t}",
"com.demo.springprotobuff.Demoproto.Student getStudent(int index);",
"@Override\r\n\tpublic Students findStudents() {\n\t\treturn null;\r\n\t}",
"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 }",
"List<StudentRecord> getStudents(String clientId) throws Exception;",
"public List<User> getStudents(Group currentGroup, String orderby);",
"public String getUnfoundStudents() {\r\n\t\treturn this.unfoundStudents;\r\n\t}",
"public ArrayList<String> alwaysPopular(){\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (NameRecord n : list){\n\t\t\tif (n.topRankDecs()>=2){\n\t\t\t\tresult.add(n.getName());\n\t\t\t}\n\t\t}\t\n\t\treturn result;\n\t}",
"public static void printN(List<Student> data){\n printN(data, data.size());\n }",
"public static ArrayList<String> getTopTen() throws Exception{\n\t\n\tint start, end;\n\tFile xmlFile = getFile();\n\tif(!xmlFile.exists()){\n\t\tJOptionPane.showMessageDialog(null, \"Record Does nor exist\");\n\t}\n\tScore root = new Score();\n\tMap<String, Integer> standings = new TreeMap<String, Integer>();\n root = readObjectAsXmlFrom(new FileReader(xmlFile.getAbsolutePath()), root.getClass());\n standings = root.standings;\n Map<String, Integer> sortedStandings = sortByValue(standings);\n Set<Entry<String, Integer>> keys = sortedStandings.entrySet();\n Object[] sortedArr = keys.toArray();\n end = sortedArr.length;\n if(end<=10) start = 0;\n else start = end -10;\n ArrayList<String> result = new ArrayList<String>();\n for(int x = start; x<end;x++){\n \tresult.add(sortedArr[x].toString());\n }\n\treturn result;\n }",
"TasteProfile.TopThreeUsers getTopThreeUsersBySong (String song_id);",
"Collection<Section> findByStudentNo(int studentNumber);",
"public static List<Course> sortElAvrScrSkipFirstThree(List<Course> courseList){\n return courseList.stream().\n sorted(Comparator.comparing(Course::getAverageScore)).\n skip(3).\n collect(Collectors.toList());\n }",
"public static void main(String[] args) {\n\t\tArrayListTest lt = new ArrayListTest();\r\n\t\tlt.addStudent(new Student(\"홍길동\",100));\r\n\t\tlt.addStudent(new Student(\"김영식\",60));\r\n\t\tlt.addStudent(new Student(\"박철수\",30));\r\n\t\tlt.addStudent(new Student(\"김지수\",80));\r\n\t\tlt.addStudent(new Student(\"박재훈\",30));\r\n\t\tlt.addStudent(new Student(\"다미\",90));\r\n\t\tlt.addStudent(new Student(\"다란이\",50));\r\n\t\t\r\n\t\tSystem.out.println(\"------------------------------------\");\r\n\t\t\r\n\t\tlt.printStudent();\r\n\t\tlt.removeStudent(3);\r\n\t\tlt.printStudent();\r\n\t\t\r\n\t\t//lt.printStudent();\r\n\t\t//lt.removeStudent(3);\r\n\t\t//lt.printStudent();\r\n\t}",
"@Override\n public List<News> getTop(int top) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n List<News> list = new ArrayList<>();\n String query = \"select top (?) * from news\\n\"\n + \"order by timePost desc\";\n try {\n conn = getConnection();\n statement = conn.prepareStatement(query);\n statement.setInt(1, top);\n result = statement.executeQuery();\n while (result.next()) {\n News news = new News(result.getInt(\"ID\"),\n result.getString(\"title\"),\n result.getString(\"description\"),\n result.getString(\"image\"),\n result.getString(\"author\"),\n result.getDate(\"timePost\"),\n result.getString(\"shortDes\"));\n list.add(news);\n }\n } catch (ClassNotFoundException | SQLException e) {\n throw e;\n } finally {\n closeResultSet(result);\n closePreparedStatement(statement);\n closeConnection(conn);\n }\n return list;\n }",
"public void getStudentNameStudentAsc()\n\t{\n\t\tDatabaseHandler db = new DatabaseHandler(getApplicationContext());\n\n\t\tstudent_name_studname_asc = db.getStudentNameAllEnquiryStudentAsc();\n\t\tIterator itr = student_name_studname_asc.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t}",
"public Student removeStudent(int index) {\n if(index >= numOfStudents) {\n return null;\n }\n Student temp = this.board[index];\n int position = index + 1;\n while(position < numOfStudents) {\n this.board[position - 1] = this.board[position];\n position++;\n }\n numOfStudents--;\n return temp;\n }",
"public ArrayList<Student> getAllStudents()\n {\n Cursor cursor = sqlServices.getData(USER_TABLE, null, USER_IS_TEACHER + \" = ?\",\n new String[]{\"0\"});\n return getStudentFromCursor(cursor);\n }",
"@Test\n public void testFindAllStudents() throws Exception {\n List<Students> list = cs.findAllStudents();\n for (Students stu :\n list) {\n System.out.println(stu);\n }\n }",
"public Student removeStudent()\r\n {\r\n Student student = null;\r\n\r\n if(first_node != null)\r\n {\r\n student = first_node.getData();\r\n first_node = first_node.getNextNode();\r\n\r\n number_of_entries--;\r\n removeID(student.getStudent_ID());\r\n updateAcademicLevels(\"remove\", student.getAcademic_year());\r\n }\r\n return student;\r\n }",
"public void setStudlimit(Integer studlimit) {\n this.studlimit = studlimit;\n }",
"public LdListResultBean selectListAfterCheckingCountIgnoreFetchScopeTx(LdPublisherCB cb, int maxCount) {\r\n assertConditionBeanNotNull(cb);\r\n final int selectedCount = delegateSelectCountIgnoreFetchScopeTx(cb);\r\n assertSelectedCountHasNotExceededMaxCount(selectedCount, maxCount, cb.toString());\r\n return new ResultBeanBuilder<LdPublisher>(this).buildListResultBean(cb, delegateSelectListTx(cb));\r\n }",
"public ArrayList<Student> getStudentsNotInCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n \n String statement = GET_SUDENTS_NOT_IN_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n return result;\n }",
"public int getNumStudents()\n\t{\n\t\treturn numStudents;\n\t}",
"public List<Integer> findTopGenesByRanking( Integer n ) throws DAOException;",
"@Override\n\tpublic List<JSONObject> selectStudents(JSONObject params) {\n\t\treturn this.selectList(\"selectStudents\", params);\n\t}",
"List<Student> getStudent();",
"public List<User> getStudentsNotRegistered(Group currentGroup);",
"UserShare5Min selectOneByExample(UserShare5MinExample example);",
"@Override\n\tpublic List<Student> selectStudent2(int classId) {\n\t\tString sql=\"SELECT stu_id,stu_no,stu_name,stu_profession FROM tb_student where class_id=?\";\n\t\tObject[] classid={classId};\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, classid, Student.class);\n\t\treturn stu;\n\t}",
"ObservableList<Expense> getFilteredExpenseList() throws NoUserSelectedException;",
"@Override\n\tpublic StudentDTO get(int index) {\n\t\treturn null;\n\t}",
"public String remove(Student s) {\r\n\t\t\r\n\t\tString removeString = new String(\"\");\r\n\t\t\r\n\t\t if (isEmpty()) {\r\n\t\t\t System.out.println(\"\\nList is empty!\");\r\n\t\t\t removeString = removeString + \"\\nList is empty!\";\r\n\t\t\t return removeString;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t int studentIndex = find(s);\r\n\t\t\t if( studentIndex != -1) {\r\n\t\t\t\t list[studentIndex] = list[numStudents-1];\r\n\t\t\t\t list[numStudents-1] = null;\r\n\t\t\t\t numStudents--;\r\n\t\t\t\t \r\n\t\t\t\t System.out.println(s.toString() + \" has been unenrolled.\");\r\n\t\t\t\t removeString = removeString + s.toString() + \" has been unenrolled.\";\r\n\t\t\t\t \r\n\t\t\t\t return removeString;\r\n\t\t\t }\r\n\t\t }\r\n\t\t System.out.println(s.toString() + \" is not enrolled.\");\r\n\t\t removeString = removeString + s.toString() + \" is not enrolled.\";\r\n\t return removeString;\r\n\t}",
"@Override\n public List<Student> getStudentsByCourse(Course course) {\n return null;\n }",
"@Override\n\tpublic Student selectStudent(String matriculation) {\n\t\t// FIX ME\n\t\treturn (Student) users.getStudents().get(matriculation);\n\t}",
"String getTopTrailClause(int top);",
"public static ArrayList<Student> getLockedStudenti() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_LOCKED_STUDENTS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Student> studentiBloccati = (ArrayList<Student>) rpp.parameters[0];\n\t\treturn studentiBloccati;\n\t}",
"Page<Student> findPaginated(int pageNo, int pageSize);",
"private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }",
"public List<PosPay> listPosPay(PosPay posPay,int firstResult ,int maxResults)throws DataAccessException;",
"List selectByExample(TResearchTeachExample example);",
"public List getStudentList() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n\n return list;\n } finally {\n log.debug(\"finished getStudentList\");\n }\n }",
"@Nonnull\n public SynchronizationJobCollectionRequest top(final int value) {\n addTopOption(value);\n return this;\n }",
"public Student getStudent(int index)\n {\n return students.get(index);\n }",
"@Override\r\n\tpublic ArrayList<PlayerPO> getMostImprovePlayer(Season season,\r\n\t\t\tPlayerData dataType) {\n\t\tArrayList<PlayerPO> allPlayers = playerController.getAllPlayers() ;\r\n\t\tCollections.sort(allPlayers,new PlayerSortHelper(\"avg\", dataType, season));\r\n\t\tArrayList<PlayerPO> result = new ArrayList<>(allPlayers.subList(0, 5));\r\n\t\treturn result ;\r\n\t}",
"public void studentTopUp(int amount)\n {\n if (currentPhone == null)\n return;\n\n currentPhone.phoneTopUp(amount);\n }",
"@Override\n\t\tpublic List<Community> subList(int fromIndex, int toIndex) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic List<StudentVO> sellectAll() {\n\t\treturn null;\n\t}",
"public int findTotalStudents() {\n\t\treturn students.size();\r\n\t}",
"@Override\n\tpublic List<StudentVO> selectName(String name) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Student[] getStudentsWithMaxAvgMark() {\n\t\treturn null;\r\n\t}",
"private void NumberOfStudentsInCourse(int numberOfStudents) {\n if (numberOfStudents > 20) {\n throw new StudentNumberForOneCourseExceededException(\"This course is limited to 20 people!\");\n }\n }",
"public static void printOldestPeople(){\n // Get the oldest people\n ArrayList<Person> oldests = query.getOldest();\n if (oldests.size() == 1) {\n System.out.println(\"The oldest person in the database is:\");\n } else {\n System.out.println(\"The oldest people in the database are:\");\n }\n for (Person old : oldests) {\n System.out.println(old);\n }\n }",
"public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}",
"@Override\n\tpublic List<Student> selectStudent(int classId) {\n\t\t\n\t\tString sql=\"select t2.stu_id,t2.stu_name,t2.stu_no ,t1.score_jilv,t1.score_jishu,t1.score_zhiye from \"\n\t\t\t\t+ \"(select stu_id,\"\n\t\t\t\t+ \"SUM(CASE WHEN score_type=1 THEN score_value END )score_jilv,\"\n\t\t\t\t+ \"SUM(CASE WHEN score_type=2 THEN score_value END )score_jishu,\"\n\t\t\t\t+ \"SUM(CASE WHEN score_type=3 THEN score_value END )score_zhiye \"\n\t\t\t\t+ \"from tb_score where class_id=? GROUP BY stu_id)t1,\"\n\t\t\t\t+ \"tb_student t2 WHERE t1.stu_id=t2.stu_id\";\n\t\tObject[] classid={classId};\n\t\t\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, classid, Student.class);\n\t\t\n\t\treturn stu;\n\t}",
"public List getStudentList(int startIndex, int endIndex) throws GenericBusinessException {\n if (startIndex < 1) {\n startIndex = 1;\n }\n if ( (endIndex - startIndex) < 0) {\n // Just return an empty list.\n return new ArrayList();\n }\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n query.setFirstResult(startIndex - 1);\n query.setMaxResults(endIndex - startIndex + 1);\n List list = hibernateTemplate.list(query);\n return list;\n } finally {\n log.debug(\"finished getStudentList(int startIndex, int endIndex)\");\n }\n }",
"public Integer getStudlimit() {\n return studlimit;\n }",
"public void printStudentList()\n {\n for(int i = 0; i < students.size(); i++)\n System.out.println( (i + 1) + \". \" + students.get(i).getName());\n }",
"@Override\n public List<IntraUserInformation> getIntraUsersWaitingYourAcceptance(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n try {\n\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getWaitingYourAcceptanceIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),\"\",intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", e, \"\", \"\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }",
"public ArrayList<String> alwaysLessPopular(){\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (NameRecord n : list){\n\t\t\tif (n.lessPop()){\n\t\t\t\tresult.add(n.getName());\n\t\t\t}\n\t\t}\t\n\t\treturn result;\n\t}",
"public static ArrayList<Student> getAllStudenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.parameters = new Object[] {};\n\t\t\trp.type = RequestType.GET_ALL_STUDENTS;\n\t\t\tReceiveContent rps = sendReceive(rp);\n\t\t\treturn (ArrayList<Student>) rps.parameters[0];\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"SendNewsLetter error\");\n\t\t}\n\t\treturn new ArrayList<Student>();\n\t}",
"public static Student getRandomStudentObject() {\n return new Student(\"Abc\", \"99\", \"10th\");\n }",
"List<NeeqCompanyAccountingFirmOnline> selectByExample(NeeqCompanyAccountingFirmOnlineExample example);",
"public List<cc> top(int k) {\n\t\tList<cc> topK = new ArrayList<>();\n\t\t\n for(int i = 0; i < k; i++){\n topK.add(ccList.get(i));\n }\n \n return topK;\n\t}",
"List<User> getNaturalSortedUsersByAge(List<User> users);",
"public List<Student> selectStudentAll() {\n\t\treturn this.studentMaper.selectStudentAll();\r\n\t}",
"@Override\n public List<ModelPerson> selectpaging(Integer start, Integer end) {\n return null;\n }",
"public static void printN(List<Student> data, int n){\n for (int r = 0; r < n; r++) {\n System.out.println(data.get(r));\n }\n System.out.println();\n }",
"public List<User> getStudents(Group currentGroup);",
"public ArrayList<Student> retrieveAllCurrent() {\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id WHERE users.type LIKE 'Student';\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.setTime(date);\r\n\t\t\r\n\t\tint currYear = cal.get(cal.YEAR);\r\n\t\tint currMth = cal.get(cal.MONTH);\r\n\t\t\r\n\t\tint year = 0;\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint id \t\t\t\t= Integer.parseInt(array.get(0));\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\tString fullName \t= array.get(2);\r\n\t\t\tString contactNum \t= array.get(3);\r\n\t\t\tString email \t\t= array.get(4);\r\n\t\t\tString type\t\t\t= array.get(5);\r\n\t\t\tString secondMajor \t= array.get(7);\r\n\t\t\tint role \t\t\t= Integer.parseInt(array.get(8));\r\n\t\t\tint teamId \t\t\t= Integer.parseInt(array.get(9));\r\n\t\t\tint prefRole \t\t= Integer.parseInt(array.get(10));\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tint matricYear = Integer.parseInt(username.substring(username.length() - 4, username.length()));\r\n\t\t\t\t\r\n\t\t\t\tyear = currYear - matricYear;\r\n\t\t\t\t\r\n\t\t\t\tStudent student = new Student(id, username, fullName, contactNum, email, type, secondMajor, role, teamId, prefRole);\r\n\t\t\t\t\r\n\t\t\t\tif(currMth > 8){\r\n\t\t\t\t\tyear++;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(year == 3 || year == 4){\r\n\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}catch(Exception e){}\r\n\t\t}\r\n\t\t\r\n\t\treturn students;\r\n\t}",
"public IPrinterCollectionRequest top(final int value) {\n addQueryOption(new com.microsoft.graph.options.QueryOption(\"$top\", value + \"\"));\n return (PrinterCollectionRequest)this;\n }",
"public static List<String> listOfStudentsWhoseScoreBelow(List<MyStudent> l, int score){\n\t List<String> names= l.stream().filter(e->e.getScore()<score).map(e->e.getFirstName()).collect(Collectors.toList());\n\t return names;\n\t }",
"private static List<String> getTopNCompetitors(int numCompetitors,\n int topNCompetitors, \n List<String> competitors,\n int numReviews,\n List<String> reviews) {\n\t\t\n\t\t HashMap<String, Integer> map = new HashMap<>();\n\t\t for(String comp : competitors){\n\t map.put(comp.toLowerCase(),0);\n\t }\n\t\t\n\t for(String sentence : reviews){\n\t String[] words = sentence.split(\" \"); // get all the words in one sentence and put them in a String array \n\t for(String word : words){\n\t if(map.containsKey(word.toLowerCase())) { // check if map has any of the words (competitor name). if yes increase its value\n\t map.put(word.toLowerCase(), map.get(word.toLowerCase()) + 1);\n\t }\n\t }\n\t }\n\t \n\t PriorityQueue<String> pq =new PriorityQueue<>((String i1,String i2)->{ \n\t return map.get(i1)-map.get(i2); \n\t });\n\t for(String key:map.keySet()){\n\t pq.add(key);\n\t if(pq.size()>topNCompetitors) pq.poll();\n\t }\n\t List<String> result=new ArrayList<>();\n\t while(!pq.isEmpty())\n\t result.add(pq.poll());\n\t \n\t Collections.reverse(result);\n\t \n\t return result; \n\t \n}",
"@Override\n\tpublic Student selectStudentById(int stuId) {\n\t\tString sql=\"SELECT * FROM tb_student where stu_id=?\";\n\t\tObject[] stuid={stuId};\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, stuid, Student.class);\n\t\treturn stu.size()>0?stu.get(0):null;\n\t}"
] | [
"0.6264537",
"0.5732596",
"0.5706817",
"0.5367516",
"0.53522676",
"0.53206825",
"0.52792704",
"0.5259719",
"0.5191936",
"0.5190113",
"0.51622665",
"0.5054745",
"0.5015574",
"0.49605986",
"0.49547023",
"0.49522048",
"0.49164492",
"0.49106663",
"0.49065527",
"0.4902191",
"0.4890771",
"0.4851514",
"0.4845229",
"0.48422688",
"0.48350364",
"0.48337033",
"0.47874045",
"0.47761318",
"0.47750607",
"0.477329",
"0.47729614",
"0.47505602",
"0.47309747",
"0.4727512",
"0.47254393",
"0.471992",
"0.47107947",
"0.47050554",
"0.4700956",
"0.4682003",
"0.46770802",
"0.46643886",
"0.4662214",
"0.46479127",
"0.46448535",
"0.4641121",
"0.46408427",
"0.46320784",
"0.46288708",
"0.46215242",
"0.46202293",
"0.46132734",
"0.4589227",
"0.45813254",
"0.45810315",
"0.4575151",
"0.45719177",
"0.45714307",
"0.456828",
"0.45611045",
"0.45565677",
"0.45561478",
"0.45531505",
"0.45488462",
"0.454755",
"0.45463517",
"0.4522401",
"0.45213464",
"0.45199606",
"0.45153534",
"0.45145676",
"0.45106414",
"0.4502139",
"0.45009065",
"0.44982582",
"0.44976488",
"0.44860148",
"0.44860113",
"0.4483425",
"0.44821614",
"0.44797176",
"0.4475805",
"0.44751248",
"0.44736952",
"0.44712192",
"0.446905",
"0.4468236",
"0.44672588",
"0.44660005",
"0.44650534",
"0.4462904",
"0.4460174",
"0.44562575",
"0.44553056",
"0.44544092",
"0.44519764",
"0.44486824",
"0.44467628",
"0.4443843",
"0.44402522"
] | 0.72806305 | 0 |
Returns min score for student to be eligible for scholarship. | static double getMinScoreForScholarship(List<Student> studentsWithScholarship) {
return studentsWithScholarship.stream()
.mapToDouble(Student::getAverageScore)
.min()
.orElseThrow(() -> new RuntimeException("No students eligible for scholarship"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMinScore() {\r\n return minScore;\r\n\t}",
"public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\n }\n else\n {\n for(int i = 0; i < scores.length; i++)\n {\n lowest = scores[0];\n if(scores[i] == null)\n {\n break;\n }\n if(scores[i].getScore() < lowest.getScore())\n {\n lowest = scores[i];\n }\n \n }\n return lowest;\n } \n }",
"public double getLowestGrade(){\n double lowestGrade = 100;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()< lowestGrade)\n lowestGrade = students.get(i).getGrades();\n } // end for\n return lowestGrade;\n }",
"public static Optional<Student> getStudentWithSmallestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(minBy(Comparator.comparing(Student::getGpa)));\n\t}",
"public int bestSubmissionScore(String name) {\n // checks if student exists - stores index in student list if exists\n int exists = this.studentExists(name);\n\n // return -1 if student does not exist\n if (this.studentExists(name) == -1) {\n return -1;\n } else {\n // student exists, so return highest score\n return (studentList.get(exists)).getBestScore();\n }\n }",
"public int getMinimumScore(){\n\n /*\n * creating variable of type int name it lowestScore go in to index 0 and sub 0\n * and lowestScore is refering to instance variable scores\n */\n int lowestScore = scores[0][0]; // assume this value is the smallest score value\n\n /* enhanced for loop with array of type int named gameScores and it will go trough scores array*/\n for (int[] gameScores : scores){\n\n /*\n * and another enhanced for loop inside first for loop\n * int variable, name score and it will iterate(go/repeat) through array gameScores\n *\n */\n for (int score : gameScores){\n if (score < lowestScore){\n lowestScore = score;\n }\n }\n }\n return lowestScore;\n }",
"public Double getMinimal_enroll_scoring() {\n return minimal_enroll_scoring;\n }",
"public Double getLowestMainScore() {\n return lowestMainScore;\n }",
"public double getMinDocScore () {\r\n return minDocScore;\r\n }",
"public int getMinimun(){\n int lowGrade = grades[0]; //assume que grades[0] é a menor nota\n \n //faz um loop pelo array de notas\n for(int grade: grades){\n //se nota for mais baixa que lowGrade, essa note é atribuida a lowGrade\n if(grade < lowGrade){\n lowGrade = grade;\n }\n }\n \n return lowGrade;\n }",
"public int minimum_rating() {\n\t\tint minimumRating = 0;\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tif (minimumRating>identifiedArray[i].rating) {\n\t\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn minimumRating;\n\t}",
"public int getMinRating() {\n return minRating;\n }",
"public int getOpponentMinRating() {\n return getIntegerProperty(\"MinRating\");\n }",
"public int score() {\n ArrayList<Integer> scores = possibleScores();\n int maxUnder = Integer.MIN_VALUE;\n int minOver = Integer.MAX_VALUE;\n for (int score : scores) {\n if (score > 21 && score < minOver) {\n minOver = score;\n } else if (score <= 21 && score > maxUnder) {\n maxUnder = score;\n }\n }\n return maxUnder == Integer.MIN_VALUE ? minOver : maxUnder;\n }",
"public double getMinRating() {\n return min;\n }",
"public int findMinimumStudentCost(Student start, Student dest) {\n initializeSingleSource(start);\n minHeap.buildHeap(students); //build heap from array of studente keyed by minCost\n while (minHeap.size() != 0) { //while heap size does not equal 0.\n Student minimum = minHeap.extractMin();\n if (minimum.getName() == dest.getName()) {\n return minimum.getminCost();\n }\n for (int i = 0; i < minimum.getNeighbors().size(); ++i) { //for each vertex v in m's adjacency list\n relax(minimum, minimum.getNeighbors().get(i), i); //relax\n }\n }\n return -1; //error message\n }",
"public double getStudentGrade() \n {\n Set<String> cc = courses.keySet();\n for (String c: cc) \n {\n if (courses.get(c).getActive() == false) \n {\n return courses.get(c).getGrade(); \n }\n }\n return 0; \n }",
"public double getBestScore();",
"public int minScore(int n, int[][] roads) {\n\n int[] parent = new int[n+1];\n int[] rank = new int[n+1];\n for (int i = 0; i < parent.length; i++) {\n parent[i] = i;\n }\n\n for (int[] road : roads) {\n union(road[0], road[1], parent, rank);\n }\n\n //identify the graph which has both first and last node\n int root = find(1, parent);\n\n //find minimum distance in the graph\n int answer = Integer.MAX_VALUE;\n for (int[] road : roads) {\n if (find(road[0], parent) == root) {\n answer = Math.min(answer, road[2]);\n }\n }\n return answer;\n }",
"public static rk getBestSolutionMin(ArrayList<rk> Sched) {\n\n rk best = Sched.get(0).copyOf();\n for (int i = 1; i < Sched.size(); i++) {\n rk S = Sched.get(i).copyOf();\n if (S.getFitness() < best.getFitness()) {\n\n best = S;\n }\n }\n return best;\n }",
"public java.lang.String getStudent_penalty() {\n\t\treturn _primarySchoolStudent.getStudent_penalty();\n\t}",
"public static double getCourseMinEval(Schedule schedule, double weight) {\n \tdouble result = 0.0;\n \t\n \t// for each lecture slot in schedule\n \tfor (LectureSlot ls : schedule.getLectureSlots()) {\n \t\t\n \t// count how many lecture assignments have that slot\n \t\tint count = 0;\n \tfor (Assignment a : schedule.getAssignments()) {\n \t\t\n \t\t// skip if unassigned or not a lecture\n \t\tif (a.getS() == null || a.getM().getClass() != Lecture.class) \n \t\t\tcontinue;\n \t\t\n \t\t// increment count if slot is equal\n \t\tif (a.getS().equals(ls))\n \t\t\tcount++;\n \t}\n \t\n \t// add penalty for each course less than coursemin\n \t\tif (count < ls.getCourseMin())\n \t\t\tresult += (ls.getCourseMin() - count) * schedule.getCourseMinPenalty();\n \t}\n \t\n \t// return weighted result\n \treturn schedule.getMinWeight()*result;\t\t\n\t}",
"@Override\n public int lowerScore() {\n if (!scoresUpToDate) {\n updateScores();\n }\n return lowerScore;\n }",
"public Staff findLowestEarningLabour() {\n Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){\n lowest = staffList[i];\n }\n }\n }\n return lowest;\n }",
"public int bestSubmissionNumber(String name) {\n // checks if student exists - stores index in student list if exists\n int exists = this.studentExists(name);\n\n // return -1 if student does not exist\n if (this.studentExists(name) == -1) {\n return -1;\n } else {\n // student exists, so return submission number for the highest score\n return (studentList.get(exists)).getBestSubmitNumber();\n }\n }",
"public int getMin() {\r\n // get root\r\n RedBlackTree.Node<Grade> min = rbt.root;\r\n // loop to left of tree\r\n while (min.leftChild != null) {\r\n min = min.leftChild;\r\n }\r\n\r\n return min.data.getGrade();\r\n }",
"private static int min_value(State curr_state) {\n\t\tcounterMinimax++;\r\n\r\n\t\t//Check if the current state is a terminal state, if it is, return\r\n\t\t//its terminal value\r\n\t\tif(curr_state.isTerminal()){\r\n\t\t\treturn curr_state.getScore();\r\n\t\t}\r\n\r\n\t\tint min_value = Integer.MAX_VALUE;\r\n\t\t//Get the successors of the current state, as light always runs second\r\n\t\t//it will call minValue;\r\n\t\tState[] successors = curr_state.getSuccessors('2');\r\n\r\n\t\tif(successors.length == 0 && curr_state.isTerminal() == false){\r\n\t\t\tmin_value = Math.min(min_value, max_value(curr_state));\r\n\t\t}\r\n\r\n\r\n\t\t//Select the successor that returns the smallest(optimal) value\r\n\t\tfor(State state : successors){\r\n\t\t\tmin_value = Math.min(min_value, max_value(state));\r\n\t\t}\r\n\r\n\r\n\t\treturn min_value;\r\n\t}",
"private int removeBestProfessor() {\n if (professors.size() == 1){\n return 2; // MEAN LOSS\n } else {\n if (professors.get(0).getName().equals(DefaultValues.NAME_FIRST_PROF)){\n professors.remove(1);\n } else {\n professors.remove(0);\n }\n return 1;\n }\n }",
"public static int getLowestGrade(int subject_index) {\n //defining the right list of grades\n ArrayList<Grade> list;\n if(subject_index != ALL_SUBJECTS) {\n list = grades.get(subject_index);\n }\n else {\n list = getGradeList();\n }\n\n //getting highest grade of list\n\n int min = 15;\n if(list.size() == 0) {\n if(settings.grades_isRatingInGrades()) {\n return 1;\n }\n else {\n return 0;\n }\n }\n for(Grade grade: list) {\n if(grade.getNumber() < min) {\n min = grade.getNumber();\n }\n }\n return min;\n }",
"public ArrayList<String> compareSchoolsByScore() {\n\t\treturn sfCon.compareSchoolsByScore();\n\t}",
"public void setMinimal_enroll_scoring(Double minimal_enroll_scoring) {\n this.minimal_enroll_scoring = minimal_enroll_scoring;\n }",
"public int getMinimumGrade(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100\");\n }\n \n int minGrade = 100;\n int currentGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n currentGrade = grades[studentId];\n \n if (currentGrade < minGrade) {\n minGrade = currentGrade;\n }\n }\n \n return minGrade;\n }",
"public int score() {\n int sum = 0;\n for (Candidate c : chosen) {\n sum += c.score(compatibilityScoreSet);\n }\n return sum;\n }",
"public int getBestScore() {\n\t\tInteger score = this.hand.countValue().lower(22);\n\t\tif(score!=null) {\n\t\t\treturn score;\n\t\t}\n\t\telse {\n\t\t\treturn this.hand.countValue().higher(21);\n\t\t}\n\t}",
"private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }",
"public static int getMin(int[] scores) {\r\n\t\t\r\n\t\tint temp = 100;\r\n\t\tfor(int i = 0; i < scores.length; ++i) {\r\n\t\t\t\r\n\t\t\tif (scores[i] < temp) {\r\n\t\t\t\ttemp = scores[i];\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn temp;\r\n\t\r\n\t}",
"int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }",
"public int getScore()\n\t{\n\t\tif (containsAce() && score < 11)\n\t\t\treturn score + 10;\n\t\t\t\n\t\treturn score;\n\t}",
"public int getWorstScore()\n {\n return -1;\n }",
"public double minimumDue(){\n return ((this.creditHours*this.feePerCreditHour)-this.scholarshipAmount+((this.healthInsurancePerAnnum*4)/12))/2;\n }",
"public int getLocalSimlarityScore(String s1, String s2) {\r\n\t\tint match = 1;\r\n\t\tint mismatch = -1;\r\n\t\tint gap = -2;\r\n\t\tSmithWaterman algorithm = new SmithWaterman();\r\n\t\tBasicScoringScheme scoring = new BasicScoringScheme(match, mismatch, gap);\r\n\t\talgorithm.setScoringScheme(scoring);\r\n\t\talgorithm.loadSequences(s1, s2);\r\n\t\t\r\n\t\tint score = INT_MAX;\r\n\t\ttry {\r\n\t\t\tscore = algorithm.getScore();\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment().getGappedSequence1());\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment().getGappedSequence2());\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment());\r\n\t\t\t//String tmp = algorithm.getPairwiseAlignment().toString();\r\n\t\t\t//System.out.println(tmp);\r\n\t\t} catch (IncompatibleScoringSchemeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tif (score < 0) {\r\n\t\t\tscore = 0;\r\n\t\t}\r\n\t\treturn score;\r\n\t}",
"Float getScore();",
"public double getScoreForLCS() {\n return scoreForLCS;\n }",
"private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }",
"private static int minimum() {\n\t\tint popSize = 0;\n\t\tChromosome thisChromo = null;\n\t\tChromosome thatChromo = null;\n\t\tint winner = 0;\n\t\tboolean foundNewWinner = false;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\tfoundNewWinner = false;\n\t\t\tpopSize = population.size();\n\t\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\t\tif (i != winner) { // Avoid self-comparison.\n\t\t\t\t\tthisChromo = population.get(i);\n\t\t\t\t\tthatChromo = population.get(winner);\n\t\t\t\t\tif (thisChromo.conflicts() < thatChromo.conflicts()) {\n\t\t\t\t\t\twinner = i;\n\t\t\t\t\t\tfoundNewWinner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (foundNewWinner == false) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn winner;\n\t}",
"public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}",
"public int minimumPenalty() {\n return dp[dp.length-1];\n }",
"public int findLowestExam(int examNum)\n\t{\n\t\tint lowestIndex = 0;\n\t\tif (examNum != 1 && examNum != 2 && examNum != 3 && examNum != 4)\n\t\t\tlowestIndex = -1;\n\t\telse {\n\t\t\tfor (int i = 1; i < numStudents; i++) {\n\t\t\t\tdouble first = students[i].getExams()[examNum - 1];\n\t\t\t\tdouble second = students[lowestIndex].getExams()[examNum - 1];\n\t\t\t\tif (first < second)\n\t\t\t\t\tlowestIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn lowestIndex;\n\t}",
"public int gotExtraCredit() {\n int counter = 0;\n\n // goes through each student and checks if best score is 100\n // and student only has 1 submission\n for (int i = 0; i < studentList.size(); i++) {\n if ((studentList.get(i)).getBestScore() == 100 && (studentList.get(i)).getNumberSubmits() == 1) {\n counter++;\n }\n }\n // return accumulated amount of students\n return counter;\n }",
"public Jogo jogoComMaiorScore() {\r\n\t\tJogo jogoComMaiorScore = listaDeJogosComprados.get(0);\r\n\r\n\t\tfor (Jogo jogo : listaDeJogosComprados) {\r\n\t\t\tif (jogo.getMaiorScore() >= jogoComMaiorScore.getMaiorScore()) {\r\n\t\t\t\tjogoComMaiorScore = jogo;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn jogoComMaiorScore;\r\n\t}",
"public float getSalinityMin() {\n return salinityMin;\n }",
"@Override\n\tpublic long getMinnum() {\n\t\treturn _esfTournament.getMinnum();\n\t}",
"public String getScholarship(){\n\t\t\n\t\treturn this.scholarship;\n\t}",
"public int getScore()\n {\n int score;\n if (this.isFinal())\n score = 1;\n else\n score = 0;\n return score;\n }",
"int getScore();",
"public int totalMinimumScore(ArrayList<Net> nets) {\n int score = 0;\n for(int i = 0; i < nets.size(); i++) {\n\n int gate1X = netDatabase.get(i).gate1.x;\n int gate1Y = netDatabase.get(i).gate1.y;\n\n int gate2X = netDatabase.get(i).gate2.x;\n int gate2Y = netDatabase.get(i).gate2.y;\n\n score += manhattanDistance(gate1X, gate1Y, gate2X, gate2Y, 0, 0);\n }\n return score;\n }",
"int min();",
"public float getMinAvailability()\n\t{\n\t\treturn piecePicker.getMinAvailability();\n\t}",
"public double evalMinFilled(Schedule sched) {\n\t\t\n\t\tdouble totalFailCount = 0;\n\t\ttotalFailCount = this.evalMinCourse(sched) + this.evailMinLabs(sched);\n\t\treturn totalFailCount;\n\t}",
"Float getAutoScore();",
"float getScore();",
"float getScore();",
"public double getScholarshipAmount() {\n return this.scholarshipAmount;\n }",
"int min() {\n return min;\r\n }",
"private int min(int profondeur)\n\t{\n\t\tif(profondeur == 0 || grille.fin())\n\t\t{\n\t\t\treturn eval();\n\t\t}\n\t\tint min_val = 1000;\n\t\tfor(int y = 0; y < grille.getTaille(); y++)\n\t\t{\n\t\t\tfor(int x = 0; x < grille.getTaille(); x++)\n\t\t\t{\n\t\t\t\tCoordonnee test = new Coordonnee(x, y);\n\t\t\t\tif(grille.getCase(test).getContenu() == grille.getCaseVide())\n\t\t\t\t{\n\t\t\t\t\tgrille.jouer(test, '?');\n\t\t\t\t\tint val = max(profondeur-1);\n\t\t\t\t\t//System.out.println(\" = \" + val);\n\t\t\t\t\t//grille.afficher();\n\t\t\t\t\tif(val < min_val)\n\t\t\t\t\t{\n\t\t\t\t\t\tmin_val = val;\n\t\t\t\t\t}\n\t\t\t\t\tannuler(test);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn min_val;\n\t}",
"public static void main(String[] args) {\n try {\n List<Student> students = loadStudentList(new File(INPUT_FILE_NAME));\n List<Student> studentsWithScholarship =\n selectTopNonContractStudents(students, SCHOLARSHIP_PERCENTAGE);\n\n double minScoreForScholarship = getMinScoreForScholarship(studentsWithScholarship);\n\n System.out.printf(\"Min score for scholarship: %f%n\", minScoreForScholarship);\n System.out.printf(\"Students with scholarship (%d total):%n\",\n studentsWithScholarship.size());\n studentsWithScholarship.forEach(System.out::println);\n\n saveStudentsList(studentsWithScholarship, new File(OUTPUT_FILE_NAME));\n } catch (IOException e) {\n System.err.println(\"Failed to read/write file\");\n e.printStackTrace();\n }\n }",
"@Nonnull\n @Override\n public Double getScore(MiniBoard miniBoard) {\n final ImmutableList<Integer> mrXLocationList = ImmutableList.of(miniBoard.getMrXLocation());\n final List<Integer> distanceToSource =\n distanceMeasurer.getDistances(mrXLocationList, miniBoard.getDetectiveLocations()).get(0);\n Collections.sort(distanceToSource);\n List<Double> weightsList = distanceToSource.stream()\n .map(value -> pow(locationScoreExp, -value)/(1 - pow(locationScoreExp, -1)))\n .collect(Collectors.toList());\n final Double weightsListSum = weightsList.stream().reduce(0.0,Double::sum);\n weightsList = weightsList.stream().map(value -> value/weightsListSum).collect(Collectors.toList());\n\n\n double totalScore = 0.0;\n for(int i = 0; i < distanceToSource.size(); i++) {\n final Double unweightedScore = 1 - pow(locationScoreExp, 1 - distanceToSource.get(i));\n totalScore += weightsList.get(i)*unweightedScore;\n }\n return totalScore;\n }",
"int getScoreValue();",
"private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}",
"private int minWeight(int dist[], Boolean sptSet[]){\n int min = Integer.MAX_VALUE;\r\n int minIndex = -1;\r\n\r\n for(int n = 0; n< rideCount; n++){\r\n if(!sptSet[n] && dist[n] <= min) {\r\n min = dist[n];\r\n minIndex = n;\r\n }\r\n }\r\n return minIndex;\r\n }",
"public double getScore() {\n return score - penalty;\n }",
"public static int getExamScore(boolean SAT_Score, String prompt) \n {\n if(SAT_Score)\n {\n System.out.println(\"\\t Enter \" + prompt + \" score between 200 and 800: \");\n int response = console.nextInt();\n if(response>=200 && response <=800)\n {\n return response;\n }\n else\n {\n throw new IllegalArgumentException(\"Value must be between 200 and 800.\");\n }\n }\n else\n {\n System.out.println(\"\\t Enter \" + prompt + \" score between 1 and 36: \");\n int response = console.nextInt();\n if(response>=1 && response <=36)\n {\n return response;\n }\n else\n {\n throw new IllegalArgumentException(\"Value must be between 200 and 800.\");\n }\n }\n }",
"public static State min(State a, State b){\n return a.score <= b.score ? a: b;\n }",
"public int getScore() {\n\t\treturn this.ScoreValue;\n\t}",
"private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }",
"public int getMin()\n\t{\n\t\treturn min;\n\t}",
"public java.lang.Integer getScore () {\r\n\t\treturn score;\r\n\t}",
"public int getScore() {\n return getStat(score);\n }",
"public int getScore() {\n\t\treturn (score);\n\t}",
"public static int getScore()\n\t{\n\t\treturn score;\n\t}",
"public static int findMinimumPointsForGrade(int grade, int maxPoints) {\r\n for (int points = 0; points <= maxPoints; points++) {\r\n if (getGrade(points, maxPoints) >= grade)\r\n return points;\r\n }\r\n \r\n return -1;\r\n }",
"public int getMin(){\n\t\treturn min;\n\t}",
"public int getScore()\n\t{\n\t\treturn this.score;\n\t}",
"public Integer getSafeScore() {\n return safeScore;\n }",
"private int getSimlarityScore(String s1, String s2) {\r\n\t\tint match = 1;\r\n\t\tint mismatch = -1;\r\n\t\tint gap = -2;\r\n\t\tNeedlemanWunsch algorithm = new NeedlemanWunsch();\r\n\t\tBasicScoringScheme scoring = new BasicScoringScheme(match, mismatch, gap);\r\n\t\talgorithm.setScoringScheme(scoring);\r\n\t\talgorithm.loadSequences(s1, s2);\r\n\t\t\r\n\t\tint score = INT_MAX;\r\n\t\ttry {\r\n\t\t\tscore = algorithm.getScore();\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment().getGappedSequence1());\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment().getGappedSequence2());\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment());\r\n\t\t} catch (IncompatibleScoringSchemeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tif (score < 0) {\r\n\t\t\tscore = 0;\r\n\t\t}\r\n\t\treturn score;\r\n\t}",
"public int getScore(){\n\t\treturn this.score;\n\t}",
"public int getScore(){\n\t\treturn this.score;\n\t}",
"public int calculateMin(int[][] board, int proof) {\n int temp;\n int min = _MAX_EVAL;\n\n //Si on est à la profondeur voulue, on retourne l'évaluation\n if (proof == 0 || RuleController.isGameFinished(board)) {\n return evaluatePosition(board);\n }\n\n //On parcourt le plateau de jeu et on le joue si la case est vide\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (RuleController.isMoveLegal(board, row, column)) {\n board[row][column] = opponent.getGridPawnValue();\n temp = calculateMax(board, proof - 1);\n if (temp < min) {\n min = temp;\n }\n RuleController.cancelMove(board, row, column);\n }\n }\n }\n return min;\n }",
"public static int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}",
"public int getMinIntValue();",
"public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}",
"public int getScore() {\r\n \treturn score;\r\n }",
"protected final int getMin() {\n\treturn(this.min);\n }",
"public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}",
"public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}",
"public boolean hasEnoughStudents() {\n if (this.students.size() >= minStudents) {\n return true;\n } else return false;\n }",
"public int score()\n {\n if (this.score != Integer.MIN_VALUE)\n return this.score;\n\n this.score = 0;\n if (!this.safe)\n return 0;\n\n // End game bonus\n int bonus = this.d.size() * Math.max(0, (this.L - 3 * this.b.shots)) * 3;\n this.score = (this.d.size() * 100) + ((this.NE - this.e.size()) * 10) + (this.e.size() == 0 ? bonus : 0);\n\n // value:\n return this.score;\n }",
"public void setMinRating(int minRating) {\n this.minRating = minRating;\n }",
"public static MyStudent studentWithHighest ( List<MyStudent> list) {\n\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-1).findFirst().get();\n\t}",
"public static int getScore()\n {\n return score;\n }"
] | [
"0.68675333",
"0.67281973",
"0.65287125",
"0.6370942",
"0.6342272",
"0.63057977",
"0.6198123",
"0.61707264",
"0.61186886",
"0.60729",
"0.6029748",
"0.6006297",
"0.5929599",
"0.5897073",
"0.58766115",
"0.58592224",
"0.58050793",
"0.5783224",
"0.5779675",
"0.5758092",
"0.575809",
"0.5754379",
"0.57501835",
"0.5735015",
"0.5700642",
"0.56832707",
"0.5678298",
"0.56653285",
"0.5661233",
"0.56352526",
"0.56333065",
"0.5597362",
"0.55884105",
"0.5561191",
"0.5560268",
"0.5539537",
"0.5531177",
"0.5510478",
"0.54918647",
"0.5478231",
"0.5424603",
"0.5418582",
"0.5412801",
"0.53979754",
"0.5382643",
"0.53795534",
"0.53790593",
"0.53714925",
"0.53521013",
"0.53514105",
"0.5350899",
"0.5338333",
"0.5337691",
"0.5312948",
"0.5307305",
"0.5306252",
"0.53051674",
"0.530129",
"0.52948004",
"0.52912134",
"0.5285366",
"0.5285366",
"0.5282632",
"0.5277119",
"0.5272607",
"0.52675086",
"0.52615833",
"0.52495587",
"0.5247638",
"0.5242819",
"0.52414626",
"0.52270705",
"0.5226935",
"0.52265364",
"0.5220733",
"0.5219279",
"0.5218528",
"0.52142",
"0.520945",
"0.52023137",
"0.52021796",
"0.52015215",
"0.5201316",
"0.5189666",
"0.5188264",
"0.518732",
"0.518732",
"0.51839095",
"0.5177491",
"0.5172072",
"0.5171301",
"0.51665866",
"0.5162427",
"0.5160099",
"0.5160099",
"0.515409",
"0.5153586",
"0.51516217",
"0.5149278",
"0.51468337"
] | 0.8341573 | 0 |
Creates new form ChatFrame | public ChatFrame() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createGUI() {\r\n\t\t// Create the frame for client window.\r\n\t\tJFrame frame = new JFrame(\"Client\");\r\n\t\t/*\r\n\t\t * Set the layout as null as using setbounds to set complonents set size\r\n\t\t * and close the frame when clicked on exit\r\n\t\t */\r\n\t\tframe.setLayout(null);\r\n\t\t// exit chat rrom system if clicks on close icon\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tJLabel userlabel = new JLabel(\"Enter Username\");// label for username\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// input\r\n\t\tJLabel inputlabel = new JLabel(\"Enter Message\");// label for message\r\n\t\t/*\r\n\t\t * Create the buttons Send button to send messegs connect to connect to\r\n\t\t * chat room disconnect to logout from the chat room\r\n\t\t */\r\n\t\tJButton send = new JButton(\"Send\");\r\n\t\tJButton connect = new JButton(\"Connect\");\r\n\t\tJButton disconnect = new JButton(\"Disconnect\");\r\n\t\t// usertext is to input username from user and inputfield is to input\r\n\t\t// messages\r\n\t\tJTextField usertext = new JTextField();\r\n\t\t// set textfield as editable\r\n\t\tusertext.setEditable(true);\r\n\t\tJTextField inputfield = new JTextField();\r\n\t\t// set textfield as editable\r\n\t\tinputfield.setEditable(true);\r\n\t\tuserlabel.setBounds(10, 40, 100, 20);\r\n\t\tusertext.setBounds(120, 40, 120, 30);\r\n\t\tinputlabel.setBounds(10, 70, 150, 20);\r\n\t\tinputfield.setBounds(120, 70, 120, 30);\r\n\t\ttextarea.setBounds(10, 110, 500, 300);\r\n\t\t// https://www.youtube.com/watch?v=Uo5DY546rKY\r\n\t\tsend.setBounds(10, 430, 150, 30);\r\n\t\tconnect.setBounds(180, 430, 150, 30);\r\n\t\tdisconnect.setBounds(350, 430, 150, 30);\r\n\t\t// provide scrolling capability to textarea\r\n\t\tJScrollPane scrollPane = new JScrollPane(textarea);\r\n\t\t// set textarea as not editable\r\n\t\ttextarea.setEditable(false);\r\n\t\t// Create textfield to write message\r\n\t\t// http://cs.lmu.edu/~ray/notes/javanetexamples/\r\n\t\t// exit on close\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// put created components in the frame.\r\n\t\tframe.add(userlabel);// add userlabel to the frame\r\n\t\tframe.add(usertext);// add usertext to the frame\r\n\t\tframe.add(inputlabel);// add inputlabel to the frame\r\n\t\tframe.add(inputfield);// add inputfield to the frame\r\n\t\tframe.add(textarea);// add textarea to the frame\r\n\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tframe.add(send);// add send button to the frame\r\n\t\tframe.add(connect);// add connect button to the frame\r\n\t\tframe.add(disconnect);// add disconnect button to the frame\r\n\t\t/*\r\n\t\t * add listeners set action to start button\r\n\t\t * https://docs.oracle.com/javase/tutorial/uiswing/components/button.\r\n\t\t * html#abstractbutton When user clicks on send button after adding\r\n\t\t * message then client converts that message to HTTP format\r\n\t\t */\r\n\t\tsend.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * user-agent displays name of the browsers,this list shows\r\n\t\t\t\t\t * this application is independent of a browser. display the\r\n\t\t\t\t\t * host name in this case host is \"localhost\"\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString useragent = \" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36\";\r\n\t\t\t\t\tString host = \" Host:\" + socket.getInetAddress().getHostName();// get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// host\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// name\r\n\r\n\t\t\t\t\t/* get length of the original messsage */\r\n\t\t\t\t\tString ContentLength = \" Content-length:\" + inputfield.getText().length();\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * htm as this is simple chat room system,independent of the\r\n\t\t\t\t\t * browser the content type is text/plain\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString contentType = \" Conent-Type:text/plain\";\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * To print current date in the HTTP date format explicitly\r\n\t\t\t\t\t * adding the time zone to the formatter\r\n\t\t\t\t\t */\r\n\t\t\t\t\tInstant i = Instant.now();\r\n\t\t\t\t\tString dateFormatted = DateTimeFormatter.RFC_1123_DATE_TIME.withZone(ZoneOffset.UTC).format(i);\r\n\t\t\t\t\tString currentDate = \"Date:\" + dateFormatted;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * To get time difference between to messages and converting\r\n\t\t\t\t\t * it to the string format\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString time2 = dispTime.format(System.currentTimeMillis());\r\n\t\t\t\t\tdate2 = dispTime.parse(time2);\r\n\t\t\t\t\t// get difference between previous message and recent\r\n\t\t\t\t\t// message\r\n\t\t\t\t\tdifference = date2.getTime() - date1.getTime();\r\n\t\t\t\t\tint min = (int) ((difference / (1000 * 60)) % 60);// calculate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// minute\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// difference\r\n\t\t\t\t\tint sec = (int) ((difference / 1000) % 60);//// calculate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//// seconds\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//// difference\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * the format of the time is two digit numbers so concevert\r\n\t\t\t\t\t * minutes and seconds to 2 digits\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString m = String.format(\"%02d\", min);\r\n\t\t\t\t\tString s = String.format(\"%02d\", sec);\r\n\t\t\t\t\tString time = \"(\" + m + \".\" + s + \") - \";\r\n\t\t\t\t\t// minutes and seconds\r\n\t\t\t\t\tdate1 = date2;\r\n\t\t\t\t\t// append useragent,host,ContentLength,contentType to a\r\n\t\t\t\t\tString httpmsg = useragent + host + ContentLength + contentType + currentDate;\r\n\t\t\t\t\t// append timedifference to the username\r\n\t\t\t\t\tString timetrack = username + time;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * append all the strings\r\n\t\t\t\t\t * useragent,host,ContentLength,contentType, timedifference\r\n\t\t\t\t\t * to the username for HTTP format in the main message\r\n\t\t\t\t\t * entered server reads this whole message\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString wholeMsg = \"POST:\" + timetrack + \":\" + inputfield.getText() + \":\" + httpmsg + \":Chat\";\r\n\t\t\t\t\tout.println(wholeMsg);// send whole message in HTTP format\r\n\t\t\t\t\t\t\t\t\t\t\t// to output stream\r\n\t\t\t\t\tout.flush(); // flushes the buffer\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * After sending message to output stream clear the textfield\r\n\t\t\t\t * and set focus to inputfield to take messages input\r\n\t\t\t\t */\r\n\t\t\t\tinputfield.setText(\"\");\r\n\t\t\t\tinputfield.requestFocus();\r\n\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\t/*\r\n\t\t * add listner to connect button after entering username if user clicks\r\n\t\t * on connect button then it checks if the username is valid(ie.only\r\n\t\t * charachters) then its creates a new thread with setting username in\r\n\t\t * title\r\n\t\t */\r\n\t\tconnect.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\t\t\t\tif (isConnected == false) {\r\n\t\t\t\t\t// take username\r\n\t\t\t\t\tusername = usertext.getText();\r\n\r\n\t\t\t\t\t// check if the user name is valid that is contains only\r\n\t\t\t\t\t// letters\r\n\t\t\t\t\tif (username.matches(\"[a-zA-Z]*\")) {\r\n\t\t\t\t\t\tusertext.setEditable(false);\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// server is at localhost and port 7879 so use same\r\n\t\t\t\t\t\t\t// port number here\r\n\t\t\t\t\t\t\tsocket = new Socket(\"localhost\", 7879);\r\n\t\t\t\t\t\t\t// create inputstream and outputstream\r\n\t\t\t\t\t\t\tInputStreamReader streamreader = new InputStreamReader(socket.getInputStream());\r\n\t\t\t\t\t\t\tin = new BufferedReader(streamreader);\r\n\t\t\t\t\t\t\tout = new PrintWriter(socket.getOutputStream());\r\n\t\t\t\t\t\t\tout.println(\"POST:\" + username + \":(00.00) has connected.:Connect\");\r\n\t\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\t\tisConnected = true; // connection is established so\r\n\t\t\t\t\t\t\t\t\t\t\t\t// this value is true\r\n\t\t\t\t\t\t\tconnect.setEnabled(false);// disable the connect\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// button\r\n\t\t\t\t\t\t\tframe.setTitle(\"Thread \" + username);\r\n\t\t\t\t\t\t} // try\r\n\t\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// create and start a new thread\r\n\t\t\t\t\t\tThread thread = new Thread(new ListenServer());\r\n\t\t\t\t\t\tthread.start();\r\n\t\t\t\t\t} // if\r\n\t\t\t\t\t\t// if user enters invalid username then give message to\r\n\t\t\t\t\t\t// enter valid user name\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttextarea.append(\"Username is not valid.\");\r\n\t\t\t\t\t\ttextarea.append(\"\\nPlease enter only Charachters.\");\r\n\t\t\t\t\t\ttextarea.append(\"\");\r\n\r\n\t\t\t\t\t} // else\r\n\r\n\t\t\t\t} // if\r\n\t\t\t}\r\n\t\t});\r\n\t\t/*\r\n\t\t * add listner to disconnect button this button logs off the user from\r\n\t\t * chat room\r\n\t\t */\r\n\t\tdisconnect.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\t\t\t\tString dc = (\"POST:\" + username + \": has disconnected.:Disconnect\");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * set output stream disable disconnect and send buttons\r\n\t\t\t\t\t */\r\n\t\t\t\t\tout.println(dc);\r\n\t\t\t\t\tout.flush();\r\n\t\t\t\t\tdisconnect.setEnabled(false);\r\n\t\t\t\t\tsend.setEnabled(false);\r\n\t\t\t\t\t// socket.close();\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tisConnected = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t// setting frame as visible\r\n\t\tframe.setVisible(true);\r\n\t\tframe.setSize(520, 500);\r\n\t\tframe.setResizable(false);\r\n\r\n\t}",
"private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }",
"public NewRoomFrame() {\n initComponents();\n }",
"Frame createFrame();",
"public NewConnectionFrame() {\n initComponents();\n }",
"private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setLocationRelativeTo(frame);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(Color.LIGHT_GRAY);\r\n\t\tpanel.setBounds(10, 11, 414, 239);\r\n\t\tframe.getContentPane().add(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\t/**\r\n\t\t * Name Label\r\n\t\t */\r\n\t\tJLabel lblNewLabel = new JLabel(\"Name:\");\r\n\t\tlblNewLabel.setForeground(SystemColor.window);\r\n\t\tlblNewLabel.setFont(new Font(\"Malgun Gothic\", Font.PLAIN, 16));\r\n\t\tlblNewLabel.setBounds(20, 69, 63, 14);\r\n\t\tpanel.add(lblNewLabel);\r\n\t\t\r\n\t\t/**\r\n\t\t * Email Label\r\n\t\t */\r\n\t\tJLabel lblEmail = new JLabel(\"Email:\");\r\n\t\tlblEmail.setForeground(SystemColor.window);\r\n\t\tlblEmail.setFont(new Font(\"Malgun Gothic\", Font.PLAIN, 16));\r\n\t\tlblEmail.setBounds(20, 122, 63, 14);\r\n\t\tpanel.add(lblEmail);\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setBounds(83, 69, 263, 20);\r\n\t\tpanel.add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBounds(83, 122, 263, 20);\r\n\t\tpanel.add(textField_1);\r\n\t\t\r\n\t\t/**\r\n\t\t * SUBMIT BUTTON\r\n\t\t */\r\n\t\tJButton btnNewButton = new JButton(\"Submit\");\r\n\t\tbtnNewButton.setBounds(49, 178, 89, 23);\r\n\t\tpanel.add(btnNewButton);\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\tString email = textField_1.getText(); \r\n\t\t\t\tString name = textField.getText();\r\n\t\t\t\t\r\n\t\t\t\tif(email.contains(\"email\") || name.contains(\"name\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog( btnNewButton, \"Added User To Chat\");\r\n\t\t\t\t\r\n\t\t\t\t\tJButton chat = new JButton( name.substring(0,1));\r\n\t\t\t\t\tchat.setBackground(Color.LIGHT_GRAY);\r\n\t\t\t\t\tchat.setFont(new Font(\"Malgun Gothic\", Font.PLAIN, 12));\r\n\t\t\t\t\tchat.setBounds(0, 0, 70, 60); //initialize in corner with size\r\n\t\t\t\t\tchat.setLocation(15,35+(80*mw.getNumUsers()) + userBufferSpacing); //move to position\r\n\t\t\t\t\t\r\n\t\t\t\t\tchat.addActionListener(new ActionListener() {\r\n\t\t\t\t\t public void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t \tChat nw = new Chat();\r\n\t\t\t\t\t\t\tnw.frame.setVisible(true);\r\n\t\t\t\t\t } \r\n\t\t\t\t\t});\r\n\t\t\t\t\tframe.dispose();\r\n\t\t\t\t\tmw.frame.getContentPane().add(chat);\r\n\t\t\t\t\tmw.incUsers();\r\n\t\t\t\t\tmw.frame.setVisible(true);\t\r\n\t\t\t }\r\n\t\t\t\telse {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid User Details\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\ttextField_1.setText(null);\r\n\t\t\t\t\ttextField.setText(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t/**\r\n\t\t * Add User to Group Label\r\n\t\t */\r\n\t\tJLabel lblAddUserTo = new JLabel(\"Add User to Group\");\r\n\t\tlblAddUserTo.setForeground(SystemColor.infoText);\r\n\t\tlblAddUserTo.setFont(new Font(\"Malgun Gothic\", Font.PLAIN, 17));\r\n\t\tlblAddUserTo.setBounds(126, 11, 162, 33);\r\n\t\tpanel.add(lblAddUserTo);\r\n\t\t\r\n\t\t/**\r\n\t\t * CANCEL BUTTON\r\n\t\t */\r\n\t\tJButton btnCancel = new JButton(\"Cancel\");\r\n\t\tbtnCancel.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCancel.setBounds(247, 178, 89, 23);\r\n\t\tpanel.add(btnCancel);\r\n\t}",
"public RoomManagementPanel(ChatView chatView, ChatController chatController, JFrame frame) {\n this.chatView = chatView;\n this.chatController = chatController;\n\n createComponents();\n }",
"public NewFrame() {\n initComponents();\n }",
"public NewJFrame() {\n Connect();\n initComponents();\n }",
"private void buildGUI() {\n ActionListener sendListener = new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n String str = jTextField1.getText();\n if (str != null && str.trim().length() > 0)\n chatAccess.send(str);\n jTextField1.selectAll();\n jTextField1.requestFocus();\n jTextField1.setText(\"\");\n }\n };\n jTextField1.addActionListener(sendListener);\n jButton1.addActionListener(sendListener);\n\n this.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n chatAccess.close();\n }\n });\n }",
"public ChatWindow()\n {\n if (!ConfigurationUtils.isWindowDecorated())\n this.setUndecorated(true);\n\n this.addWindowFocusListener(this);\n\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n\n //If in mode TABBED_CHAT_WINDOW initialize the tabbed pane\n if(ConfigurationUtils.isMultiChatWindowEnabled())\n chatTabbedPane = new ConversationTabbedPane();\n\n menuBar = new MessageWindowMenuBar(this);\n\n contactPhotoPanel = new ContactPhotoPanel();\n\n this.setJMenuBar(menuBar);\n\n toolbarPanel = createToolBar();\n\n this.getContentPane().add(toolbarPanel, BorderLayout.NORTH);\n this.getContentPane().add(mainPanel, BorderLayout.CENTER);\n this.getContentPane().add(statusBarPanel, BorderLayout.SOUTH);\n\n this.initPluginComponents();\n\n this.setKeybindingInput(KeybindingSet.Category.CHAT);\n this.addKeybindingAction( \"chat-nextTab\",\n new ForwardTabAction());\n this.addKeybindingAction( \"chat-previousTab\",\n new BackwordTabAction());\n this.addKeybindingAction( \"chat-copy\",\n new CopyAction());\n this.addKeybindingAction( \"chat-paste\",\n new PasteAction());\n this.addKeybindingAction( \"chat-openSmileys\",\n new OpenSmileyAction());\n this.addKeybindingAction( \"chat-openHistory\",\n new OpenHistoryAction());\n this.addKeybindingAction( \"chat-close\",\n new CloseAction());\n\n this.addWindowListener(new ChatWindowAdapter());\n\n int width = GuiActivator.getResources()\n .getSettingsInt(\"impl.gui.CHAT_WINDOW_WIDTH\");\n int height = GuiActivator.getResources()\n .getSettingsInt(\"impl.gui.CHAT_WINDOW_HEIGHT\");\n\n this.setSize(width, height);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n textLabelTitle = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n textFieldInputChat = new javax.swing.JTextField();\n buttonSendChat = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextchat = new javax.swing.JTextPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n textLabelTitle.setFont(new java.awt.Font(\"Segoe UI\", 1, 14)); // NOI18N\n textLabelTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n textLabelTitle.setText(\"Chat Bot\");\n\n buttonSendChat.setText(\"Send\");\n buttonSendChat.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonSendChatActionPerformed(evt);\n }\n });\n\n jTextchat.setEditable(false);\n jScrollPane1.setViewportView(jTextchat);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(textLabelTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(textFieldInputChat, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buttonSendChat))\n .addComponent(jScrollPane1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 1, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(textLabelTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(textFieldInputChat)\n .addComponent(buttonSendChat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n pack();\n }",
"public static void setupGUI() {\n\t\t\n\t\t//My GUI Frame\n\t\tJFrame GUIframe = new JFrame(\"ChatBot Conversation GUI\");\n\t\tGUIframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tGUIframe.setSize(800,400);\n\t\t\n\t\t//GUI Panel Setup\n\t\tJPanel panel1 = new JPanel();\n\t\tJButton enter = new JButton(\"Enter\");\n\t\t\n\t\t//Listener for the Submit button\n\t\tenter.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString newUserInput = (myTextField.getText()).trim();\n\t\t\t\t\n\t\t\t\tif(newUserInput.length()>=1){\n\t\t\t\t\tagent.execute(conversation, newUserInput);\n\t\t\t\t\tmyTextField.setText(\"\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t//Listener to enable users to press Enter into the textfield\n\t\tmyTextField.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString newUserInput = (myTextField.getText()).trim();\n\t\t\t\t\n\t\t\t\tif(newUserInput.length()>=1){\n\t\t\t\t\tagent.execute(conversation, newUserInput);\n\t\t\t\t\tmyTextField.setText(\"\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tpanel1.add(myTextField);\n\t\tpanel1.add(enter);\n\t\t\n\t\t//JTextArea chat = new JTextArea();\n\t\tchat.setEditable(false);\n\t\tJScrollPane letsScroll = new JScrollPane(chat);\n\t\t\n\t\tGUIframe.getContentPane().add(BorderLayout.SOUTH, panel1);\n\t\t//GUIframe.getContentPane().add(BorderLayout.CENTER, chat);\n\t\tGUIframe.getContentPane().add(BorderLayout.CENTER, letsScroll);\n\t\tGUIframe.setVisible(true);\t\n\n\t\t\n\t}",
"public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }",
"public NewJFrame() {\n initComponents();\n \n }",
"public NewJFrame() {\r\n initComponents();\r\n }",
"private void initGUI() {\n\t JPanel optionsPane = initOptionsPane();\n\n\t // Set up the chat pane\n\t JPanel chatPane = new JPanel(new BorderLayout());\n\t chatText = new JTextPane();\n\t chatText.setEditable(false);\n\t chatText.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY));\n\t chatText.setMargin(new Insets(5, 5, 5, 5));\n\t JScrollPane jsp = new JScrollPane(chatText);\n\t \n\t chatLine = new JTextField();\n\t chatLine.setEnabled(false);\n\t chatLine.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t String s = chatLine.getText();\n\t chatLine.setText(\"\");\n\t MessageColor c = (MessageColor)colorCombo.getSelectedItem();\n\t support.firePropertyChange(\"UI\", \"message\", new Message(username, MessageType.MESSAGE, c, s));\n\t }\n\t });\n\t chatPane.add(chatLine, BorderLayout.SOUTH);\n\t chatPane.add(jsp, BorderLayout.CENTER);\n\n\t colorCombo = new JComboBox<MessageColor>(MessageColor.values());\n\t chatPane.add(colorCombo, BorderLayout.NORTH);\n\t \n\t chatPane.setPreferredSize(new Dimension(500, 200));\n\n\t // Set up the main pane\n\t JPanel mainPane = new JPanel(new BorderLayout());\n\t mainPane.add(optionsPane, BorderLayout.WEST);\n\t mainPane.add(chatPane, BorderLayout.CENTER);\n\n\t // Set up the main frame\n\t mainFrame = new JFrame(\"SPL Chat\");\n\t mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t mainFrame.setContentPane(mainPane);\n\t mainFrame.setSize(mainFrame.getPreferredSize());\n\t mainFrame.setLocation(200, 200);\n\t mainFrame.pack();\n\t mainFrame.setVisible(true);\n\t }",
"public void init() {\r\n window = new Frame(title);\r\n window.setLayout(new BorderLayout());\r\n chat = new TextArea();\r\n chat.setEditable(false);\r\n chat.setFont(new Font(police, Font.PLAIN, size));\r\n message = \"Chat room opened !\";\r\n window.add(BorderLayout.NORTH, chat);\r\n pan.add(logInButton = new Button(\"Enter\"));\r\n logInButton.setEnabled(true);\r\n logInButton.requestFocus();\r\n logInButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n login();\r\n logInButton.setEnabled(false);\r\n logOutButton.setEnabled(true);\r\n myText.requestFocus();\r\n }\r\n });\r\n pan.add(logOutButton = new Button(\"Exit\"));\r\n logOutButton.setEnabled(false);\r\n logOutButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n logout();\r\n logInButton.setEnabled(true);\r\n logOutButton.setEnabled(false);\r\n logInButton.requestFocus();\r\n }\r\n });\r\n pan.add(new Label(\"Your message:\"));\r\n myText = new TextField(myTextDimension);\r\n myText.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n if (connected) {\r\n writer.println(myText.getText());\r\n myText.setText(\"\");\r\n }\r\n }\r\n });\r\n pan.add(myText);\r\n window.add(BorderLayout.SOUTH, pan);\r\n window.addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n ForumClient.this.window.setVisible(false);\r\n ForumClient.this.window.dispose();\r\n logout();\r\n }\r\n });\r\n window.pack();\t\t\t\t\t\t\t\t\t// Causes window to be sized to fit\r\n // the preferred size and layouts of its subcomponents\r\n\r\n // Let's place the chatting framework at the center of the screen\r\n screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n frameSize = window.getSize();\r\n int X = (screenSize.width - frameSize.width) / 2;\r\n int Y = (screenSize.height - frameSize.height) / 2;\r\n window.setLocation(X, Y);\r\n\r\n window.setVisible(true);\r\n repaint();\r\n }",
"public MembershipFrame() {\n initComponents();\n }",
"FRAME createFRAME();",
"public Chat getChatFrame() {\r\n return chatFrame;\r\n }",
"private void initialize() {\n\t\tFrame = new JFrame();\n\t\tFrame.setTitle(\"Chatter Box\");\n\t\tFrame.setBounds(100, 100, 550, 290);\n\t\tFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tFrame.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\t\n\t\t\n\t\ttextArea.setEditable(false);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane(textArea);\n\t\tFrame.getContentPane().add(scrollPane);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.GRAY);\n\t\tFrame.getContentPane().add(panel, BorderLayout.SOUTH);\n\t\tpanel.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));\n\t\t\n\t\tmessageField = new JTextField();\n\t\tpanel.add(messageField);\n\t\tmessageField.setColumns(30);\n\t\t\n\t\tJButton btnSend = new JButton(\"Send\");\n\t\t\n\t\tbtnSend.addActionListener(e -> {\n\t\t\tif (!messageField.getText().equals(\"\")) {\n\t\t\t\tclient.send(messageField.getText());\n\t\t\t\tmessageField.setText(\"\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tpanel.add(btnSend);\n\t\t\n\t\t\n\t\tFrame.setLocationRelativeTo(null);\n\t\t\n\t}",
"public ChatRec(User receiver, User sender, String msg,boolean fol) {\n\t\tsetType(Type.UTILITY);\n\t\tsetTitle(\"NEW MESSAGE\");\n\t\tsetBounds(100, 100, 452, 369);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\n\t\ttextField = new JTextField();\n\t\ttextField.setForeground(UIManager.getColor(\"MenuBar.highlight\"));\n\t\ttextField.setEditable(false);\n\t\ttextField.setFont(new Font(\"Noto Sans CJK JP Black\", Font.BOLD, 16));\n\t\ttextField.setBackground(UIManager.getColor(\"OptionPane.questionDialog.border.background\"));\n\t\ttextField.setText(\" \" + sender.getName() + \" \" + sender.getSurname() + \" \");\n\t\ttextField.setBounds(53, 22, 329, 39);\n\t\tcontentPane.add(textField);\n\t\ttextField.setColumns(10);\n\n\t\tJRadioButton lastBtn = new JRadioButton(\"Finish Chat\");\n\t\tlastBtn.setBounds(295, 261, 127, 24);\n\t\tcontentPane.add(lastBtn);\n\t\t\n\t\tJEditorPane textarea = new JEditorPane();\n\t\ttextarea.setFont(new Font(\"Noto Sans CJK SC Bold\", Font.PLAIN, 14));\n\t\tJButton btnSend = new JButton(\"REPLY\");\n btnSend.setEnabled(false);\n\t\t\n\t\ttextarea.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tbtnSend.setText(\"SEND\");\n\t\t\t\tbtnSend.setEnabled(true);\n\t\t\t\ttextarea.setText(\"\");\n\t\t\t\ttextarea.setEditable(true);\n\t\t\t\tFile bmp=new File(receiver.getInbox()+\"/\"+sender.getUsername()+\".bmp\");\n\t\t\t bmp.delete();\n\t\t\t\tFile msg=new File(receiver.getInbox()+\"/\"+sender.getUsername()+\".msg\");\n\t\t\t\tmsg.delete();\n\t\t\t\tFile kgn=new File(receiver.getInbox()+\"/\"+sender.getUsername()+\".kgn\");\n\t\t\t\tkgn.delete();\n\t\t\t\tFile sign1=new File(receiver.getInbox()+\"/\"+sender.getUsername()+\".ksgn\");\n\t\t\t\tsign1.delete();\n\t\t\t\tFile sign2=new File(receiver.getInbox()+\"/\"+sender.getUsername()+\".msgn\");\n\t\t\t\tsign2.delete();\n\t\t\t}\n\t\t});\n\t\ttextarea.setBounds(53, 70, 329, 178);\n\t\tcontentPane.add(textarea);\n\t\ttextarea.setText(msg);\n\t\ttextarea.setEditable(false);\n\n\t\tif(fol==true)\n\t\t{\n\t\t\tbtnSend.setEnabled(false);\n\t\t\ttextarea.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\ttextarea.setText(\"Last message...\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tdispose();\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\tbtnSend.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString msgToReply = textarea.getText();\n\t\t\t\tif(lastBtn.isSelected())\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\treceiver.sendSteganographyMessage(\"LAST MESSAGE\\n\"+msgToReply, sender,true);\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\ttry {\n\t\t\t\t\treceiver.sendMessage(msgToReply, sender);\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tbtnSend.setBounds(166, 260, 102, 26);\n\t\tcontentPane.add(btnSend);\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJPanel chatInfoSec = new JPanel();\n\t\tchatInfoSec.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(0, 0, 0), null),\n\t\t\t\t\"CHAT INFO \", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tchatInfoSec.setBounds(20, 23, 347, 100);\n\t\tframe.getContentPane().add(chatInfoSec);\n\t\tchatInfoSec.setLayout(null);\n\n\t\tJLabel ipLabel = new JLabel(\"IP\");\n\t\tipLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tipLabel.setBounds(39, 30, 32, 15);\n\t\tchatInfoSec.add(ipLabel);\n\n\t\tipText = new JTextField();\n\t\tipText.setBounds(114, 26, 179, 21);\n\t\tipText.setBorder(null);\n\t\tchatInfoSec.add(ipText);\n\n\t\tJLabel portLabel = new JLabel(\"Port\");\n\t\tportLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tportLabel.setBounds(39, 65, 32, 15);\n\t\tchatInfoSec.add(portLabel);\n\n\t\tportText = new JTextField();\n\t\tportText.setBounds(114, 61, 179, 21);\n\t\tportText.setBorder(null);\n\t\tchatInfoSec.add(portText);\n\n\t\tRoundedButton1 inBtn = new RoundedButton1(\"IN\");\n\t\tinBtn.setBounds(398, 30, 75, 90);\n\t\tRoundedButton1 outBtn = new RoundedButton1(\"OUT\");\n\t\toutBtn.setBounds(505, 30, 75, 90);\n\t\tframe.getContentPane().add(inBtn);\n\t\tframe.getContentPane().add(outBtn);\n\n\t\tinBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tClientThread clientThread = new ClientThread();\n\t\t\t\tclientThread.setDaemon(true);\n\t\t\t\tclientThread.start();\n\t\t\t}\n\t\t});\n\t\toutBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tif(socket != null) {\n\t\t\t\t\t\tsocket.close();\n\t\t\t\t\t}else {\n\t\t\t\t\t\tchatSec.append(\"채팅방에 접속을 하지 않았습니다\\n\");\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\t}\n\t\t});\n\n\t\tJPanel mySec = new JPanel();\n\t\tmySec.setLayout(null);\n\t\tmySec.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(0, 0, 0), null), \" MY \",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tmySec.setBounds(20, 133, 563, 100);\n\t\tframe.getContentPane().add(mySec);\n\n\t\tJLabel myIpLabel = new JLabel(\"IP\");\n\t\tmyIpLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tmyIpLabel.setBounds(39, 30, 32, 15);\n\t\tmySec.add(myIpLabel);\n\n\t\tJTextField myIpText = new JTextField();\n\t\tmyIpText.setBackground(UIManager.getColor(\"Button.background\"));\n\t\tmyIpText.setEditable(false);\n\t\tmyIpText.setBounds(114, 26, 437, 21);\n\t\tmyIpText.setBorder(new LineBorder(Color.LIGHT_GRAY));\n\t\tmyIpText.setText(common.myIp());\n\t\tmySec.add(myIpText);\n\n\t\tJLabel nameLabel = new JLabel(\"Name\");\n\t\tnameLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tnameLabel.setBounds(39, 65, 47, 15);\n\t\tmySec.add(nameLabel);\n\n\t\tnameText = new JTextField();\n\t\tnameText.setBounds(114, 61, 323, 21);\n\t\tnameText.setBorder(null);\n\t\tnameText.setText(myName);\n\t\tmySec.add(nameText);\n\n\t\tRoundedButton2 changeBtn = new RoundedButton2(\"CHANGE\");\n\t\tchangeBtn.setBounds(463, 60, 88, 23);\n\t\tmySec.add(changeBtn);\n\t\tchangeBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangeName(myName);\n\t\t\t}\n\t\t});\n\n\t\tchatSec = new JTextArea();\n\t\tchatSec.setEditable(false);\n\t\tJScrollPane scrollPane = new JScrollPane(chatSec);\n\t\tscrollPane.setBounds(22, 255, 560, 235);\n\t\tframe.getContentPane().add(scrollPane);\n\n\t\tchatText = new JTextField();\n\t\tchatText.setBounds(22, 500, 458, 21);\n\t\tchatText.setBorder(null);\n\t\tchatText.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tsuper.keyPressed(e);\n\n\t\t\t\t// 입력받은 키가 엔터인지\n\t\t\t\tint keyCode = e.getKeyCode();\n\t\t\t\tswitch (keyCode) {\t\n\t\t\t\t\tcase KeyEvent.VK_ENTER:\n\t\t\t\t\t\tsendMessage();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(chatText);\n\n\t\twindowbuilder.RoundedButton2 sendBtn = new windowbuilder.RoundedButton2(\"SEND\");\n\t\tsendBtn.setBounds(492, 499, 88, 23);\n\t\tframe.getContentPane().add(sendBtn);\n\t\tsendBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsendMessage();\n\t\t\t}\n\t\t});\n\n\t\tframe.setTitle(\"\\uCC44\\uD305\\uCC38\\uC5EC\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setBackground(Color.WHITE);\n\t\tframe.setBounds(720, 120, 609, 573);\n\t}",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"private MessagesDialog(Frame owner)\n\t{\n\t\tsuper(owner, \"Attention...\", false);\n\t\taddWindowListener(new WindowAdapter()\n\t\t{\n\t\t\tpublic void windowClosing(WindowEvent e)\n\t\t\t{\n\t\t\t\tclearAndHide();\n\t\t\t}\n\t\t});\n\t\ttabbedPane = new JTabbedPane();\n\t\tcount = 0;\n\t}",
"public NewJFrame()\r\n {\r\n initComponents();\r\n }",
"public FrameForm() {\n initComponents();\n }",
"public TCommChatPanel() {\r\n\t\tinitialize();\r\n\t}",
"private void buildGUI() {\r\n textArea = new JTextArea(20, 50);\r\n textArea.setEditable(false);\r\n textArea.setLineWrap(true);\r\n add(new JScrollPane(textArea), BorderLayout.CENTER);\r\n\r\n Box box = Box.createHorizontalBox();\r\n add(box, BorderLayout.SOUTH);\r\n inputTextField = new JTextField();\r\n sendButton = new JButton(\"Send\");\r\n box.add(inputTextField);\r\n box.add(sendButton);\r\n\r\n // Action for the inputTextField and the goButton\r\n ActionListener sendListener = new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n String str = inputTextField.getText();\r\n if (str != null && str.trim().length() > 0) {\r\n chatAccess.send(str);\r\n }\r\n inputTextField.selectAll();\r\n inputTextField.requestFocus();\r\n inputTextField.setText(\"\");\r\n }\r\n };\r\n inputTextField.addActionListener(sendListener);\r\n sendButton.addActionListener(sendListener);\r\n\r\n this.addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n chatAccess.close();\r\n }\r\n });\r\n }",
"private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}",
"@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}",
"public ChatGUI() {\r\n\r\n String propertiesPath = \"kchat.properties\";\r\n try {\r\n Configuration.getInstance().setFile(propertiesPath);\r\n sock = new ChatSocket(new UdpMulticast(Configuration.getInstance().getValueAsString(\"udp.iface\"),\r\n Configuration.getInstance().getValueAsString(\"udp.host\"), Configuration.getInstance()\r\n .getValueAsInt(\"udp.port\")), this);\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(null, \"Cannot Open Socket\", \"alert\", JOptionPane.ERROR_MESSAGE);\r\n // Exit the application if socket is not established\r\n // print stack trace to terminal\r\n e.printStackTrace();\r\n System.exit(0);\r\n }\r\n\r\n // exit the frame on closure of the frame\r\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n // set the bounds of the frame\r\n setBounds(100, 100, 450, 300);\r\n\r\n // Initialize the content pane\r\n contentPane = new JPanel();\r\n\r\n // set the borders of the content pane\r\n contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\r\n // set the layout of the content pane\r\n contentPane.setLayout(new BorderLayout(0, 0));\r\n\r\n // add content pane to frame\r\n setContentPane(contentPane);\r\n\r\n // create panel and layout for input, button and field at top of content\r\n // pane\r\n JPanel panel = new JPanel();\r\n panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n contentPane.add(panel, BorderLayout.NORTH);\r\n\r\n // create the username lael\r\n JLabel lblNewLabel = new JLabel(\"Username\");\r\n panel.add(lblNewLabel);\r\n\r\n // create the field for the Username to input text\r\n textField = new JTextField();\r\n panel.add(textField);\r\n // set column length of the field\r\n textField.setColumns(10);\r\n\r\n // get rooms from the socket return array of long\r\n LongInteger[] rooms = sock.getPresenceManager().getRooms();\r\n // initialize field to store room names\r\n String[] roomNames = new String[rooms.length];\r\n // using for loop convert long to string and store in room name array\r\n for (int i = 0; i < rooms.length; i++) {\r\n roomNames[i] = rooms[i].toString();\r\n }\r\n\r\n // create the combo box\r\n final JComboBox comboBox = new JComboBox(roomNames);\r\n\r\n // refresh the rooms on button press\r\n final JButton btnNewButton = new JButton(\"Refresh Rooms\");\r\n // the action listener for button press\r\n btnNewButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent arg0) {\r\n comboBox.removeAllItems();\r\n // get rooms from the socket\r\n LongInteger[] rooms = sock.getPresenceManager().getRooms();\r\n // initialize field to store room names\r\n String[] roomNames = new String[rooms.length];\r\n // using for loop convert long to string and store in room name\r\n // array\r\n for (int i = 0; i < rooms.length; i++) {\r\n comboBox.addItem(roomNames);\r\n roomNames[i] = rooms[i].toString();\r\n }\r\n }\r\n });\r\n\r\n // add the label for joins\r\n JLabel lblJoin = new JLabel(\" [--- joins \");\r\n panel.add(lblJoin);\r\n\r\n // add the textfield for user input for user to user connection\r\n textField_3 = new JTextField();\r\n\r\n // create a checkbox for when you which to select drop down or input\r\n // user\r\n final JCheckBox chckbxNewCheckBox = new JCheckBox(\"\");\r\n chckbxNewCheckBox.setSelected(true);\r\n final JCheckBox chckbxNewCheckBox_1 = new JCheckBox(\"\");\r\n\r\n // add action listener to checkbox for drop down\r\n chckbxNewCheckBox.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent arg0) {\r\n // if checkbox is checked\r\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 }\r\n });\r\n panel.add(chckbxNewCheckBox);\r\n\r\n // add the drop down to the contentpane\r\n panel.add(comboBox);\r\n\r\n // additional labels are added to the content pane\r\n JLabel lblOrChatWith = new JLabel(\" OR chat with user\");\r\n panel.add(lblOrChatWith);\r\n\r\n // add action listener to checkbox for user input\r\n chckbxNewCheckBox_1.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent arg0) {\r\n // if checkbox is checked\r\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 }\r\n });\r\n panel.add(chckbxNewCheckBox_1);\r\n\r\n // set the textfield for user to user input to false by default and add\r\n // to contentpane panel\r\n textField_3.setEnabled(false);\r\n panel.add(textField_3);\r\n textField_3.setColumns(10);\r\n\r\n // the label is added to the content pane panel\r\n JLabel label = new JLabel(\" ---] \");\r\n panel.add(label);\r\n\r\n // the refresh rooms button is added to content pane panel\r\n panel.add(btnNewButton);\r\n\r\n // the connection button is created\r\n JButton btnNewButton_1 = new JButton(\"Connect\");\r\n // action listener is added to button to take action on key press\r\n btnNewButton_1.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n // if no input or only spaces is put in text field it counts as\r\n // invalid entry\r\n if (textField.getText().trim().equals(\"\")) {\r\n // prompt to user and do nothing\r\n JOptionPane.showMessageDialog(null, \"Please input a valid username\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n textField.setText(\"\");\r\n } else {\r\n // if checkbox for room drop down is selected meaning we are\r\n // connecting to a room\r\n if (chckbxNewCheckBox.isSelected() == true) {\r\n\r\n // if no tab exist with a chosen room name continue\r\n if (tabbedPane.indexOfTab(comboBox.getSelectedItem().toString()) == -1) {\r\n\r\n // get the room members\r\n Set<LongInteger> roomMembers = sock.getPresenceManager().membersOf(\r\n new LongInteger(comboBox.getSelectedItem().toString()));\r\n // initialize field to store room member names\r\n String[] roomMemberNames = new String[roomMembers.size()];\r\n // using for loop convert long to string and store\r\n // in room member name array\r\n int i = 0;\r\n for (LongInteger member : roomMembers) {\r\n roomMemberNames[i] = member.toString();\r\n i++;\r\n }\r\n\r\n // connect to room below and based on return type\r\n // add tab\r\n try {\r\n sock.executeCommand(new PresenceCommand(new LongInteger(comboBox.getSelectedItem()\r\n .toString()), true));\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n // add tab based on return type above\r\n // once you connect successfully disable the\r\n // username textfield\r\n textField.setEnabled(false);\r\n // add tab for Room to user chat\r\n addTab(comboBox.getSelectedItem().toString(), roomMemberNames, 1);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same room\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \"\r\n + comboBox.getSelectedItem().toString(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n // if checkbox for user is selected meaning we are\r\n // connecting to a user\r\n else if (chckbxNewCheckBox_1.isSelected() == true) {\r\n\r\n if (tabbedPane.indexOfTab(\"Chat with \" + textField_3.getText()) == -1) {\r\n // one does not connect to a user so the tab is\r\n // automatically created\r\n // once you connect successfully disable the\r\n // username textfield\r\n // disable the textfield for usernname\r\n textField.setEnabled(false);\r\n // add tab for User to user chat\r\n addTab(\"Chat with \" + textField_3.getText(), new String[] { textField_3.getText() }, 2);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same user\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \" + \"Chat with \"\r\n + textField_3.getText(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }\r\n }\r\n });\r\n panel.add(btnNewButton_1);\r\n\r\n // set the tabbed pane to top\r\n tabbedPane = new JTabbedPane(SwingConstants.TOP);\r\n\r\n // add tabbed pane to center of content pane\r\n contentPane.add(tabbedPane, BorderLayout.CENTER);\r\n }",
"private void makeContent(JFrame frame){\n Container content = frame.getContentPane();\n content.setSize(700,700);\n\n makeButtons();\n makeRooms();\n makeLabels();\n\n content.add(inputPanel,BorderLayout.SOUTH);\n content.add(roomPanel, BorderLayout.CENTER);\n content.add(infoPanel, BorderLayout.EAST);\n\n }",
"public FichaDeContactoJFrame() {\n initComponents();\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 recipientName = new javax.swing.JLabel();\n closeChatBtn = new javax.swing.JButton();\n endChatBtn = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n messageBox = new javax.swing.JTextField();\n sendBtn = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n messagePane = new javax.swing.JTextPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(101, 119, 134));\n setUndecorated(true);\n addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n formMouseDragged(evt);\n }\n });\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n formMousePressed(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(0, 106, 255));\n jPanel1.setBorder(new javax.swing.border.MatteBorder(null));\n\n recipientName.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n recipientName.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/person.png\"))); // NOI18N\n recipientName.setText(\"jLabel1\");\n\n closeChatBtn.setBackground(new java.awt.Color(0, 106, 255));\n closeChatBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/close.png\"))); // NOI18N\n closeChatBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n closeChatBtnActionPerformed(evt);\n }\n });\n\n endChatBtn.setBackground(new java.awt.Color(162, 201, 255));\n endChatBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/end_chat.png\"))); // NOI18N\n endChatBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n endChatBtnActionPerformed(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(15, 15, 15)\n .addComponent(recipientName)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 216, Short.MAX_VALUE)\n .addComponent(endChatBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(closeChatBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(12, 12, 12))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(closeChatBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(endChatBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(recipientName)))\n .addGap(11, 11, 11))\n );\n\n jPanel2.setBackground(new java.awt.Color(102, 102, 102));\n jPanel2.setBorder(new javax.swing.border.MatteBorder(null));\n\n messageBox.setBackground(new java.awt.Color(153, 153, 153));\n messageBox.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\n sendBtn.setBackground(new java.awt.Color(0, 106, 255));\n sendBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/send.png\"))); // NOI18N\n sendBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sendBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(messageBox)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sendBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(sendBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(messageBox, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n messagePane.setEditable(false);\n messagePane.setBackground(new java.awt.Color(51, 51, 51));\n messagePane.setFont(new java.awt.Font(\"Gadugi\", 0, 24)); // NOI18N\n messagePane.setForeground(new java.awt.Color(255, 255, 255));\n jScrollPane1.setViewportView(messagePane);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n layout.setVerticalGroup(\n 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 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n SendBox = new javax.swing.JTextField();\n SendButton = new javax.swing.JButton();\n title = new javax.swing.JLabel();\n back_button = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n chat_area = new javax.swing.JTextPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n SendBox.setFont(new java.awt.Font(\"Book Antiqua\", 2, 12)); // NOI18N\n SendBox.setForeground(new java.awt.Color(0, 0, 0));\n SendBox.setDisabledTextColor(new java.awt.Color(51, 51, 51));\n SendBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SendBoxActionPerformed(evt);\n }\n });\n\n SendButton.setBackground(new java.awt.Color(255, 204, 255));\n SendButton.setFont(new java.awt.Font(\"Book Antiqua\", 2, 14)); // NOI18N\n SendButton.setText(\"Send\");\n SendButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SendButtonActionPerformed(evt);\n }\n });\n\n title.setFont(new java.awt.Font(\"DejaVu Math TeX Gyre\", 3, 18)); // NOI18N\n title.setForeground(new java.awt.Color(0, 0, 0));\n title.setText(\"Welcome to chat\");\n\n back_button.setFont(new java.awt.Font(\"Book Antiqua\", 2, 14)); // NOI18N\n back_button.setText(\"Back\");\n back_button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n back_buttonActionPerformed(evt);\n }\n });\n\n jScrollPane2.setViewportView(chat_area);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(SendBox, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(63, 63, 63)\n .addComponent(SendButton))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(title, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 469, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addComponent(back_button, javax.swing.GroupLayout.PREFERRED_SIZE, 60, 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(back_button, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(title, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(SendBox, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(SendButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n pack();\n }",
"public NewJFrame() {\n initComponents();\n\n }",
"public DisplayStaffMemberFrame() {\n initComponents();\n }",
"public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}",
"private JPanel chatPanel() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new FlowLayout(FlowLayout.LEFT));\r\n\t\tpanel.setPreferredSize(new Dimension(800, 190));\r\n\t\tpanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\ttxtAreaWriteMessage.setFont(font1);\r\n\t\ttxtAreaWriteMessage.setLineWrap(true);\r\n\t\ttxtAreaWriteMessage.setWrapStyleWord(true);\r\n\t\tmessageScroll.setPreferredSize(new Dimension(800, 180));\r\n\t\tmessageScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\ttextPane.setFont(font1);\r\n\t\tscrollMessages.setPreferredSize(new Dimension(800, 500));\r\n\t\tlistMessages.addMouseListener(mouseListener);\r\n\t\tpanel.add(scrollMessages);\r\n\t\tpanel.add(messageScroll);\r\n\t\treturn panel;\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString name = \"temporary place holder\";\n\t\ttry {\n\t\t\tString address = tfIP.getText();\n\t\t\tInetAddress senderAddress = DatagramSnR.createInetObj(address);\n\t\t\n\t\t\tint senderPort = Integer.parseInt(tfPort.getText());\n\t\t\n\t\t\tChatFrame mFrame = new ChatFrame(mSocket, senderAddress, senderPort, name);\n\t\t\tDatagramSnR.addToList(mFrame);\n\t\t}\n\t\tcatch (NullPointerException nl) {\n\t\t\tnl.printStackTrace();\n\t\t}\n\n\t}",
"public void run() {\r\n\t\t\t\tServerChatUI serverChatUI = new ServerChatUI(s);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tserverChatUI.setMinimumSize(new Dimension(588, 500));\r\n\t\t\t\tserverChatUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\t\tserverChatUI.setLocation(dim.width/2-serverChatUI.getSize().width/2, dim.height/2-serverChatUI.getSize().height/2);\r\n \t\t\t\tserverChatUI.pack();\r\n\t\t\t\tserverChatUI.setVisible(true);\r\n\t\t\t\tserverChatUI. setResizable(false);\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t}",
"public NewJFrame() {\n initComponents();\n // HidenLable.setVisible(false);\n }",
"private SimpleChatUI() {\n initComponents();\n convo = null;\n setConnStatus(false);\n jMessageEntry.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jSendButtonActionPerformed(evt);\n }\n });\n }",
"private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }",
"public void buildFrame();",
"public NewJFrame() {\n initComponents();\n mcam.setLineWrap(true);\n\n }",
"public abstract JLabel createUserWidget(String userName, String host, String chatMessage);",
"public SocksDialog(Frame parent){\n this(parent,null);\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setBounds(100, 100, 600, 600);\n\t\tframe.setTitle(\"WSChat Client\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tJPanel mainPanel = new JPanel();\n\t\tframe.getContentPane().add(mainPanel);\n\t\tmainPanel.setLayout(null);\n\n\t\tJLabel setNameLabel = new JLabel();\n\t\tsetNameLabel.setText(\"Nickname: \");\n\t\tmainPanel.add(setNameLabel);\n\t\tsetNameLabel.setBounds(168, 10, 80, 30);\n\t\tnameField = new JTextField();\n\t\tnameField.setBounds(247, 10, 100, 30);\n\t\tsendName = new JButton(\"Set Name\");\n\t\tsendName.setBounds(359, 11, 120, 30);\n\t\tnameField.setColumns(10);\n\t\tmainPanel.add(nameField);\n\t\tmainPanel.add(sendName);\n\t\tsendName.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tWSChatApplication.this.send(\"/nick \" + nameField.getText());\n\t\t\t}\n\t\t});\n\n\t\tJScrollPane msg_pane = new JScrollPane();\n\t\tmsg_area = new JTextArea();\n\t\tmsg_area.setEditable(false);\n\t\tmsg_area.setLineWrap(true);\n\t\tmsg_area.setWrapStyleWord(true);\n\t\tmsg_pane.setViewportView(msg_area);\n\t\tmsg_pane.setBounds(10, 45, 450, 450);\n\t\tmainPanel.add(msg_pane);\n\n\t\tJScrollPane list_pane = new JScrollPane();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tcurrentTarget = list.getSelectedValue();\n\t\t\t}\n\t\t});\n\n\t\tJTextPane textPane = new JTextPane();\n\t\ttextPane.setBounds(0, 0, 1, 16);\n\t\tmainPanel.add(textPane);\n\t\tlist_pane.setViewportView(list);\n\t\tlist_pane.setBounds(470, 45, 120, 450);\n\t\tmainPanel.add(list_pane);\n\n\t\tJScrollPane in_pane = new JScrollPane();\n\t\tfinal JTextArea in_area = new JTextArea();\n\t\tin_area.setLineWrap(true);\n\t\tin_area.setWrapStyleWord(true);\n\t\tin_pane.setViewportView(in_area);\n\t\tJButton sendBut = new JButton(\"Send\");\n\t\tsendBut.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (list.getSelectedIndex() == 0)\n\t\t\t\t\tWSChatApplication.this.send(in_area.getText());\n\t\t\t\telse\n\t\t\t\t\tWSChatApplication.this.send(\"/to \" + currentTarget + \" \"\n\t\t\t\t\t\t\t+ in_area.getText());\n\t\t\t\tin_area.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tmainPanel.add(sendBut);\n\t\tsendBut.setBounds(470, 500, 120, 70);\n\t\tmainPanel.add(in_pane);\n\t\tin_pane.setBounds(10, 500, 450, 70);\n\t}",
"public addStFrame() {\n initComponents();\n }",
"public void initialChatWindow(String title)\r\n {\n frame = new JFrame(title);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLayout(new BorderLayout());\r\n JScrollPane scrollPane = new JScrollPane(outputTextArea = new JTextArea());\r\n frame.add(scrollPane, BorderLayout.CENTER);\r\n frame.add(inputTextArea = new JTextArea(), BorderLayout.SOUTH);\r\n frame.setSize(550,450);\r\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n int w = frame.getSize().width;\r\n int h = frame.getSize().height;\r\n int x = (dim.width-w)/2;\r\n int y = (dim.height-h)/2;\r\n frame.setLocation(x,y);\r\n frame.setVisible(true);\r\n\r\n inputTextArea.setLineWrap(true);\r\n inputTextArea.setWrapStyleWord(true);\r\n inputTextArea.requestFocus();\r\n inputTextArea.addKeyListener(this);\r\n outputTextArea.setEditable(false);\r\n outputTextArea.setLineWrap(true);\r\n outputTextArea.setWrapStyleWord(true);\r\n }",
"public NewJFrame1() {\n initComponents();\n }",
"private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Enter Character Name\");\r\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.addWindowListener(new WindowListener()\r\n\t\t {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowActivated(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowIconified(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t } ) ;\r\n\r\n //Set up the content pane.\r\n addComponentsToPane(frame.getContentPane());\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setSize(new Dimension(390,90)) ;\r\n frame.setVisible(true);\r\n frame.setResizable(false) ;\r\n }",
"public void createAndShowGUI() {\n JFrame frame = new JFrame();\n frame.setSize(500, 500);\n frame.setTitle(\"Face Viewer\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n FaceComponent component = new FaceComponent();\n frame.add(component);\n frame.setVisible(true);\n }",
"public MainWindow()\n {\n Chat loadedChat = loadChat();\n if (loadedChat != null) {\n chat = loadedChat;\n for (User user : chat.getUsers()) {\n chatWindows.add(new ChatWindow(user, chat));\n }\n }\n add(new JLabel(\"Username\"));\n addNameInput();\n addButton();\n setSize(220, 125);\n setLayout(new GridLayout(3, 1));\n setVisible(true);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n addWindowListener(new WindowAdapter() {\n\n @Override\n public void windowClosing(WindowEvent e)\n {\n try {\n storeChat(chat);\n } catch (IOException exception) {\n showError(rootPane, \"Couldn't store application state\");\n }\n for (ChatWindow chatWindow : chatWindows) {\n chatWindow.dispatchEvent(new WindowEvent(chatWindow, WINDOW_CLOSING));\n }\n super.windowClosing(e);\n }\n });\n }",
"public FrameInsert() {\n initComponents();\n }",
"private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\n title = \"Edit an existing event\";\n break;\n default:\n }\n frame.setTitle(title);\n frame.setResizable(false);\n frame.setPreferredSize(new Dimension(300, 350));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // sets the main form to be visible if the event form was exited\n // and not completed.\n mainForm.getFrame().setEnabled(true);\n mainForm.getFrame().setVisible(true);\n }\n });\n }",
"public ClientFrame() {\n initComponents();\n }",
"public ClientFrame() {\n initComponents();\n }",
"public void createframe(String cid) {\n\t\tviewframe = new JFrame();\n\t\tviewconsumer(cid);\n\t\tviewframe.setTitle(\"Search result\");\n\t\tviewframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tviewframe.setLayout(new BorderLayout()); \n\t\tviewframe.add(viewpage);\n\t\tviewframe.setVisible(true); \n\t\tviewframe.setSize(500, 400);\n\t\tviewframe.setResizable(true);\n\t}",
"private void initComponents() {\n\n\t\tjLabel1 = new javax.swing.JLabel();\n\t\tjTextField1 = new javax.swing.JTextField();\n\t\tjSeparator1 = new javax.swing.JSeparator();\n\t\tjLabel2 = new javax.swing.JLabel();\n\t\tjScrollPane2 = new javax.swing.JScrollPane();\n\t\tjTextArea2 = new javax.swing.JTextArea();\n\t\tjButton1 = new javax.swing.JButton();\n\t\tjScrollPane3 = new javax.swing.JScrollPane();\n\t\tjTextArea1 = new javax.swing.JTextArea();\n\n\t\tsetDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\t\tsetTitle(\"Chatting_lxyu\");\n\t\tsetBounds(new java.awt.Rectangle(0, 0, 10, 0));\n\t\tsetResizable(false);\n\n\t\tjLabel1.setText(\"Name :\");\n\n\t\tjTextField1.setText(\"enter your name\");\n\t\tjTextField1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\t\tjTextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjTextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjLabel2.setText(\"Enter :\");\n\n\t\tjTextArea2.setColumns(20);\n\t\tjTextArea2.setRows(5);\n\t\tjScrollPane2.setViewportView(jTextArea2);\n\n\t\tjButton1.setText(\"Send\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjTextArea1.setColumns(20);\n\t\tjTextArea1.setEditable(false);\n\t\tjTextArea1.setRows(5);\n\t\tjTextArea1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\t\tjScrollPane3.setViewportView(jTextArea1);\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(\n\t\t\t\tgetContentPane());\n\t\tgetContentPane().setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjSeparator1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t565, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(6, 6, 6)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t47,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t158,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2)\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t438,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\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.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\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.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane3,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t545,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)))\n\t\t\t\t\t\t\t\t.addContainerGap()));\n\t\tlayout.setVerticalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t39,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addComponent(jSeparator1,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t10,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addComponent(jScrollPane3,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t188,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7, 7, 7)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t84,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjScrollPane2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t64,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(14, 14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t14)))\n\t\t\t\t\t\t\t\t.addContainerGap()));\n\n\t\tpack();\n\t}",
"public ChatView() {\n\t\t// Load Font and Style Sheet\n\t\tFont.loadFont(Resources.el_font, 20);\n\t\tgetStylesheets().add(Resources.Css_ChatView);\n\n\t\t// Creating \"Chat Messages\" observable list and list view\n\t\tthis.chatMessages = FXCollections.observableArrayList();\n\t\t\n\t\tthis.lstChatMessages = new ListView<String>(chatMessages);\n\t\tthis.lstChatMessages.setPrefWidth(780);\n\t\tthis.lstChatMessages.setPrefHeight(780);\n\t\tthis.lstChatMessages.setStyle(\"\");\n\t\t//\t this.lstChatMessages.setPadding(new Insets(0,10,0,10));\n\t\tthis.lstChatMessages.setStyle(\"-fx-background-color: white;\");\n\t\tthis.lstChatMessages.setId(\"chatMessages\");\n\t\tthis.lstChatMessages.setCellFactory(\n\t\t\t\tnew Callback<ListView<String>, ListCell<String>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ListCell<String> call(ListView<String> lstChatMessages) {\n\t\t\t\t\t\tfinal ListCell<String> cell =\n\t\t\t\t\t\t\t\tnew ListCell<String>() {\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsetPrefWidth(5);\n\t\t\t\t\t\t\t\tsetWrapText(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tprotected void updateItem(String item, boolean empty) {\n\t\t\t\t\t\t\t\tsuper.updateItem(item, empty);\n\t\t\t\t\t\t\t\tif (item == null) {\n\t\t\t\t\t\t\t\t\tsetText(null);\n\t\t\t\t\t\t\t\t\tsetStyle(null);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsetText(item);\n\t\t\t\t\t\t\t\t\tsetStyle(\"-fx-font-family: 'Elianto Regular';\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn cell;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tthis.lstChatMessages.setId(\"lstChatMessages\");\n\t\tthis.lstChatMessages.setItems(getChatMessages());\n\n\n\t\t// Setup Labels\n\t\tthis.title = new Text(\"Chat\");\n\t\tthis.title.setOnMouseClicked(e -> {slideChat();});\n\t\t\n\t\tthis.title.setId(\"Title\");\n\t\tthis.lblCharactersLeft = new Label(Integer.toString(this.maxCharacters));\n\t\tthis.lblCharactersLeft.setId(\"lblCharactersLeft\");\n\n\t\t// Setup Message Text Input\n\t\tthis.textInputMessage = new TextField();\n\t\tthis.textInputMessage.prefWidthProperty().bind(lstChatMessages.widthProperty().multiply(0.8));\n\t\tthis.textInputMessage.setPrefHeight(40);\n\t\tthis.textInputMessage.setFont(Font.loadFont(Resources.el_font, 16));\n\n\t\tfinal UnaryOperator<Change> limit = c -> {\n\t\t\tif (c.isContentChange()) {\n\t\t\t\tint newLength = c.getControlNewText().length();\n\t\t\t\tif (newLength > maxCharacters) {\n\t\t\t\t\tc.setText(c.getControlText());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn c;\n\t\t};\n\t\tfinal UnaryOperator<Change> chatFilter =\n\t\t\t\tchange -> { // Setup Filter\n\t\t\t\t\tif (change.getControlNewText().length() > maxCharacters) {\n\t\t\t\t\t\tnumCharactersLeft = 0;\n\t\t\t\t\t\tlblCharactersLeft.setText(Integer.toString(numCharactersLeft));\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnumCharactersLeft = maxCharacters - change.getControlNewText().length();\n\t\t\t\t\t\tlblCharactersLeft.setText(Integer.toString(numCharactersLeft));\n\t\t\t\t\t\treturn change;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis.textInputMessage.setTextFormatter(new TextFormatter<>(limit));\n\t\t\t\tthis.textInputMessage.setTextFormatter(new TextFormatter<>(chatFilter));\n\t\t\t\tthis.textInputMessage.setOnKeyPressed(\n\t\t\t\t\t\tnew EventHandler<KeyEvent>() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void handle(KeyEvent keyEvent) {\n\t\t\t\t\t\t\t\tif ((keyEvent.getCode() == KeyCode.ENTER) && (!keyEvent.isAltDown())) {\n\t\t\t\t\t\t\t\t\tkeyEvent.consume();\n\t\t\t\t\t\t\t\t\tString message = textInputMessage.getText();\n\t\t\t\t\t\t\t\t\ttextInputMessage.clear();\n\t\t\t\t\t\t\t\t\tsendMessage(message);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\tthis.textInputMessage.setId(\"textInputMessage\");\n\n\n\t\t\t\t// Setup Send Button\n\t\t\t\tButton sendBtn = new Button(\"Send\");\n\t\t\t\tsendBtn.prefWidthProperty().bind(lstChatMessages.widthProperty().multiply(0.2));\n\t\t\t\tsendBtn.setOnAction(e ->{ // Show deck\n\t\t\t\t\tsendMessage(textInputMessage.getText());\n\t\t\t\t});\n\n\t\t\t\tStackPane top = new StackPane();\n\t\t\t\ttop.getChildren().add(lstChatMessages);\n\n\t\t\t\tHBox bottom = new HBox(5);\n\t\t\t\tbottom.setAlignment(Pos.CENTER);\n\t\t\t\tbottom.getChildren().addAll(textInputMessage, sendBtn);\n\t\t\t\tbottom.setPadding(new Insets(0,0,10,0));\n\n\n\t\t\t\t// Put all together\n\t\t\t\tthis.container = new VBox(10);\n\t\t\t\tcontainer.setAlignment(Pos.BOTTOM_CENTER);\n\t\t\t\tcontainer.getChildren().addAll(lstChatMessages, bottom, title);\n\t\t\t\tcontainer.setPadding(new Insets(10,10,10,10));\n\t\t\t\tcontainer.setId(\"chat\");\n\n\t\t\t\tthis.getChildren().add(container);\n\t}",
"private Frame buildFrame() {\n return new Frame(command, headers, body);\n }",
"@FXML\n\tprivate void newChatPressed(MouseEvent event) throws IOException {\n\n\t\tstage = new Stage();\n\t\tFXMLLoader fxmlLoader = new FXMLLoader();\n\t\tfxmlLoader.setLocation(getClass().getResource(\"Popup.fxml\")); \n\t\tAnchorPane frame = fxmlLoader.load(); \n\t\tPopupController controller = (PopupController)fxmlLoader.getController();\n\t\tcontroller.primaryUserList = userList;\n\t\tcontroller.setClient(this.client);\n\t\tcontroller.setChatController(this);\n\n\t\tclient.getOnlineUsers();\n\n\t\tscene = new Scene(frame); \n\t\tstage.setScene(scene);\n\t\tstage.setMinHeight(400);\n\t\tstage.setMinWidth(400);\n\t\tstage.setMaxHeight(400);\n\t\tstage.setMaxWidth(400);\n\t\tstage.show();\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n chatList = new javax.swing.JList<>();\n chatText = new javax.swing.JTextField();\n sendButton = new javax.swing.JButton();\n clearButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"ChatFrame\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n chatList.setModel(new DefaultListModel());\n chatList.setCellRenderer(new ChatMessageRenderer());\n jScrollPane1.setViewportView(chatList);\n\n sendButton.setText(\"send\");\n\n clearButton.setText(\"clear\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(chatText, javax.swing.GroupLayout.PREFERRED_SIZE, 618, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sendButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(clearButton)\n .addContainerGap(41, Short.MAX_VALUE))\n .addComponent(jScrollPane1)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(chatText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sendButton)\n .addComponent(clearButton)))\n );\n\n pack();\n }",
"public ChatClient() {\r\n\r\n // Layout GUI\r\n textField.setEditable(false);\r\n messageArea.setEditable(false);\r\n frame.getContentPane().add(textField, \"North\");\r\n frame.getContentPane().add(new JScrollPane(messageArea), \"Center\");\r\n frame.pack();\r\n\r\n // Add Listeners\r\n textField.addActionListener(new ActionListener() {\r\n /**\r\n * Responds to pressing the enter key in the textfield by sending the contents of the text\r\n * field to the server. Then clear the text area in preparation for the next message.\r\n */\r\n public void actionPerformed(ActionEvent e)\r\n {\r\n out.println(textField.getText());\r\n textField.setText(\"\");\r\n }\r\n });\r\n }",
"private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }",
"public void ChatGUI() {\n try {\n\n DataOutputStream out = new DataOutputStream(socket.getOutputStream());\n DataInputStream in = new DataInputStream(socket.getInputStream());\n out.writeUTF(\"Connmain\");\n String message = in.readUTF();\n if (message.equals(\"Conf\")) {\n ObjectInputStream inOb = new ObjectInputStream(socket.getInputStream());\n ArrayList<String> chatlog = (ArrayList<String>) inOb.readObject();\n\n new ChatGUI().start(stage, this, socket, chatlog);\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public xinxiNewJFrame() {\n initComponents();\n }",
"private JTextArea initializeChatArea() {\r\n\t\t// create and set properties of chat area.\r\n\t\tchatArea = new JTextArea();\r\n\t\tchatArea.setEditable(false);\r\n\t\tchatArea.setAutoscrolls(true);\r\n\t\tchatArea.setFont(new Font(\"Tahoma\", 0, 12));\r\n\t\treturn chatArea;\r\n\t}",
"clientApp()\n\t{\t\t\n\t\tString arr[]=new String[2];\n\t\t//objfile.output(arr);\n\t\ttfsip=new JTextField(arr[1]);\n\t\ttfcnm=new JTextField(arr[0]);\n\n\t\tJFrame f=new JFrame(\"_Chat Box_\");\n\t\tf.setSize(365,340);\n\t\tf.setLayout(new BorderLayout());\n\t\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tf.setResizable(false);\n\n\t\tMenuBar mbar=new MenuBar();\n\t\tf.setMenuBar(mbar);\n\n\t\tMenu help=new Menu(\"Help\");\n\t\tMenuItem item1;\n\t\thelp.add(item1 = new MenuItem(\"About\"));\n\t\tmbar.add(help);\n\t\titem1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae)\n\t\t\t{\n\n\t\t\t\tJFrame f1=new JFrame(\"About\");\n\t\t\t\tf1.setSize(300,200);\n\t\t\t\tf1.setResizable(false);\n\t\t\t\tf1.setLayout(new BorderLayout());\n\n\t\t\t\tJLabel l3=new JLabel(\"Client\");\n\t\t\t\tf1.add(l3,BorderLayout.NORTH);\n\t\t\t\tTextArea ta1;\n\n\t\t\t\tta1=new TextArea(\"It is an easy Network Chat application.\\nJust enter the IP address of system on which\\nserver is running, and begin to group chat.\\n\\nSpecial thanks for the idea:\\nHimanshu Gupta\\n\\nFor any query or suggestions contact:\\[email protected]\");\n\t\t\t\tta1.setEditable(false);\n\t\t\t\tf1.add(ta1,BorderLayout.CENTER);\n\t\t\t\tf1.setLocationRelativeTo(null);\n\t\t\t\tf1.setVisible(true);\n\t\t\t}});\n\n\t\tMenu setting=new Menu(\"Settings\");\n\t\tMenuItem sitem1;\n\t\tsetting.add(sitem1=new MenuItem(\"Server Settings\"));\n\t\tsitem1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae)\n\t\t\t{\n\t\t\t\tf1=new JFrame(\"\");\n\t\t\t\tf1.setSize(150,125);\n\t\t\t\tf1.setResizable(false);\n\t\t\t\tf1.setLayout(new BorderLayout());\n\t\t\t\tJLabel l3=new JLabel(\"Enter Server IP Address\");\n\t\t\t\tf1.add(l3,BorderLayout.NORTH);\n\n\t\t\t\tJButton b1;\n\t\t\t\tb1=new JButton(\"Submit\");\n\t\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent ae)\n\t\t\t\t\t{\n\t\t\t\t\t\tString temp=tfsip.getText();\n\t\t\t\t\t\ttemp=temp.trim();\n\t\t\t\t\t\tif(temp.equals(serverIP))\n\t\t\t\t\t\t{f1.setVisible(false); return;}\n\t\t\t\t\t\tif(temp.length()>15)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tStringTokenizer abc=new StringTokenizer(temp,\".\");\n\t\t\t\t\t\tfor(int i=1;i<=4;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint addr=Integer.parseInt(abc.nextToken());\n\t\t\t\t\t\t\tif(addr>255 || addr<0)\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tboolean response=obj.setIP(temp);\n\t\t\t\t\t\tif(!response)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tta.append(\"Unable to Connect to the Server ...!!!\\n\" );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tserverIP=temp;\n\t\t\t\t\t\t// \t\tobjfile.input(clientname,serverIP);\n\t\t\t\t\t\tta.setText(\"Connected to the Server.. :)\\n\" );\t\t//\t\t//Enter bye to exit\\n\n\t\t\t\t\t\tfrom_server();\n\t\t\t\t\t\tf1.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tf1.add(b1);\n\t\t\t\tf1.add(tfsip,BorderLayout.CENTER);\n\t\t\t\tf1.add(b1,BorderLayout.SOUTH);\n\t\t\t\tf1.setLocationRelativeTo(null);\n\t\t\t\tf1.setVisible(true);\n\t\t\t}});\n\n\t\tMenuItem sitem2;\n\t\tsetting.add(sitem2=new MenuItem(\"Client Name\"));\n\t\tmbar.add(setting);\n\t\tsitem2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae)\n\t\t\t{\n\t\t\t\tf1=new JFrame(\"\");\n\t\t\t\tf1.setSize(150,125);\n\t\t\t\tf1.setResizable(false);\n\t\t\t\tf1.setLayout(new BorderLayout());\n\t\t\t\tJLabel l3=new JLabel(\"Enter your nick name...\");\n\t\t\t\tf1.add(l3,BorderLayout.NORTH);\n\n\t\t\t\tJButton b1;\n\t\t\t\tb1=new JButton(\"Submit\");\n\t\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent ae)\n\t\t\t\t\t{\n\t\t\t\t\t\tclientname=tfcnm.getText();\n\t\t\t\t\t\tobj.setName(clientname);\n\t\t\t\t\t\t// \t\tobjfile.input(clientname,serverIP);\n\t\t\t\t\t\tf1.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tf1.add(b1);\n\t\t\t\tf1.add(tfcnm,BorderLayout.CENTER);\n\t\t\t\tf1.add(b1,BorderLayout.SOUTH);\n\t\t\t\tf1.setLocationRelativeTo(null);\n\t\t\t\tf1.setVisible(true);\n\t\t\t}});\n\n\n\t\tJLabel l1=new JLabel(\"_________Enter the text and hit enter to multicast_________\");\n\t\tf.add(l1,BorderLayout.NORTH);\n\t\ttf1.addActionListener(Action());\n\n\n\t\tDefaultCaret caret1 = (DefaultCaret)tf1.getCaret();\n\t\tcaret1.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n\t\tf.add(tf1,BorderLayout.SOUTH);\n\n\t\tta.setText(\"\");\n\t\tta.setLineWrap(true);\n\t\tta.setWrapStyleWord(true);\n\t\tDefaultCaret caret = (DefaultCaret)ta.getCaret();\n\t\tcaret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n\t\tta.setEditable(false);\n\t\tf.add(new JScrollPane(ta),BorderLayout.CENTER);\n\t\tf.setVisible(true);\n\t\t//f.setDefaultLookAndFeelDecorated(true);\n\t\tf.setLocationRelativeTo(null);\n\t}",
"private void setupChat() {\n\n\n // Initialize the array adapter for the conversation thread\n mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message);\n\n mConversationView.setAdapter(mConversationArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n mOutEditText.setOnEditorActionListener(mWriteListener);\n\n // Initialize the send button with a listener that for click events\n mSendButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Send a message using content of the edit text widget\n View view = getView();\n if (null != view) {\n TextView textView = (TextView) view.findViewById(R.id.edit_text_out);\n String message = textView.getText().toString();\n Bundle bundle=new Bundle();\n bundle.putString(BluetoothChatFragment.EXTRAS_ADVERTISE_DATA, message);\n mCallback.onSendMessage(bundle);\n //對話框上顯示\n mConversationArrayAdapter.add(\"Me: \" + message);\n //設為不可發送 並清除訊息文字編輯區\n Send_btn=false;\n mSendButton.setEnabled(Send_btn);\n mOutStringBuffer.setLength(0);\n mOutEditText.setText(mOutStringBuffer);\n\n }\n }\n });\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n }",
"public void createAndShowGUI(JFrame frame) {\n providerSideBar(frame.getContentPane(), pat);\n topBarPatientInformation(frame.getContentPane(), pat);\n patientReferralPanel(frame.getContentPane());\n\n }",
"public void createButtonFrame()\n {\n JFrame createFrame = new JFrame();\n createFrame.setSize(560,200);\n Container pane2;\n pane2 = createFrame.getContentPane();\n JPanel createPanel = new JPanel(null);\n createEvent = new JTextArea(\"MM/DD/YYYY\");\n timeField1 = new JTextArea(\"00:00\");\n timeField2 = new JTextArea(\"00:00\");\n EventNameField = new JTextArea(\"UNTILED NAME\");\n JLabel EnterEventLabel = new JLabel(\"Enter Event Name:\");\n JLabel EnterDateLabel = new JLabel(\"Date:\");\n JLabel EnterStartLabel = new JLabel(\"Start:\");\n JLabel EnterEndLabel = new JLabel(\"End:\");\n JLabel toLabel = new JLabel(\"to\");\n pane2.add(createPanel);\n createPanel.add(createEvent);\n createPanel.add(timeField1);\n createPanel.add(EventNameField);\n createPanel.add(timeField2);\n createPanel.add(create);\n createPanel.add(EnterEventLabel);\n createPanel.add(EnterDateLabel);\n createPanel.add(EnterStartLabel);\n createPanel.add(EnterEndLabel);\n createPanel.add(toLabel);\n\n createPanel.setBounds(0, 0, 400, 200); //panel\n createEvent.setBounds(20, 90, 100, 25); //Date field\n timeField1.setBounds(150, 90, 80, 25); //Time field\n timeField2.setBounds(280, 90, 80, 25); //Time field 2\n create.setBounds(380, 100, 150, 50); //Create Button\n\n EnterStartLabel.setBounds(150, 65, 80, 25);\n EnterEndLabel.setBounds(280, 65, 80, 25);\n toLabel.setBounds(250, 90, 80, 25);\n EnterDateLabel.setBounds(20, 65, 80, 25);\n EventNameField.setBounds(20, 30, 300, 25); //Event Name Field\n EnterEventLabel.setBounds(20, 5, 150, 25);\n\n\n\n\n createFrame.setVisible(true);\n createFrame.setResizable(false);\n }",
"public NewJFrame17() {\n initComponents();\n }",
"private void createSendArea() {\n\t\tthis.btnSend = new Button(\"Envoyer\");\n\t\tthis.btnSend.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tboolean sent = window.sendMessage(message.getText());\n\t\t\t\tif(sent) {\n\t\t\t\t\tmessage.setText(\"\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\t\t\tnew JFrame(),\n\t\t\t\t\t\t\"Erreur lors de l'envoi du message...\",\n\t\t\t\t\t\t\"Dialog\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public WelcomeFrame() {\n initComponents();\n lblUser.setText(\"<html>Xin chào <b>\" + Application.TEACHER.getName().replace(\"<\", \"<\").replace(\">\", \">\")+ \"</b>!</html>\");\n runClock();\n }",
"@Override\n\t protected Control createDialogArea(Composite parent) {\n\t container = (Composite) super.createDialogArea(parent);\n\t container.setLayout(new GridLayout(2, false));\n\t new Label(container, SWT.NONE);\n\t \n\t Label lblTo = new Label(container, SWT.NONE);\n\t lblTo.setText(\"Recipient:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfRecipient = new Text(container, SWT.BORDER);\n\t tfRecipient.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t new Label(container, SWT.NONE);\n\t \n\t Label lblSubject = new Label(container, SWT.NONE);\n\t lblSubject.setText(\"Subject:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfSubject = new Text(container, SWT.BORDER);\n\t tfSubject.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t new Label(container, SWT.NONE);\n\t \n\t lblMessage = new Label(container, SWT.NONE);\n\t lblMessage.setText(\"Message:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfMessage = new Text(container, SWT.BORDER | SWT.WRAP | SWT.MULTI);\n\t GridData gd_text_2 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\n\t gd_text_2.heightHint = 292;\n\t tfMessage.setLayoutData(gd_text_2);\n\t getShell().setText(\"Write new Message\");\n\t return container;\n\t }",
"public AlterarSenhaFrame() {\n initComponents();\n }",
"public UserDialog(JFrame parent){\n\t\t\tsuper(parent, \"New user\");\n\t\t\tadd(new JPanel(), BorderLayout.NORTH);\n\t\t\tadd(new UserDatapanel(),BorderLayout.CENTER);\n\t\t\tadd(getButtonPanel(),BorderLayout.SOUTH);\n\t\t\tsetSize(500,300);\n\t\t}",
"public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }",
"protected static void create(String[] userDataInput, String billboardID, String currentName) {\n JFrame frame = new RenameBillboard(\"Billboard Client\", userDataInput, billboardID, currentName);\n frame.setVisible(true);\n }",
"public ClientFrame() {\n\t\tinitComponents();\n\t}",
"private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"FEEx v. \"+VERSION);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Main p = new Main();\n p.addComponentToPane(frame.getContentPane());\n\n frame.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n \tstopPolling();\n \tstopMPP();\n p.port.close();\n Utils.storeSizeAndPosition(frame);\n }\n });\n \n //Display the window.\n frame.pack();\n Utils.restoreSizeAndPosition(frame);\n frame.setVisible(true);\n }",
"ClientGUI() {\n\t\t_ls = new logServer(\"ClientGui\");\n\n\t\t_clientFrame = new JFrame();\n\t\t_loginFrame = new LoginF(_ls);\n\n\t\t_clientFrame.setSize(500, 820);\n\t\t_clientFrame.setLayout(null);\n\t\t_clientFrame.add(_loginFrame);\n\t\tinit();\n\n\t\t// startFrame();\n\t\t\n\n\t\t_clientControl = new Client(_ls);\n\t\t_loginFrame.setClientPointer(_clientControl);\n\n\t\t/**\n\t\t * event for login frame to close and open new frame\n\t\t */\n\t\t_loginFrame.setLoginListener(new loginFrameListener() {\n\t\t\t@Override\n\t\t\tpublic void singUpListener(Client clientControl) {\n\t\t\t\t_clientControl = clientControl;\n\t\t\t\tstartFrame();\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"private static void createAndShowGUI() {\n\n frame = new JFrame(messages.getString(\"towers.of.hanoi\"));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n addComponentsToPane(frame.getContentPane());\n frame.pack();\n frame.setSize(800, 600);\n frame.setVisible(true);\n }",
"public LoginGUI() {\n\n super(\"Login\");\n //Integer.parseInt(jTextField_password.getText())\n\n this.client = new ChatClient(\"localhost\",8818 );\n client.connect();\n\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n jButton_login.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_loginActionPerformed(evt);\n }\n });\n\n {\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel_PASSWORD)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField_password, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel_USERNAME)\n .addComponent(jLabel_PORT, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField_port, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField_username, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(38, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel_IP, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField_ip, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))))\n .addGroup(layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addComponent(jButton_login, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel_IP)\n .addComponent(jTextField_ip, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel_PORT)\n .addComponent(jTextField_port, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel_USERNAME)\n .addComponent(jTextField_username, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(16, 16, 16)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel_PASSWORD)\n .addComponent(jTextField_password, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton_login, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)\n .addContainerGap())\n );\n }\n\n pack();\n\n setVisible(true);\n\n //initComponents();\n }",
"private void addSimpleChat(ChatPanel chatPanel)\n {\n this.mainPanel.add(chatPanel, BorderLayout.CENTER);\n }",
"private JFrame createFrame() {\n\t\tJFrame frmProfessorgui = new JFrame();\n\t\tfrmProfessorgui.getContentPane().setBackground(new Color(153, 204, 204));\n\t\tfrmProfessorgui.getContentPane().setForeground(SystemColor.desktop);\n\t\tfrmProfessorgui.setTitle(\"ProfessorGUI\");\n\t\tfrmProfessorgui.setBounds(100, 100, 600, 475);\n\t\tfrmProfessorgui.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tfrmProfessorgui.getContentPane().setLayout(null);\n\n\n\t\t//List, ScrollPane and Button Components\n\t\tmodel = new DefaultListModel();\n\t\tsetList();\n\t\tlist = new JList(model);\n\t\tlist.setBackground(new Color(255, 245, 238));\n\t\tJScrollPane scrollPane = new JScrollPane(list, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n\t\tscrollPane.setBounds(10, 46, 293, 365);\n\t\tfrmProfessorgui.getContentPane().add(scrollPane);\n\n\t\tlist.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tlist.setBorder(new LineBorder(new Color(128, 128, 128), 2, true));\n\n\t\tcourse = new JButton(\"View Course\");\n\t\tcourse.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tcourse.addActionListener(new profMainListener());\n\n\t\tcourse.setBounds(390, 207, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(course);\n\n\t\tcreate = new JButton(\"Create Course\");\n\t\tcreate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tcreate.setBounds(390, 250, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(create);\n\t\tcreate.addActionListener(new profMainListener());\n\n\t\tactivate = new JButton(\"Activate\");\n\t\tactivate.addActionListener(new profMainListener()); \n\t\tactivate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tactivate.setBounds(390, 296, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(activate);\n\n\t\tdeactivate = new JButton(\"Deactivate\");\n\t\tdeactivate.addActionListener(new profMainListener());\n\n\t\tdeactivate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tdeactivate.setBounds(390, 340, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(deactivate);\n\n\n\t\t//Aesthetic Pieces\n\t\tJLabel lblCourseList = new JLabel(\"Course List\");\n\t\tlblCourseList.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblCourseList.setFont(new Font(\"Dialog\", Font.BOLD, 16));\n\t\tlblCourseList.setBounds(21, 11, 261, 24);\n\t\tfrmProfessorgui.getContentPane().add(lblCourseList);\n\n\t\tJLabel lblWelcome = new JLabel(\"Welcome\");\n\t\tlblWelcome.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblWelcome.setFont(new Font(\"Dialog\", Font.BOLD, 16));\n\t\tlblWelcome.setBounds(357, 49, 191, 46);\n\t\tfrmProfessorgui.getContentPane().add(lblWelcome);\n\n\t\tJLabel lblNewLabel = new JLabel(prof.getFirstName() + \" \" + prof.getLastName());\n\t\tlblNewLabel.setFont(new Font(\"Dialog\", Font.ITALIC, 16));\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(335, 82, 239, 40);\n\t\tfrmProfessorgui.getContentPane().add(lblNewLabel);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBorder(new LineBorder(new Color(128, 128, 128), 2, true));\n\t\tpanel.setBackground(new Color(204, 255, 255));\n\t\tpanel.setBounds(367, 178, 174, 213);\n\t\tfrmProfessorgui.getContentPane().add(panel);\n\n\t\treturn frmProfessorgui;\n\t}",
"public Chat(){ }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jUserDialog = new javax.swing.JDialog();\n jPanel1 = new javax.swing.JPanel();\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jMessageEntry = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n jChatConvo = new javax.swing.JTextArea();\n jSendButton = new javax.swing.JButton();\n jStatusLine = new javax.swing.JLabel();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItemConnect = new javax.swing.JMenuItem();\n jMenuItemOtherPartyInfo = new javax.swing.JMenuItem();\n jMenuSaveCertInfo = new javax.swing.JMenuItem();\n jMenuItemDisconnect = new javax.swing.JMenuItem();\n\n jButton1.setText(\"Connect\");\n\n jLabel1.setText(\" What user to you want to chat with?\");\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(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jLabel1, 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(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addGap(33, 33, 33))\n );\n\n javax.swing.GroupLayout jUserDialogLayout = new javax.swing.GroupLayout(jUserDialog.getContentPane());\n jUserDialog.getContentPane().setLayout(jUserDialogLayout);\n jUserDialogLayout.setHorizontalGroup(\n jUserDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jUserDialogLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jUserDialogLayout.setVerticalGroup(\n jUserDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\n jChatConvo.setEditable(false);\n jChatConvo.setColumns(20);\n jChatConvo.setLineWrap(true);\n jChatConvo.setRows(5);\n jChatConvo.setWrapStyleWord(true);\n jScrollPane1.setViewportView(jChatConvo);\n\n jSendButton.setText(\"Send\");\n jSendButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jSendButtonActionPerformed(evt);\n }\n });\n\n jStatusLine.setText(\"Status: Initializing\");\n\n jMenu1.setText(\"Connection\");\n\n jMenuItemConnect.setText(\"New Connection...\");\n jMenuItemConnect.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemConnectActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItemConnect);\n\n jMenuItemOtherPartyInfo.setText(\"Other Party Info\");\n jMenuItemOtherPartyInfo.setEnabled(false);\n jMenuItemOtherPartyInfo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemOtherPartyInfoActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItemOtherPartyInfo);\n\n jMenuSaveCertInfo.setText(\"Save Certificate Info\");\n jMenuSaveCertInfo.setEnabled(false);\n jMenuSaveCertInfo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemSaveCertInfoActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuSaveCertInfo);\n \n jMenuItemDisconnect.setText(\"Disconnect\");\n jMenuItemDisconnect.setEnabled(false);\n jMenuItemDisconnect.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemDisconnectActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItemDisconnect);\n\n jMenuBar1.add(jMenu1);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jMessageEntry)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jStatusLine)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSendButton))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 526, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jMessageEntry)\n .addComponent(jSendButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jStatusLine))\n );\n\n pack();\n }",
"String get_MsgFrame(ClientSession csptr) {\n fromID = csptr.getMyID();\n String msgFrame;\n if (mtype == MsgType.GREET) {\n msgFrame = \"\\33[39m[\" + fromID + \"] enters to the Chat.\";\n\n } else if (mtype == MsgType.BYE) {\n msgFrame = \"\\33[39m[\" + fromID + \"] exits from the Chat.\";\n } else if (mtype == MsgType.WHISP) {\n int cur = msgBuffer.indexOf(\" \");\n System.out.println(\"cur: \"+cur);\n msgFrame = csptr.getColorFrame() + \"[DM_\" + fromID + \"] \" + msgBuffer.substring(cur+1);\n } else if (mtype == MsgType.BROAD) {\n msgFrame = csptr.getColorFrame() + \"[\" + fromID + \"] \" + msgBuffer;\n } else {\n msgFrame = \"\";\n }\n return msgFrame;\n }"
] | [
"0.6714546",
"0.66212344",
"0.65663457",
"0.656171",
"0.6505759",
"0.64770114",
"0.6420834",
"0.64027596",
"0.63900775",
"0.63824886",
"0.6332738",
"0.6325345",
"0.630826",
"0.62653613",
"0.6236725",
"0.6231431",
"0.6230276",
"0.62241846",
"0.6221226",
"0.6217778",
"0.62048924",
"0.620456",
"0.62015516",
"0.6190042",
"0.6165137",
"0.6165137",
"0.6165137",
"0.6165137",
"0.6165137",
"0.6165137",
"0.6165137",
"0.61561584",
"0.613243",
"0.6130417",
"0.6120681",
"0.6115954",
"0.61065745",
"0.60995793",
"0.6095665",
"0.60876644",
"0.6078211",
"0.6075756",
"0.6064883",
"0.6051035",
"0.6030096",
"0.60256255",
"0.59747106",
"0.5972166",
"0.5967676",
"0.5954712",
"0.59491783",
"0.59456134",
"0.5931447",
"0.5926968",
"0.59260213",
"0.5921076",
"0.5912986",
"0.5906496",
"0.5897313",
"0.5896769",
"0.5894446",
"0.5893975",
"0.5886285",
"0.58843595",
"0.5870808",
"0.5867529",
"0.5867529",
"0.5864479",
"0.58585477",
"0.5853167",
"0.58508253",
"0.5850407",
"0.58359396",
"0.58344436",
"0.58224106",
"0.5822077",
"0.5818845",
"0.5809829",
"0.58055955",
"0.58032835",
"0.5798246",
"0.5797081",
"0.5795148",
"0.57827014",
"0.57709706",
"0.57686263",
"0.57680875",
"0.57538867",
"0.5750327",
"0.5745367",
"0.5741538",
"0.573651",
"0.5735903",
"0.57325876",
"0.57291317",
"0.57290727",
"0.5725711",
"0.57198197",
"0.5718793",
"0.5717789"
] | 0.77232003 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
chatList = new javax.swing.JList<>();
chatText = new javax.swing.JTextField();
sendButton = new javax.swing.JButton();
clearButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
setTitle("ChatFrame");
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
formWindowClosing(evt);
}
});
chatList.setModel(new DefaultListModel());
chatList.setCellRenderer(new ChatMessageRenderer());
jScrollPane1.setViewportView(chatList);
sendButton.setText("send");
clearButton.setText("clear");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(chatText, javax.swing.GroupLayout.PREFERRED_SIZE, 618, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sendButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(clearButton)
.addContainerGap(41, Short.MAX_VALUE))
.addComponent(jScrollPane1)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(chatText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sendButton)
.addComponent(clearButton)))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public Oddeven() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public kunde() {\n initComponents();\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\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 .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\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 .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\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.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\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.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\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 .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public CovidGUI(){\n initComponents();\n }"
] | [
"0.73197734",
"0.72908777",
"0.72908777",
"0.72908777",
"0.72870827",
"0.7248368",
"0.7213462",
"0.7208004",
"0.7195763",
"0.7189973",
"0.7184436",
"0.7159332",
"0.71478266",
"0.709268",
"0.7080727",
"0.7057287",
"0.6986775",
"0.6977119",
"0.69554067",
"0.69548035",
"0.6945748",
"0.69436246",
"0.6936225",
"0.69309264",
"0.6927764",
"0.6925464",
"0.69240505",
"0.6911828",
"0.69114214",
"0.6893614",
"0.68917346",
"0.6891525",
"0.6891501",
"0.6889125",
"0.68829834",
"0.6882533",
"0.68808794",
"0.687905",
"0.687687",
"0.68740726",
"0.68708014",
"0.68595254",
"0.68561274",
"0.68560076",
"0.6854643",
"0.6854604",
"0.6853724",
"0.685311",
"0.685311",
"0.6844816",
"0.6836794",
"0.6835743",
"0.68294543",
"0.6828841",
"0.682637",
"0.68245006",
"0.6823792",
"0.68175477",
"0.6817179",
"0.6811031",
"0.68096155",
"0.6809008",
"0.68087083",
"0.68081945",
"0.6801884",
"0.6795609",
"0.6793828",
"0.67930275",
"0.67915165",
"0.6789997",
"0.6788734",
"0.6788487",
"0.67816335",
"0.67663425",
"0.6765744",
"0.67648494",
"0.6757314",
"0.6755897",
"0.67526966",
"0.6750367",
"0.67429197",
"0.67399955",
"0.6736908",
"0.6736084",
"0.6734342",
"0.6726562",
"0.67264515",
"0.67205596",
"0.6716381",
"0.67154187",
"0.67150515",
"0.6709329",
"0.6708348",
"0.67050624",
"0.67021835",
"0.6700595",
"0.6699073",
"0.6698866",
"0.66942847",
"0.6690904",
"0.66897583"
] | 0.0 | -1 |
End of variables declaration//GENEND:variables | public void addMessage(TextMessagePacket messagePacket) {
DefaultListModel m = (DefaultListModel) this.chatList.getModel();
m.addElement(messagePacket);
this.scrollDown();
this.revalidate();
this.repaint();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void mo21779D() {\n }",
"public final void mo51373a() {\n }",
"protected boolean func_70041_e_() { return false; }",
"public void mo4359a() {\n }",
"public void mo21782G() {\n }",
"private void m50366E() {\n }",
"public void mo12930a() {\n }",
"public void mo115190b() {\n }",
"public void method_4270() {}",
"public void mo1403c() {\n }",
"public void mo3376r() {\n }",
"public void mo3749d() {\n }",
"public void mo21793R() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void mo21787L() {\n }",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo21780E() {\n }",
"public void mo21792Q() {\n }",
"public void mo21791P() {\n }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo97908d() {\n }",
"public void mo21878t() {\n }",
"public void mo9848a() {\n }",
"public void mo21825b() {\n }",
"public void mo23813b() {\n }",
"public void mo3370l() {\n }",
"public void mo21879u() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo21785J() {\n }",
"public void mo21795T() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void m23075a() {\n }",
"public void mo21789N() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo21794S() {\n }",
"public final void mo12688e_() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo6944a() {\n }",
"public static void listing5_14() {\n }",
"public void mo1405e() {\n }",
"public final void mo91715d() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo9137b() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void func_70295_k_() {}",
"void mo57277b();",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"void berechneFlaeche() {\n\t}",
"public void mo115188a() {\n }",
"public void mo21880v() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo21784I() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public void mo56167c() {\n }",
"public void mo44053a() {\n }",
"public void mo21781F() {\n }",
"public void mo2740a() {\n }",
"public void mo21783H() {\n }",
"public void mo1531a() {\n }",
"double defendre();",
"private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }",
"public void stg() {\n\n\t}",
"void m1864a() {\r\n }",
"private void poetries() {\n\n\t}",
"public void skystonePos4() {\n }",
"public void mo2471e() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void yy() {\n\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }",
"static void feladat4() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"public void furyo ()\t{\n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"protected void mo6255a() {\n }"
] | [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.58814824",
"0.5854075",
"0.5851759",
"0.58514243",
"0.58418584",
"0.58395296",
"0.5835063",
"0.582234",
"0.58090156",
"0.5802706",
"0.5793836",
"0.57862717",
"0.5784062",
"0.5783567",
"0.5782131",
"0.57758564",
"0.5762871",
"0.5759349",
"0.5745087",
"0.57427835",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.57326084",
"0.57301426",
"0.57266665",
"0.57229686",
"0.57175463",
"0.5705802",
"0.5698347",
"0.5697827",
"0.569054",
"0.5689405",
"0.5686434",
"0.56738997",
"0.5662217",
"0.56531453",
"0.5645255",
"0.5644223",
"0.5642628",
"0.5642476",
"0.5640595",
"0.56317437",
"0.56294966",
"0.56289655",
"0.56220204",
"0.56180173",
"0.56134313",
"0.5611337",
"0.56112075",
"0.56058615",
"0.5604383",
"0.5602629",
"0.56002104",
"0.5591573",
"0.55856615",
"0.5576992",
"0.55707216",
"0.5569681",
"0.55570376",
"0.55531484",
"0.5551123",
"0.5550893",
"0.55482954",
"0.5547471",
"0.55469507",
"0.5545719",
"0.5543553",
"0.55424106",
"0.5542057",
"0.55410767",
"0.5537739",
"0.55269134",
"0.55236584",
"0.55170715",
"0.55035424",
"0.55020875"
] | 0.0 | -1 |
Created by interface on 2017/2/16. | @Repository
public interface ProductDAO extends BaseDAO<Product> {
public List<Product> queryByPagerAndCriteria(@Param("pager")Pager4EasyUI<Product> pager, @Param("product")Product t);
public int countByCriteria(Product t);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void interr() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n 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\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void anular() {\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 protected void initialize() {\n\n \n }",
"@Override\n public void init() {}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n protected void init() {\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\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \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 init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@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 void mo38117a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"Consumable() {\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }"
] | [
"0.623372",
"0.6096103",
"0.6077073",
"0.6053847",
"0.59988683",
"0.59988683",
"0.5945949",
"0.5857009",
"0.5853034",
"0.5837431",
"0.5813736",
"0.58012795",
"0.57978094",
"0.5796985",
"0.5779782",
"0.576935",
"0.576935",
"0.576935",
"0.576935",
"0.576935",
"0.576935",
"0.5768581",
"0.5748062",
"0.5739529",
"0.5739529",
"0.5739529",
"0.5739529",
"0.5739529",
"0.573494",
"0.573259",
"0.57294714",
"0.57219154",
"0.5715046",
"0.57114244",
"0.57098216",
"0.5707386",
"0.5700389",
"0.5685197",
"0.5684099",
"0.5684099",
"0.56684214",
"0.56608653",
"0.56553775",
"0.56551665",
"0.56551665",
"0.564867",
"0.564867",
"0.5639343",
"0.56359303",
"0.5621834",
"0.5621834",
"0.5621834",
"0.562015",
"0.562015",
"0.562015",
"0.55952996",
"0.55952996",
"0.55952996",
"0.5593718",
"0.5579296",
"0.5577782",
"0.5575007",
"0.5572168",
"0.5572153",
"0.556281",
"0.5560067",
"0.55559194",
"0.5555661",
"0.55518246",
"0.5546317",
"0.5537999",
"0.5537999",
"0.5537999",
"0.5536884",
"0.55355436",
"0.5531734",
"0.55237615",
"0.5519578",
"0.55190057",
"0.5518669",
"0.5517999",
"0.55110806",
"0.54866606",
"0.5470408",
"0.5468347",
"0.54679394",
"0.54679394",
"0.5463712",
"0.5458869",
"0.54569393",
"0.5455369",
"0.5452036",
"0.54464495",
"0.54452926",
"0.5436851",
"0.5430252",
"0.5426523",
"0.5426523",
"0.5426523",
"0.5426523",
"0.5426523"
] | 0.0 | -1 |
This service handles logic behind Notes | public interface NoteService {
/**
* Retrieves all notes from the database and converts it to a model that's exposed through the API
*
* @return the collection of notes {@link List<NoteView>}
* @throws ApiErrorException if there is an issue
*/
List<NoteView> getAllNotes();
/**
* Retrieves a single note {@link NoteView} from the database by the given id and converts it to a model
* that's exposed through the API
*
* @param id the Id of the note we want to retrieve
* @throws ApiErrorException if there is an issue
*/
NoteView getNoteById(long id);
/**
* Creates a new note from the noteForm {@link NoteForm} object
* @throws ApiErrorException if there is an issue
*/
void createNote(NoteForm noteForm);
/**
* Updates an existing note from the noteForm {@link NoteForm} object
* @throws ApiErrorException if there is an issue
*/
void updateNote(NoteForm noteForm);
/**
* Deletes single note with given id
*
* @param id the Id of the note we want to delete
* @throws ApiErrorException if there is an issue
*/
void deleteNoteByNoteId(long id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface NoteService {\n //添加公告\n void addNote(Note note);\n\n //根据id删除公告\n void removeNote(Integer id);\n\n //修改公告\n void modifyNote(Note note);\n\n //根据id查询公告\n Note findNoteById(Integer id);\n\n //获得所有公告\n List<Note> findNote(Note note);\n}",
"public interface NoteService {\n\n Notes createNote(Notes notes);\n\n List<Notes> getNotesByUserId(String userId);\n\n Notes updateNote(String id, Notes notes);\n\n void deleteNote(String id);\n}",
"public interface NoteService {\n\t\n\tpublic List<NoteDto> getAllNotes(NoteDto noteDto);\n\t\n\tpublic NoteDto getNoteByNoteId(NoteDto noteDto);\n\t\n\tpublic NoteDto saveNote(NoteDto noteDto);\n\t\n\tpublic void updateNote(NoteDto noteDto);\n\t\n\tpublic void deleteAllNotes(NoteDto noteDto);\n\t\n\tpublic void deleteNote(NoteDto noteDto);\n\n}",
"private Notes() {}",
"public Notes() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public void setNotes(String notes) {\n this.notes = notes;\n }",
"public void setNotes(String notes) {\n\tthis.notes = notes;\n}",
"public interface CustDataNotesService {\n\t/**\n\t * Method for retrieving all CustDataNotes details\n\t * \n\t * @return List<CustDataNotesResponseDTO>\n\t * @throws Exception\n\t */\n List<CustDataNotesResponseDTO> getAll() throws Exception;\n\n\t/**\n\t * Method for retrieving CustDataNotes with given id\n\t * \n\t * @param custNo\n\t * @return CustDataNotesResponseDTO\n\t * @throws Exception\n\t */\n CustDataNotesResponseDTO getById(String id) throws Exception;\n\n /**\n\t * Method for saving CustDataNotes\n\t * \n\t * @param CustDataNotesRequestDTO\n\t * @return CustDataNotesResponseDTO\n\t * @throws Exception\n\t */\n\tCustDataNotesResponseDTO saveCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;\n\n\t/**\n\t * This is the main method which is used to search CustDataNotes dynamically\n\t * \n\t * @param CustDataNotesRequestDTO\n\t * @return List<CustDataNotesResponseDTO>\n\t */\n\tList<CustDataNotesResponseDTO> searchForCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;\n\n\t/**\n\t * Method for deleting CustDataNotes\n\t * \n\t * @param id\n\t * @return CustDataNotesResponseDTO\n\t * @throws Exception\n\t */\n\tCustDataNotesResponseDTO deleteCustDataNotes(String id) throws Exception;\n\t\n\t/**\n\t * Method for updating CustDataNotes\n\t * \n\t * @param id\n\t * @param CustDataNotesRequestDTO\n\t * @return CustDataNotesResponseDTO\n\t * @throws Exception\n\t */\n\tCustDataNotesResponseDTO updateCustDataNotes(String id,CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;\n\t\n\t\n}",
"public interface NoteService {\n\n /**\n * Save a note.\n *\n * @param noteDTO\n * the entity to save\n * @return the persisted entity\n */\n NoteDTO save(NoteDTO noteDTO);\n\n /**\n * Get all the notes.\n *\n * @param pageable\n * the pagination information\n * @return the list of entities\n */\n Page<NoteDTO> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" note.\n *\n * @param id\n * the id of the entity\n * @return the entity\n */\n NoteDTO findOne(Long id);\n \n /**\n * Find one entity.\n *\n * @param id the id\n * @return the note\n */\n Note findOneEntity(Long id);\n \n /**\n * Gets the one entity.\n *\n * @param id the id\n * @return the one entity\n */\n Note getOneEntity(Long id);\n\n /**\n * Delete the \"id\" note.\n *\n * @param id\n * the id of the entity\n */\n void delete(Long id);\n\n /**\n * Search for the note corresponding to the query.\n *\n * @param query\n * the query of the search\n * \n * @param pageable\n * the pagination information\n * @return the list of entities\n */\n Page<NoteDTO> search(String query, Pageable pageable);\n\n /**\n * Creates the note for login user.\n *\n * @param login the login\n * @param createNoteDTO the create note DTO\n * @return the note DTO\n */\n NoteDTO create(String login, CreateNoteDTO createNoteDTO);\n\n /**\n * Update the note for login user.\n *\n * @param login the login\n * @param noteDTO the note DTO\n * @return the note DTO\n */\n @Deprecated\n NoteDTO update(String login, NoteDTO noteDTO);\n\n /**\n * Map to dto.\n *\n * @param listNotes the list notes\n * @return the list\n */\n List<NoteDTO> mapToDto(List<Note> listNotes);\n \n /**\n * Map to dto.\n *\n * @param note the note\n * @return the note DTO\n */\n NoteDTO mapToDto(Note note);\n \n /**\n * Map to dto base on custom user.\n *\n * @param listNotes the list notes\n * @param customUser the custom user\n * @return the list\n */\n List<NoteDTO> mapToDtoBaseOnCustomUser(Collection<Note> listNotes, CustomUser customUser);\n}",
"public void setNotes(String notes) {\n\t\tthis.notes = notes;\r\n\t}",
"public void setNotes(String notes) {\n\t\tthis.notes = notes;\n\t}",
"public void setNotes(java.lang.String notes) {\n this.notes = notes;\n }",
"private void createNote(NewNoteInput note, QueryService service) {\n if ((note.body() == null || note.body().isEmpty()) &&\n (note.title() == null || note.title().isEmpty())) {\n Log.i(LOG_TAG, \"skipped upload of note with empty body\");\n return;\n }\n\n service.createNote(note, (e, response) -> {\n runOnUiThread(() -> {\n if (e != null) {\n Log.e(LOG_TAG, e.getMessage());\n Toast.makeText(getApplicationContext(), getString(R.string.network_err),\n Toast.LENGTH_LONG).show();\n } else {\n Log.i(LOG_TAG, \"note created\");\n Toast.makeText(getApplicationContext(), getString(R.string.activity_note_ncreate),\n Toast.LENGTH_SHORT).show();\n\n finish();\n }\n });\n });\n }",
"public String getNotes();",
"String getNotes();",
"java.lang.String getNotes();",
"java.lang.String getNotes();",
"public void setNotes(String notes);",
"public void setNote(String note) {\r\n this.note = note; \r\n }",
"public String getNotes() {\n\treturn notes;\n}",
"void setNotes(String notes);",
"public String getNotes() {\n return notes;\n }",
"public void setDocumentNote (String DocumentNote);",
"public String getNotes() {\n return notes;\n }",
"public String getDocumentNote();",
"@GetMapping(\"/notes\")\n public List<Note> getAllNotes() {\n List<Note> temp = noteService.getAllNotes();\n return temp;\n }",
"interface WithNotes {\n /**\n * Specifies the notes property: Notes about the lock. Maximum of 512 characters..\n *\n * @param notes Notes about the lock. Maximum of 512 characters.\n * @return the next definition stage.\n */\n Update withNotes(String notes);\n }",
"String saveNote(NoteModel noteModel) throws ManagerException ;",
"public void setNote(String note) {\r\n this.note = note;\r\n }",
"public void setNotes(com.sforce.soap.enterprise.QueryResult notes) {\r\n this.notes = notes;\r\n }",
"interface WithNotes {\n /**\n * Specifies the notes property: Notes about the lock. Maximum of 512 characters..\n *\n * @param notes Notes about the lock. Maximum of 512 characters.\n * @return the next definition stage.\n */\n WithCreate withNotes(String notes);\n }",
"@Override\n\tpublic String getNotes() {\n\t\treturn text;\n\t}",
"public abstract NoteDao noteDao();",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public void setNote(String note) {\n this.note = note;\n }",
"public interface PatientService {\n\n /**\n * 新增病人获取ID\n *\n * @return\n */\n Long getNewPid(Patient patient);\n\n /**\n * 新增病人\n *\n * @param patient\n * @return\n */\n JSONObject newPatient(Patient patient);\n\n\n /**\n * 复诊输入病人条件查询\n *\n * @param patient\n * @return\n */\n JSONObject revisit(Patient patient);\n\n\n /**\n * 获取地址列表\n * @return\n */\n JSONObject getPlace();\n\n\n /**\n * 获取病人列表\n * @return\n */\n JSONObject getPatientList(String pName,Integer pageSize,Integer pageNum);\n\n\n /**\n * 获取病人基本信息\n * @param pId\n * @return\n */\n JSONObject getPatientInfo(Long pId);\n\n /**\n * 更新病人基本信息\n * @param patient\n * @return\n */\n JSONObject updatePatientInfo(Patient patient);\n\n\n /**\n * 复诊时,有重复条件者获取病人列表\n */\n JSONObject getRevisitList(Patient patient,Integer pageSize,Integer pageNum);\n\n\n /**\n * 删除病人\n * @param patientId\n * @return\n */\n JSONObject deletePatient(Long patientId);\n\n /**\n * 将选中的病人的病历保存到Word文档\n */\n void saveObjToWord(List<Long> inquiryIdList, boolean all,Long patientId, HttpServletResponse response);\n}",
"WithCreate withNotes(String notes);",
"public void setNote(String note) {\r\n\r\n this.note = note;\r\n }",
"public void setNotes(java.lang.String param) {\r\n localNotesTracker = param != null;\r\n\r\n this.localNotes = param;\r\n }",
"public void setNote(String note);",
"boolean getNotes();",
"public final void setNotes(java.lang.String notes)\n\t{\n\t\tsetNotes(getContext(), notes);\n\t}",
"public List<Note> getNotes(){\n return notes;\n }",
"public interface InfoService {\n /**\n * 以下方法为通知管理模块功能\n */\n List<Info> getAll();\n\n int insert(Info info);\n}",
"public interface JournalService {\n public void addTJournal(TJournal journal);\n\n public void updateTJournal(TJournal journal);\n\n public void deleteTJournal(String id);\n\n public TJournal getTJournal(String id);\n\n public List<TJournal> getAllTJournal(final PageBean pageBean);\n\n public int getAllTJournalCount();\n\n public List<TJournal> getSelectedTJournal(String queryString);\n\n public List<TJournal> getSelectedTJournal(String userId, String userName, String journalLoginip, Date journalLogintime, Date journalQuitime, final PageBean pageBean);\n\n public int getSelectedTJournalCount(String userId, String userName, String journalLoginip, Date journalLogintime, Date journalQuitime);\n}",
"public interface ContentService {\n /**\n * 添加内容\n * @param content\n * @return\n */\n TaotaoResult addContent(TbContent content);\n\n /**\n * 根据id查询内容\n * @param cid\n * @return\n */\n List<TbContent> getContentListByCid(long cid);\n}",
"public String getNotes() {\n\t\treturn notes;\n\t}",
"public interface NoticeService {\n /**\n * 根据手机号获取用户信息\n * */\n public ServiceResult<Notice> getByMobile(String mobile);\n}",
"public interface NotesCalendarEntry extends Base<lotus.domino.NotesCalendarEntry>, lotus.domino.NotesCalendarEntry {\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#accept(java.lang.String)\n\t */\n\t@Override\n\tpublic void accept(String comments);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#accept(java.lang.String, int, java.lang.String)\n\t */\n\t@Override\n\tpublic void accept(String comments, int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#cancel(java.lang.String)\n\t */\n\t@Override\n\tpublic void cancel(String comments);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#cancel(java.lang.String, int, java.lang.String)\n\t */\n\t@Override\n\tpublic void cancel(String comments, int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#counter(java.lang.String, lotus.domino.DateTime, lotus.domino.DateTime)\n\t */\n\t@Override\n\tpublic void counter(String comments, lotus.domino.DateTime start, lotus.domino.DateTime end);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#counter(java.lang.String, lotus.domino.DateTime, lotus.domino.DateTime, boolean)\n\t */\n\t@Override\n\tpublic void counter(String comments, lotus.domino.DateTime start, lotus.domino.DateTime end, boolean keepPlaceholder);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#counter(java.lang.String, lotus.domino.DateTime, lotus.domino.DateTime, boolean, int,\n\t * java.lang.String)\n\t */\n\t@Override\n\tpublic void counter(String comments, lotus.domino.DateTime start, lotus.domino.DateTime end, boolean keepPlaceholder, int scope,\n\t\t\tString recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#counter(java.lang.String, lotus.domino.DateTime, lotus.domino.DateTime, int, java.lang.String)\n\t */\n\t@Override\n\tpublic void counter(String comments, lotus.domino.DateTime start, lotus.domino.DateTime end, int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#decline(java.lang.String)\n\t */\n\t@Override\n\tpublic void decline(String comments);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#decline(java.lang.String, boolean)\n\t */\n\t@Override\n\tpublic void decline(String comments, boolean keepInformed);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#decline(java.lang.String, boolean, int, java.lang.String)\n\t */\n\t@Override\n\tpublic void decline(String comments, boolean keepInformed, int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#delegate(java.lang.String, java.lang.String)\n\t */\n\t@Override\n\tpublic void delegate(String commentsToOrganizer, String delegateTo);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#delegate(java.lang.String, java.lang.String, boolean)\n\t */\n\t@Override\n\tpublic void delegate(String commentsToOrganizer, String delegateTo, boolean keepInformed);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#delegate(java.lang.String, java.lang.String, boolean, int, java.lang.String)\n\t */\n\t@Override\n\tpublic void delegate(String commentsToOrganizer, String delegateTo, boolean keepInformed, int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#delegate(java.lang.String, java.lang.String, int, java.lang.String)\n\t */\n\t@Override\n\tpublic void delegate(String commentsToOrganizer, String delegateTo, int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#getAsDocument()\n\t */\n\t@Override\n\tpublic Document getAsDocument();\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#getAsDocument(int)\n\t */\n\t@Override\n\tpublic Document getAsDocument(int flags);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#getAsDocument(int, java.lang.String)\n\t */\n\t@Override\n\tpublic Document getAsDocument(int flags, String recurrenceId);\n\n\tpublic NotesCalendar getParent();\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#getNotices()\n\t */\n\t@Override\n\tpublic Vector<NotesCalendarNotice> getNotices();\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#getUID()\n\t */\n\t@Override\n\tpublic String getUID();\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#read()\n\t */\n\t@Override\n\tpublic String read();\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#read(java.lang.String)\n\t */\n\t@Override\n\tpublic String read(String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#remove()\n\t */\n\t@Override\n\tpublic void remove();\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#remove(int, java.lang.String)\n\t */\n\t@Override\n\tpublic void remove(int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#requestInfo(java.lang.String)\n\t */\n\t@Override\n\tpublic void requestInfo(String comments);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#tentativelyAccept(java.lang.String)\n\t */\n\t@Override\n\tpublic void tentativelyAccept(String comments);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#tentativelyAccept(java.lang.String, int, java.lang.String)\n\t */\n\t@Override\n\tpublic void tentativelyAccept(String comments, int scope, String recurrenceId);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#update(java.lang.String)\n\t */\n\t@Override\n\tpublic void update(String iCalEntry);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#update(java.lang.String, java.lang.String)\n\t */\n\t@Override\n\tpublic void update(String iCalEntry, String comments);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#update(java.lang.String, java.lang.String, long)\n\t */\n\t@Override\n\tpublic void update(String iCalEntry, String comments, long flags);\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see lotus.domino.NotesCalendarEntry#update(java.lang.String, java.lang.String, long, java.lang.String)\n\t */\n\t@Override\n\tpublic void update(String iCalEntry, String comments, long flags, String recurrenceId);\n\n}",
"public interface EavropDocumentService {\n\t\n\n\t/**\n\t * Adds to the eavrop an externally received document, will potentially affect the start date of the eavrop assessment period \n\t *\n\t * @param aCommand\n\t */\n\tpublic boolean addReceivedExternalDocument(AddReceivedExternalDocumentsCommand aCommand);\n\n\t/**\n\t * Adds to the eavrop an internally received document \n\t *\n\t * @param aCommand\n\t */\n\tpublic void addReceivedInternalDocument(AddReceivedInternalDocumentCommand aCommand);\n\n\t/**\n\t * Adds to the eavrop a requested document\n\t * @param aCommand\n\t */\n\tpublic RequestedDocument addRequestedDocument(AddRequestedDocumentCommand aCommand);\n\n}",
"QuoteNote createQuoteNote();",
"public String getNote() {\r\n return note; \r\n }",
"public java.lang.String getNotes() {\n return notes;\n }",
"public interface INotifyRecordService {\n /**\n *\n * @param entity\n * @return\n */\n NotifyRecord save(NotifyRecord entity);\n\n PageBean<NotifyRecord> findListPage(NotifyRecordVO info);\n\n /**\n *\n * @param nid\n */\n void sendMessage(int nid);\n\n NotifyRecord update(NotifyRecord entity);\n\n /**\n *\n * @param id\n * @return\n */\n NotifyRecord findOne(Integer id);\n}",
"@Override\r\n\t\t\t\t\tpublic void sendNoteOn(NoteOn noteOn) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public interface ISysPostService extends IBaseService<SysPost> {\n /**\n * Description: 根据部门ID查询该部门下所有的岗位信息\n * Name:finaPostByDiv\n * Author:dyenigma\n * Time:2016/4/27 8:36\n * param:[id]\n * return:java.util.List<com.dyenigma.entity.Post>\n */\n List<SysPost> finaPostByDiv(String id);\n\n /**\n * Description: 新增或修改岗位信息\n * Name:persistencePost\n * Author:dyenigma\n * Time:2016/4/27 9:17\n * param:[post]\n * return:java.lang.Boolean\n */\n Boolean persistencePost(SysPost post);\n\n /**\n * Description: 获取所有可添加岗位的公司和部门\n * Name:getCoDivList\n * Author:dyenigma\n * Time:2016/4/27 10:02\n * param:[]\n * return:java.util.List<com.dyenigma.model.TreeModel>\n */\n List<TreeModel> getCoDivList();\n\n boolean delPostById(String postId);\n\n\n /**\n * Description: 设置某个记录无效\n * Name:invalidByPrimaryKey\n * Author:dyenigma\n * Time:2016/4/27 9:02\n * param:[id]\n * return:int\n */\n int invalidByPrimaryKey(String id);\n}",
"private void saveNote()\n\t{\n\t\tString text = ((EditText) findViewById(R.id.note_edittext)).getText().toString();\n\t\tNoteDbWorker worker = new NoteDbWorker(this);\n\t\tworker.updateNote(user.userName, text);\n\t\tworker.close();\n\t\tToast.makeText(this, getString(R.string.note_saved), Toast.LENGTH_LONG).show();\n\t}",
"String get_note()\n {\n return note;\n }",
"public final void setNotes(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String notes)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Notes.toString(), notes);\n\t}",
"public interface NoteView extends View{\n void showNotesResponse(Object response);\n void showNoteByUserIdAndEntityIdResponse (NoteResponse notesResponse);\n void showCreateProductNoteResponse(CreateProductNoteResponse createProductNoteResponse);\n}",
"List<MyNoteDto> getAllMyNotes();",
"public interface INoteInteraction {\n\n void onNoteSelected(Document document);\n\n}",
"public String getNote() {\r\n return note;\r\n }",
"public String getNote() {\r\n return note;\r\n }",
"@Override\n\tpublic List<Note> showNotes() {\n\t\t\n\t\treturn noterepository.findAll();\n\t}",
"void setNote(int note) {\n\t\tthis.note = note;\n\t}",
"public String getNote(){\r\n\t\treturn note;\r\n\t}",
"public interface PmlEdmDocumentRecordToLocalService {\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo addPmlEdmDocumentRecordTo(\n com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo pmlEdmDocumentRecordTo)\n throws com.liferay.portal.SystemException;\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo createPmlEdmDocumentRecordTo(\n long documentRecordToId);\n\n public void deletePmlEdmDocumentRecordTo(long documentRecordToId)\n throws com.liferay.portal.SystemException,\n com.liferay.portal.PortalException;\n\n public void deletePmlEdmDocumentRecordTo(\n com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo pmlEdmDocumentRecordTo)\n throws com.liferay.portal.SystemException;\n\n public java.util.List<Object> dynamicQuery(\n com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)\n throws com.liferay.portal.SystemException;\n\n public java.util.List<Object> dynamicQuery(\n com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,\n int end) throws com.liferay.portal.SystemException;\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo getPmlEdmDocumentRecordTo(\n long documentRecordToId)\n throws com.liferay.portal.SystemException,\n com.liferay.portal.PortalException;\n\n public java.util.List<com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo> getPmlEdmDocumentRecordTos(\n int start, int end) throws com.liferay.portal.SystemException;\n\n public int getPmlEdmDocumentRecordTosCount()\n throws com.liferay.portal.SystemException;\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo updatePmlEdmDocumentRecordTo(\n com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo pmlEdmDocumentRecordTo)\n throws com.liferay.portal.SystemException;\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo getDocumentRecordTo(\n java.lang.String yearInUse, java.lang.String departmentsId,\n int documentRecordTypeId);\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo getDocumentRecordToBy_YearInUse_AgencyId_DocumentRecordTypeId(\n java.lang.String yearInUse, java.lang.String agencyId,\n int documentRecordTypeId);\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo getDocumentRecordTo(\n java.lang.String departmentsId, int documentRecordTypeId,\n java.lang.String agencyId);\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo getDocumentRecordToByDocumentReceipt(\n long documentReceiptId);\n\n public int getDocumentRecordTypeIdByDocumentReceipt(long documentReceiptId);\n\n public java.lang.String getDepartmentIdByUserId(long userId);\n\n public boolean addBookDocumentRecordTo(\n com.sgs.portlet.document.receipt.model.PmlEdmBookDocumentRecordTo bookDocumentRecordTo);\n\n public com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo getDocumentRecordToBy_DocumentType_AgencyId(\n long documentTypeId, java.lang.String agencyId);\n\n public java.lang.String getAgencyIdByDepartment(\n com.sgs.portlet.department.model.Department department);\n\n public int searchCountSoCongVanDenSo(java.lang.String keywords)\n throws com.liferay.portal.SystemException;\n\n public int searchCountSoCongVanDenSo(java.lang.String loaiSoCVs,\n java.lang.String so, boolean andOperator)\n throws com.liferay.portal.SystemException;\n\n public java.util.List<com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo> searchSoCongVanDenSo(\n java.lang.String keywords, int start, int end,\n com.liferay.portal.kernel.util.OrderByComparator obc)\n throws com.liferay.portal.SystemException;\n\n public java.util.List<com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo> searchSoCongVanDenSo(\n java.lang.String loaiSoCVs, java.lang.String so, boolean andOperator,\n int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)\n throws com.liferay.portal.SystemException;\n\n public int searchCountSoCongVanDenPB(java.lang.String keywords)\n throws com.liferay.portal.SystemException;\n\n public int searchCountSoCongVanDenPB(java.lang.String loaiSoCVs,\n java.lang.String phongBan, boolean andOperator)\n throws com.liferay.portal.SystemException;\n\n public java.util.List<com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo> searchSoCongVanDenPB(\n java.lang.String keywords, int start, int end,\n com.liferay.portal.kernel.util.OrderByComparator obc)\n throws com.liferay.portal.SystemException;\n\n public java.util.List<com.sgs.portlet.document.receipt.model.PmlEdmDocumentRecordTo> searchSoCongVanDenPB(\n java.lang.String loaiSoCVs, java.lang.String phongBan,\n boolean andOperator, int start, int end,\n com.liferay.portal.kernel.util.OrderByComparator obc)\n throws com.liferay.portal.SystemException;\n\n public void removePmlEdmPrivilegeLevel(long documentRecordToId)\n throws com.liferay.portal.PortalException,\n com.liferay.portal.SystemException;\n}",
"@RequestMapping(\"/agent/enrollment/note\")\n @ResponseBody\n public StatusDTO saveNote(@RequestParam(\"id\") long ticketId, @RequestParam(\"note\") String note) {\n String signature = \"EnrollmentController#saveNote(long id, String note)\";\n LogUtil.traceEntry(getLog(), signature, new String[] { \"id\", \"note\" }, new Object[] { ticketId, note });\n\n if (note == null || note.trim().length() == 0) {\n throw new IllegalArgumentException(\"A note must be provided.\");\n }\n\n StatusDTO statusDTO = new StatusDTO();\n CMSUser user = ControllerHelper.getCurrentUser();\n try {\n enrollmentService.addNoteToTicket(user, ticketId, note);\n statusDTO.setSuccess(true);\n } catch (PortalServiceException ex) {\n LogUtil.traceError(getLog(), signature, ex);\n statusDTO.setMessage(USER_ERROR_MSG);\n }\n\n return LogUtil.traceExit(getLog(), signature, statusDTO);\n }",
"public void setNote(String note) {\n\t\tthis.note = note;\n\t}",
"CustDataNotesResponseDTO saveCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;",
"public String getNote()\n {\n return note;\n }",
"protected void createNewDocumentNote(NoteData newNote) {\n /**\n * get data from the server about tags\n */\n String url = globalVariable.getConfigurationData().getServerURL()\n + globalVariable.getConfigurationData().getApplicationInfixURL()\n + globalVariable.getConfigurationData().getRestDocumentAddNotesURL();\n Log.i(LOG_TAG, \"REST - create new doc notes - call: \" + url);\n\n String postBody = RESTUtils.getJSON(newNote);\n\n AppCompatActivity activity = (AppCompatActivity)getActivity();\n RESTUtils.executePOSTNoteCreationRequest(url, postBody, null, \"\", globalVariable, DocumentTaggingActivity.PROPERTY_BAG_KEY, activity);\n\n // mDataArray = TagItemDataHelper.getAlphabetData();\n }",
"private void updateNote(NewNoteInput note, QueryService service) {\n boolean isTagListSame = new TreeSet<>(mNote.tags()).equals(mTags);\n\n if (note.body().equals(mNote.body()) && note.title().equals(mNote.title()) && isTagListSame) {\n Log.i(LOG_TAG, \"skipped update of unchanged note\");\n return;\n }\n\n // The single spaces are like clear commands. This is a hack around\n // the express graphql implementation.\n EditNoteInput.Builder builder = EditNoteInput.builder()\n .id(mNote.id())\n .title((note.title() == null || note.title().isEmpty()) && mNote.title() != null ? \" \" : note.title())\n .body((note.body() == null || note.body().isEmpty()) && !mNote.body().isEmpty() ? \" \" : note.body())\n .tags(isTagListSame ? null : note.tags());\n\n service.editNote(builder.build(), (e, response) -> {\n runOnUiThread(() -> {\n if (e != null) {\n Log.e(LOG_TAG, e.getMessage());\n Toast.makeText(getApplicationContext(), getString(R.string.network_err),\n Toast.LENGTH_LONG).show();\n } else {\n Log.i(LOG_TAG, \"note updated\");\n Toast.makeText(getApplicationContext(), getString(R.string.activity_note_nupdate),\n Toast.LENGTH_SHORT).show();\n\n finish();\n }\n });\n });\n }",
"public Note() {\n //uig = new UniqueIdGenerator();\n noteId = UUIDGenerator.getUUID();\n created_on = new Date();\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"public String getNote() {\n return note;\n }",
"@PostMapping(\"/addnote\")\n private String saveNote(Note note, Idea idea) {\n noteService.save(note);\n // System.out.println(idea.getIdeaId());\n return \"notes\";\n\n }",
"public NoteController() {\n\t\tsuper();\n\t\tdateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tfinal String[] i18nJs = {\"note.err.name\", \"note.delete.confirm\", \"note.caldate.format\"};\n\t\tsuper.setI18nJsValues(i18nJs, \"^note\\\\.\");\n\t}",
"public interface TodoNoteAddPresenterInterface {\n void noteaddSuccess( String message);\n\n void noteaddFailure(String message);\n\n void showProgressDialog(String mesage);\n\n void hideProgressDialog();\n\n void addNoteToFirebase(Bundle bundle);\n\n void CallBackNotes(TodoHomeDataModel model);\n}",
"protected void addNotes(AccountsPayableDocument accountsPayableDocument, PaymentDetail paymentDetail) {\r\n int count = 1;\r\n\r\n if (accountsPayableDocument instanceof PaymentRequestDocument) {\r\n PaymentRequestDocument prd = (PaymentRequestDocument) accountsPayableDocument;\r\n\r\n if (prd.getSpecialHandlingInstructionLine1Text() != null) {\r\n PaymentNoteText pnt = new PaymentNoteText();\r\n pnt.setCustomerNoteLineNbr(new KualiInteger(count++));\r\n pnt.setCustomerNoteText(prd.getSpecialHandlingInstructionLine1Text());\r\n paymentDetail.addNote(pnt);\r\n }\r\n\r\n if (prd.getSpecialHandlingInstructionLine2Text() != null) {\r\n PaymentNoteText pnt = new PaymentNoteText();\r\n pnt.setCustomerNoteLineNbr(new KualiInteger(count++));\r\n pnt.setCustomerNoteText(prd.getSpecialHandlingInstructionLine2Text());\r\n paymentDetail.addNote(pnt);\r\n }\r\n\r\n if (prd.getSpecialHandlingInstructionLine3Text() != null) {\r\n PaymentNoteText pnt = new PaymentNoteText();\r\n pnt.setCustomerNoteLineNbr(new KualiInteger(count++));\r\n pnt.setCustomerNoteText(prd.getSpecialHandlingInstructionLine3Text());\r\n paymentDetail.addNote(pnt);\r\n }\r\n }\r\n\r\n if (accountsPayableDocument.getNoteLine1Text() != null) {\r\n PaymentNoteText pnt = new PaymentNoteText();\r\n pnt.setCustomerNoteLineNbr(new KualiInteger(count++));\r\n pnt.setCustomerNoteText(accountsPayableDocument.getNoteLine1Text());\r\n paymentDetail.addNote(pnt);\r\n }\r\n\r\n if (accountsPayableDocument.getNoteLine2Text() != null) {\r\n PaymentNoteText pnt = new PaymentNoteText();\r\n pnt.setCustomerNoteLineNbr(new KualiInteger(count++));\r\n pnt.setCustomerNoteText(accountsPayableDocument.getNoteLine2Text());\r\n paymentDetail.addNote(pnt);\r\n }\r\n\r\n if (accountsPayableDocument.getNoteLine3Text() != null) {\r\n PaymentNoteText pnt = new PaymentNoteText();\r\n pnt.setCustomerNoteLineNbr(new KualiInteger(count++));\r\n pnt.setCustomerNoteText(accountsPayableDocument.getNoteLine3Text());\r\n paymentDetail.addNote(pnt);\r\n }\r\n\r\n PaymentNoteText pnt = new PaymentNoteText();\r\n pnt.setCustomerNoteLineNbr(new KualiInteger(count++));\r\n pnt.setCustomerNoteText(\"Sales Tax: \" + accountsPayableDocument.getTotalRemitTax());\r\n }",
"public interface AdapterNotesListCoordinator {\n void setNewNotesList(List<Note> newNotes);\n\n void replaceNotes(int fromInc, List<Note> newNotes);\n\n List<Note> getListOfNotes();\n\n List<Note> getListOfNotes(int from, int count);\n\n List<Note> getListOfHighlightedNotes();\n\n Note getNoteAt(int index);\n\n int getIndexOfNote(Note note);\n\n boolean addNote(Note note);\n\n boolean addNote(Note note, int index);\n\n boolean addNotes(List<Note> newNotes);\n\n boolean addNoteToHighlighted(Note note);\n\n void addAllNotesToHighlighted();\n\n boolean removeNote(Note note);\n\n boolean removeNotes(List<Note> _notes);\n\n boolean removeNotes(int fromIncl, int toExcl);\n\n @SuppressWarnings(\"unused\")\n boolean removeHighlightedNotes();\n\n void removeNoteFromHighlighted(Note note);\n\n void removeAllNotesFromHighlighted();\n\n boolean updateNote(Note old, Note new_);\n\n boolean setNoteAt(int index, Note note);\n\n void swapNotesAt(int indexOfFirst, int indexOfSecond);\n\n @SuppressWarnings(\"unused\")\n Note getNoteWithIdOrDefault(int id, Note _default);\n\n boolean isNoteHighlighted(Note note);\n\n boolean containsHighlightedNotes();\n\n int getHighlightedCount();\n\n int getNoteCount();\n}",
"public void showNoteView(MyNoteDto noteDto);",
"public Collection<FeatureNote> getNotes(String noteTypeName);",
"public interface DocumentService {\n /**\n * 查找\n *\n * @return\n */\n DocumentPo findOne(Long id);\n\n DocumentPo findByUuid(String uuid);\n /**\n * 查找\n *\n * @return\n */\n List<DocumentPo> findAll();\n\n /**\n * 新增/更新\n *\n * @param documentPo\n * @return\n */\n DocumentPo save(DocumentPo documentPo);\n /**\n * 删除\n *\n * @param id\n */\n void delete(Long id);\n}",
"public void testCreateSampleNoteForOffActn() {\n UrlInputDto urlInput = new UrlInputDto(TradeMarkDocumentTypes.TYPE_NOTE.getAlfrescoTypeName());\n urlInput.setSerialNumber(ParameterValues.VALUE_SERIAL_77777777_NUMBER.toString());\n urlInput.setFileName(\"NoteForOffActnAssoc.pdf\");\n String NOTE_CREATE_WEBSCRIPT_URL = CaseCreateUrl.returnGenericCreateUrl(urlInput);\n Map<String, String> noteParam = new HashMap<String, String>();\n noteParam.put(ParameterKeys.URL.toString(), NOTE_CREATE_WEBSCRIPT_URL);\n noteParam.put(ParameterKeys.METADATA.toString(), NoteBaseTest.VALUE_NOTE_METADATA);\n noteParam.put(ParameterKeys.CONTENT_ATTACHEMENT.toString(), NoteBaseTest.CONTENT_NOTE_TTACHMENT);\n ClientResponse response = createDocument(noteParam);\n // String str = response.getEntity(String.class);\n // System.out.println(str);\n assertEquals(201, response.getStatus());\n }",
"Update withNotes(String notes);",
"public interface NotificationMessageContentService {\n /**\n * Parses a Notification request message into business objects. Performs syntactic and semantic validation. \n * This method takes an InputStream.\n * @param stream request message stream\n * @return Notification business object\n * @throws SAXException\n * @throws ParserConfigurationException\n * @throws IOException\n * @throws XmlException\n */\n public NotificationBo parseNotificationRequestMessage(InputStream stream) throws IOException, XmlException;\n \n /**\n * Parses a Notification request message into business objects. Performs syntactic and semantic validation. \n * This method takes a String of XML.\n * @param notificationMessageAsXml\n * @return\n * @throws IOException\n * @throws XmlException\n */\n public NotificationBo parseNotificationRequestMessage(String notificationMessageAsXml) throws IOException, XmlException;\n \n /**\n * Generates a Notification response message\n * @param response\n * @return String XML representation of a Notification response object\n */\n public String generateNotificationResponseMessage(NotificationResponseBo response);\n\n /**\n * This method is responsible for marshalling out the passed in Notification object in and XML representation. \n * @param notification\n * @return String of XML.\n */\n public String generateNotificationMessage(NotificationBo notification);\n \n /**\n * This method is responsible for marshalling out the passed in Notification object in and XML representation, with \n * the addition of adding the specific recipient to the recipients list and removing the others. \n * @param notification\n * @param userRecipientId\n * @return String of XML.\n */\n public String generateNotificationMessage(NotificationBo notification, String userRecipientId);\n \n /**\n * This method parses out the serialized XML version of Notification BO and populates a Notification BO with it.\n * @param xmlAsBytes\n * @return Notification\n * @throws Exception\n */\n public NotificationBo parseSerializedNotificationXml(byte[] xmlAsBytes) throws Exception;\n}"
] | [
"0.7215182",
"0.7165251",
"0.684767",
"0.6644862",
"0.66262394",
"0.66232985",
"0.6553641",
"0.6535063",
"0.64491636",
"0.6410771",
"0.63728493",
"0.635993",
"0.6336529",
"0.63316673",
"0.63049936",
"0.62647426",
"0.62647426",
"0.62352186",
"0.6182425",
"0.6133371",
"0.61298",
"0.61179537",
"0.6112223",
"0.6094836",
"0.60774004",
"0.6045435",
"0.60452837",
"0.60352105",
"0.60180825",
"0.6015663",
"0.59829587",
"0.59724444",
"0.59705937",
"0.5915675",
"0.5915675",
"0.5915675",
"0.5915675",
"0.5915675",
"0.59105885",
"0.5901392",
"0.58869493",
"0.58750373",
"0.5866651",
"0.58650255",
"0.58623636",
"0.58574045",
"0.58132035",
"0.58010197",
"0.57934874",
"0.57856685",
"0.5783248",
"0.5776691",
"0.57646793",
"0.5746006",
"0.57178116",
"0.5708159",
"0.57064795",
"0.5705868",
"0.5692426",
"0.56880444",
"0.568175",
"0.5679261",
"0.56566995",
"0.5656108",
"0.56463945",
"0.5644424",
"0.5644424",
"0.5644175",
"0.5637822",
"0.56373996",
"0.5635794",
"0.56319535",
"0.5615237",
"0.56106395",
"0.5591517",
"0.5584568",
"0.55832237",
"0.5580173",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.55692065",
"0.5567283",
"0.5565733",
"0.5562471",
"0.55610746",
"0.5555052",
"0.5552386",
"0.554963",
"0.55438435",
"0.5537985",
"0.5537184",
"0.5535076"
] | 0.69454116 | 2 |
Initializes configurations from default configurations file | public static void Init() throws Exception
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document dom = db.parse("bin\\configurations\\Configurations.xml");
Root = new Configurations(dom.getFirstChild());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initialize() {\n if (!BungeeBan.getInstance().getDataFolder().exists()) {\n BungeeBan.getInstance().getDataFolder().mkdirs();\n }\n File file = this.getConfigurationFile();\n if (!file.exists()) {\n try {\n file.createNewFile();\n if (this.defaultConfig != null) {\n try (InputStream is = BungeeBan.getInstance().getResourceAsStream(this.defaultConfig);\n OutputStream os = new FileOutputStream(file)) {\n ByteStreams.copy(is, os);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.reload();\n }",
"private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}",
"private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelper.exit(\"Cannot load the configuations from the configuration file please check the channelConfig.xml\");\r\n }\r\n }",
"public void initialConfig() {\n }",
"private void loadDefaultConfig() {\r\n ResourceBundle bundle = ResourceLoader.getProperties(DEFAULT_CONFIG_NAME);\r\n if (bundle != null) {\r\n putAll(bundle);\r\n } else {\r\n LOG.error(\"Can't load default Scope config from: \" + DEFAULT_CONFIG_NAME);\r\n }\r\n }",
"public void loadConfigs() {\n\t configYML = new ConfigYML();\n\t configYML.setup();\n }",
"private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }",
"public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }",
"public void loadConfig() {\n\t}",
"@Override\n public void loadDefaultConfig() {\n currentConfigFileName = defaultConfigFileName;\n mesoCfgXML = (SCANConfigMesoXML) readDefaultConfig();\n createAttributeMap(getAttributes());\n }",
"private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"public synchronized static void initConfig(Map<ConfigProperty, String> initialValues) {\n SeLionLogger.getLogger().entering(initialValues);\n\n // only do this if the global config is not already initialized.\n if (xmlConfig == null) {\n xmlConfig = new XMLConfiguration();\n // don't auto throw, let each config value decide\n xmlConfig.setThrowExceptionOnMissing(false);\n // because we can config on the fly, don't auto-save\n xmlConfig.setAutoSave(false);\n\n // Set defaults\n loadInitialValues();\n }\n\n /*\n * otherwise, update the global config\n */\n\n // Load in our supplied values (if defined)\n loadValuesFromUser(initialValues);\n\n // Load in environment & system variables (if defined)\n loadValuesFromEnvironment();\n\n // Init Selenium configuration\n boolean runLocally = xmlConfig.getBoolean(ConfigProperty.SELENIUM_RUN_LOCALLY.getName());\n if (runLocally) {\n xmlConfig.setProperty(ConfigProperty.SELENIUM_HOST.getName(), \"localhost\");\n }\n\n SeLionLogger.getLogger().exiting();\n }",
"private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}",
"private void configInit() {\r\n\t\tconfig = pluginInstance.getConfiguration();\r\n\t\tif (!new File(pluginInstance.getDataFolder().getPath() + File.separator + \"config.yml\")\r\n\t\t\t\t.exists()) {\r\n\t\t\tconfig.setProperty(\"reset-deathloc\", true);\r\n\t\t\tconfig.setProperty(\"use-iConomy\", true);\r\n\t\t\tconfig.setProperty(\"creation-price\", 10.0D);\r\n\t\t\tconfig.setProperty(\"deathtp-price\", 50.0D);\r\n\t\t\tconfig.setProperty(\"allow-tp\", true);\r\n\t\t\tconfig.setProperty(\"maxTombStone\", 0);\r\n\t\t\tconfig.setProperty(\"TombKeyword\", \"[Tomb]\");\r\n\t\t\tconfig.setProperty(\"use-tombAsSpawnPoint\", true);\r\n\t\t\tconfig.setProperty(\"cooldownTp\", 5.0D);\r\n\t\t\tconfig.setProperty(\"reset-respawn\", false);\r\n\t\t\tconfig.setProperty(\"maxDeaths\", 0);\r\n\t\t\tconfig.save();\r\n\t\t\tworkerLog.info(\"Config created\");\r\n\t\t}\r\n\t\tconfig.load();\r\n\t}",
"public synchronized static void initConfig() {\n\t\tMap<CatPawConfigProperty, String> initialValues = new HashMap<CatPawConfigProperty, String>();\n\t\tinitConfig(initialValues);\n\t}",
"@Override\n public void init()\n throws InitializationException\n {\n // Create a default configuration.\n String[] def = new String[]\n {\n DEFAULT_RUN_DATA,\n DEFAULT_PARAMETER_PARSER,\n DEFAULT_COOKIE_PARSER\n };\n configurations.put(DEFAULT_CONFIG, def.clone());\n\n // Check other configurations.\n Configuration conf = getConfiguration();\n if (conf != null)\n {\n String key,value;\n String[] config;\n String[] plist = new String[]\n {\n RUN_DATA_KEY,\n PARAMETER_PARSER_KEY,\n COOKIE_PARSER_KEY\n };\n for (Iterator<String> i = conf.getKeys(); i.hasNext();)\n {\n key = i.next();\n value = conf.getString(key);\n int j = 0;\n for (String plistKey : plist)\n {\n if (key.endsWith(plistKey) && key.length() > plistKey.length() + 1)\n {\n key = key.substring(0, key.length() - plistKey.length() - 1);\n config = (String[]) configurations.get(key);\n if (config == null)\n {\n config = def.clone();\n configurations.put(key, config);\n }\n config[j] = value;\n break;\n }\n j++;\n }\n }\n }\n\n\t\tpool = (PoolService)TurbineServices.getInstance().getService(PoolService.ROLE);\n\n if (pool == null)\n {\n throw new InitializationException(\"RunData Service requires\"\n + \" configured Pool Service!\");\n }\n\n parserService = (ParserService)TurbineServices.getInstance().getService(ParserService.ROLE);\n\n if (parserService == null)\n {\n throw new InitializationException(\"RunData Service requires\"\n + \" configured Parser Service!\");\n }\n\n setInit(true);\n }",
"void init (Map<String, String> conf) throws ConfigException;",
"private void initFiles() {\r\n\t\ttry {\r\n\t\t\tFile file = getConfigFile();\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tXmlFile.write(file, new SystemSettings());\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize settings file\", ex);\r\n\t\t}\r\n\t}",
"void importDefaultConfiguration(Map<String, Object> config);",
"private static synchronized void init() {\n if (CONFIG_VALUES != null) {\n return;\n }\n\n CONFIG_VALUES = new Properties();\n processLocalConfig();\n processIncludedConfig();\n }",
"private void setDefaultConfiguration(){\n\t\tthis.setProperty(\"DefaultNodeCapacity\", \"5\");\n\t\tthis.setProperty(\"ReplicaNumber\", \"3\");\n\t\tthis.setProperty(\"JobReattemptTimes\", \"2\");\n\t\tthis.setProperty(\"ReducerCount\", \"3\");\n\t}",
"public Config(String filename, String defaultConfig) {\n this.filename = filename;\n this.defaultConfig = defaultConfig;\n }",
"private SettingsManager initSettings() {\n // Copy the demo/config.yml instead of using it directly so it doesn't get overridden\n configFile = copyFileFromJar(\"/demo/config.yml\");\n return SettingsManagerBuilder.withYamlFile(configFile).configurationData(TitleConfig.class).create();\n }",
"public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }",
"private void initConfig() {\n Path walletPath;\n Wallet wallet;\n\n // load a CCP\n Path networkConfigPath; \n \n try {\n \t\n \tif (!isLoadFile) {\n // Load a file system based wallet for managing identities.\n walletPath = Paths.get(\"wallet\");\n wallet = Wallet.createFileSystemWallet(walletPath);\n\n // load a CCP\n networkConfigPath = Paths.get(\"\", \"..\", \"basic-network\", configFile);\n \n builder = Gateway.createBuilder();\n \n \tbuilder.identity(wallet, userId).networkConfig(networkConfigPath).discovery(false);\n \t\n \tisLoadFile = true;\n \t}\n } catch (Exception e) {\n \te.printStackTrace();\n \tthrow new RuntimeException(e);\n }\n\t}",
"public void loadConfigurations(Dictionary configurations) {\n\t}",
"private void initializeWithDefaultValues() {\n setProjectFolder(\"projectFolder\");\n setContext(\"context\");\n setGroupId(\"com.company.project\");\n setArtifactId(\"project\");\n setModulePrefix(\"project-\");\n setVersion(\"0.0.1-SNAPSHOT\");\n setName(\"Project Name\");\n setDescription(\"Project Description\");\n setUrl(\"https://www.company-project.com\");\n setInceptionYear(String.valueOf(LocalDateTime.now().getYear()));\n setOrganizationName(\"Your Company Name\");\n setOrganizationUrl(\"https://www.company.com\");\n setLicenseName(\"apache_v2\");\n setLicenseUrl(\"https://www.license-url.com\");\n setScmConnection(\"\");\n setScmDeveloperConnection(\"\");\n setScmUrl(\"\");\n setDistributionProfile(\"\");\n setExtraModules(new LinkedHashSet<>());\n setContextDescriptions(new LinkedHashSet<>());\n setAppConfigLocationType(AppConfigLocationType.INSIDE);\n }",
"public static void initialize() {\n \tinitialize(new Configuration().configure());\n }",
"protected void initialise() {\r\n loadDefaultConfig();\r\n loadCustomConfig();\r\n loadSystemConfig();\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"--- Scope properties ---\");\r\n for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {\r\n String key = (String) i.next();\r\n Object value = properties.get(key);\r\n LOG.debug(key + \" = \" + value);\r\n }\r\n LOG.debug(\"------------------------\");\r\n }\r\n }",
"public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }",
"private void init() {\n\t\tif ( PropertiesConfigurationFilename == null ) {\n\t\t\tlogger.info(\"config.properties is default\");\n\t\t\tconfigProp = createDefaultProperties();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tlogger.info(\"config.properties is \"+ PropertiesConfigurationFilename.getAbsolutePath());\n\t\t\t\tconfigProp = new PropertiesConfiguration();\n\t\t\t\tconfigProp.load(PropertiesConfigurationFilename);\n\t\t\t} catch (ConfigurationException e) {\n\t\t\t\tlogger.error(\"Unable to open config file: \" + PropertiesConfigurationFilename.getAbsolutePath(), e);\n\t\t\t\tlogger.info(\"config.properties is default\");\n\t\t\t\tconfigProp = createDefaultProperties();\n\t\t\t}\n\t\t}\n\n\n\t\t// Load the locale information\n\t\tString locale = configProp.getString(\"locale\");\n\n\t\tconfigProp.setProperty(\"zmMsg\", ResourceBundle.getBundle(\"ZmMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zhMsg\", ResourceBundle.getBundle(\"ZhMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"ajxMsg\", ResourceBundle.getBundle(\"AjxMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"i18Msg\", ResourceBundle.getBundle(\"I18nMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zsMsg\", ResourceBundle.getBundle(\"ZsMsg\", new Locale(locale)));\n\n\t}",
"private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }",
"@Test\n public final void testConfigurationParser() {\n URL resourceUrl = this.getClass().getResource(configPath);\n File folder = new File(resourceUrl.getFile());\n for (File configFile : folder.listFiles()) {\n try {\n System.setProperty(\"loadbalancer.conf.file\", configFile.getAbsolutePath());\n LoadBalancerConfiguration.getInstance();\n } finally {\n LoadBalancerConfiguration.clear();\n }\n }\n }",
"public void init(Map<String, String> configuration);",
"public void initConfigurations() {\r\n for (int configId = 0; configId < savedConfigurations.length; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n int value = savedConfigurations[configId];\r\n if (value != 0) {\r\n set(configId, value, false);\r\n }\r\n }\r\n }",
"private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }",
"protected abstract void initializeImpl(Map<String,String> configuration);",
"private static void initConfig() {\n /*\n * Human IO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Joysticks\n */\n {\n addToConstants(\"joysticks.left\", 0);\n addToConstants(\"joysticks.right\", 1);\n addToConstants(\"joysticks.operator\", 2);\n }\n\n /*\n * Buttons and axis\n */\n {\n }\n }\n }\n\n /*\n * RobotIO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Kicker\n */\n addToConstantsA(\"kicker.encoder.distPerPulse\", 360.0 / 1024.0);\n }\n }\n\n /*\n * Chassis\n */\n {\n /*\n * Constants\n */\n {\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Kicker\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"kicker.kick.normal\", 1.75);\n addToConstants(\"kicker.kick.timeout\", 0.75);\n\n addToConstants(\"kicker.shaken.voltage\", -0.3316);\n addToConstants(\"kicker.shaken.tolerance\", 3.0);\n\n addToConstants(\"kicker.zero.voltage\", 0.8);\n addToConstants(\"kicker.zero.duration\", 0.75);\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Gripper\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"gripper.collection.voltage\", 0.82);\n addToConstants(\"gripper.ejection.voltage\", -0.45);\n }\n }\n }",
"public void loadConfig(){\n \t\tFile configDir = this.getDataFolder();\n \t\tif (!configDir.exists())\n \t\t\tconfigDir.mkdir();\n \n \t\t// Check for existance of config file\n \t\tFile configFile = new File(this.getDataFolder().toString() + \"/config.yml\");\n \t\tconfig = YamlConfiguration.loadConfiguration(configFile);\n \t\t\n \t\t// Adding Variables\n \t\tif(!config.contains(\"Debug\"))\n \t\t{\n \t\t\tconfig.addDefault(\"Debug\", false);\n \t \n \t config.addDefault(\"Worlds\", \"ExampleWorld1, ExampleWorld2\");\n \t\n\t config.addDefault(\"Regions.Residence\", \"ExampleWorld.ExampleResRegion1, ExampleWorld.ExampleResRegion2\");\n \t \n\t config.addDefault(\"Regions.WorldGuard\", \"ExampleWorld.ExampleWGRegion1, ExampleWorld.ExampleWGRegion2\"); \n \t\t}\n \n // Loading the variables from config\n \tdebug = (Boolean) config.get(\"Debug\");\n \tpchestWorlds = (String) config.get(\"Worlds\");\n \tpchestResRegions = (String) config.get(\"Regions.Residence\");\n \tpchestWGRegions = (String) config.get(\"Regions.WorldGuard\");\n \n if(pchestWorlds != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Chests Worlds: \" + pchestWorlds);\n }\n \n if(pchestResRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Residence Regions: \" + pchestResRegions);\n }\n \n if(pchestWGRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All World Guard Regions: \" + pchestWGRegions);\n }\n \n config.options().copyDefaults(true);\n try {\n config.save(configFile);\n } catch (IOException ex) {\n Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, \"Could not save config to \" + configFile, ex);\n }\n }",
"public FileConfiguration loadConfiguration(File file);",
"abstract public ResourceManager getDefaultConfig();",
"private void initConfigVar() {\n\t\tConfigUtils configUtils = new ConfigUtils();\n\t\tmenuColor = configUtils.readConfig(\"MENU_COLOR\");\n\t\taboutTitle = configUtils.readConfig(\"ABOUT_TITLE\");\n\t\taboutHeader = configUtils.readConfig(\"ABOUT_HEADER\");\n\t\taboutDetails = configUtils.readConfig(\"ABOUT_DETAILS\");\n\t\tgsTitle = configUtils.readConfig(\"GS_TITLE\");\n\t\tgsHeader = configUtils.readConfig(\"GS_HEADER\");\n\t\tgsDetailsFiles = configUtils.readConfig(\"GS_DETAILS_FILES\");\n\t\tgsDetailsCases = configUtils.readConfig(\"GS_DETAILS_CASES\");\n\t}",
"public void loadConfiguration(){\n\t\t\n\t\tString jarLoc = this.getJarLocation();\n\t\tTicklerVars.jarPath = jarLoc;\n\t\tTicklerVars.configPath=TicklerVars.jarPath+TicklerConst.configFileName;\n\t\t\n\t\t//Read configs from conf file\n\t\tif (new File(TicklerVars.configPath).exists()){\n\t\t\ttry {\n\t\t\t\tString line;\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(TicklerVars.configPath));\n\t\t\t\twhile ((line =reader.readLine())!= null) {\n\t\t\t\t\tif (line.contains(\"Tickler_local_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.ticklerDir = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Tickler_sdcard_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length()-1);\n\t\t\t\t\t\tTicklerVars.sdCardPath = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Frida_server_path\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.fridaServerLoc = loc;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//Config path does not exist\n\t\t\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"WARNING...... Configuration file does not exist!!!!\\nThe following default configurations are set:\\n\");\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n\t\t\tSystem.out.println(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t\tSystem.out.println(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\n\t\tString x = TicklerVars.ticklerDir;\n\t\tif (TicklerVars.ticklerDir == null || TicklerVars.ticklerDir.matches(\"\\\\s*/\") ){\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler_local_directory. Workspace is set at \"+ TicklerVars.ticklerDir);\n\t\t\tOutBut.printStep(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t}\n\t\t\n\t\tif (TicklerVars.sdCardPath == null || TicklerVars.sdCardPath.matches(\"\\\\s*/\")) {\n\t\t\tTicklerVars.sdCardPath = TicklerConst.sdCardPathDefault;\t\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler's temp directory on the device. It is set to \"+ TicklerVars.sdCardPath);\n\t\t\tOutBut.printStep(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\t\n\t}",
"public static void initConfig()\r\n {\r\n try\r\n {\r\n ip = ConfigProperties.getKey(ConfigList.BASIC, \"AgentGateway_IP\");\r\n localIP = ConfigProperties.getKey(ConfigList.BASIC, \"Local_IP\");\r\n port = Integer.parseInt(ConfigProperties.getKey(ConfigList.BASIC, \"AgentGateway_PORT\"));\r\n }\r\n catch (NumberFormatException e)\r\n {\r\n log.error(\"read properties failed --\", e);\r\n }\r\n }",
"@PostConstruct\n\tpublic void init() {\n\t\tif (!Files.isDirectory(Paths.get(configFilePath))) {\n\t\t\ttry {\n\t\t\t\tFiles.createDirectory(Paths.get(configFilePath));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\"can't create the folder for the configuration\", e);\n\t\t\t}\n\t\t}\n\t\t// schedule the watch service in repeating loop to look for modification\n\t\t// at the jambel configuration files\n\t\tconfigFilesWatchServiceExecutor.scheduleAtFixedRate(\n\t\t\t\tnew ConfigPathWatchService(configFilePath), 0L, 1L,\n\t\t\t\tTimeUnit.MILLISECONDS);\n\t}",
"public ConfigsUtils() {\r\n mConfig = new Properties();\r\n try {\r\n mConfig.load(new FileInputStream(CONFIG_FILE_PATH));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public static void loadGameConfiguration() {\n File configFile = new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME);\n manageGameConfigFile(configFile);\n }",
"@Config.LoadPolicy(Config.LoadType.MERGE)\[email protected]({\n \"classpath:test.properties\",\n \"system:properties\",\n \"system:env\"})\npublic interface UserConfiguration extends Config {\n\n @DefaultValue(\"default_Name\")\n @Key(\"user.name\")\n String name();\n @Key(\"user.email\")\n String email();\n @Key(\"user.password\")\n String password();\n}",
"private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }",
"public CrawlerConfiguration() {\n\t\tinitConfiguration();\n\t}",
"public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}",
"@Test\n public void testLoadConfigurationFromFile() throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE);\n checkConfiguration();\n }",
"private void setConfiguration() throws IOException{\n\t\tString confPath = \"mapreduce.conf\";\n\t\tFileInputStream fis = new FileInputStream(confPath);\n\t\tthis.load(fis);\n\t\tfis.close();\n\t}",
"@Test\n public void testLoadConfigurationFromFileName()\n throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE.getAbsolutePath());\n checkConfiguration();\n }",
"private static void initialize(String configFile)\n\t{\n\t\t\n\t}",
"void overwriteDefaultConfiguration(Map<String, Object> config);",
"public void initialize() {\n final ConfigurationManager config = ConfigurationManager.getInstance();\n boolean overrideLog = System.getProperty(\"azureus.overridelog\") != null;\n\n for (int i = 0; i < ignoredComponents.length; i++) {\n ignoredComponents[i] = new ArrayList();\n }\n\n if (!overrideLog) {\n config.addListener(new COConfigurationListener() {\n public void configurationSaved() {\n checkLoggingConfig();\n }\n });\n }\n\n checkLoggingConfig();\n config.addParameterListener(CFG_ENABLELOGTOFILE, new ParameterListener() {\n public void parameterChanged(String parameterName) {\n FileLogging.this.reloadLogToFileParam();\n }\n });\n }",
"public Config() {\n this(System.getProperties());\n\n }",
"private void loadSettings() {\r\n \tString fname = baseDir + \"/\" + configFile;\r\n\t\tString line = null;\r\n\r\n\t\t// Load the settings hash with defaults\r\n\t\tsettings.put(\"db_url\", \"\");\r\n\t\tsettings.put(\"db_user\", \"\");\r\n\t\tsettings.put(\"db_pass\", \"\");\r\n\t\tsettings.put(\"db_min\", \"2\");\r\n\t\tsettings.put(\"db_max\", \"10\");\r\n\t\tsettings.put(\"db_query\", \"UPDATE members SET is_activated=1 WHERE memberName=? AND is_activated=3\");\r\n\t\t// Read the current file (if it exists)\r\n\t\ttry {\r\n \t\tBufferedReader input = new BufferedReader(new FileReader(fname));\r\n \t\twhile (( line = input.readLine()) != null) {\r\n \t\t\tline = line.trim();\r\n \t\t\tif (!line.startsWith(\"#\") && line.contains(\"=\")) {\r\n \t\t\t\tString[] pair = line.split(\"=\", 2);\r\n \t\t\t\tsettings.put(pair[0], pair[1]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tcatch (FileNotFoundException e) {\r\n\t\t\tlogger.warning( \"[SMF] Error reading \" + e.getLocalizedMessage() + \", using defaults\" );\r\n \t}\r\n \tcatch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n }",
"public void init() {\n this.properties = loadProperties(\"/project3.properties\");\n }",
"protected abstract void _init(DynMap config);",
"public MecBasicsConfig()\n {\n\n }",
"public void init(){\n\t\tif(prop==null){\r\n\t\t\tprop=new Properties();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileInputStream fs = new FileInputStream(System.getProperty(\"user.dir\")+\"//src//test//resources//projectconfig.properties\");\r\n\t\t\t\tprop.load(fs);\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void setupConfiguration(Configuration config)\n {\n\n }",
"public synchronized static void initConfig(ISuite suite) {\n SeLionLogger.getLogger().entering(suite);\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n for (ConfigProperty prop : ConfigProperty.values()) {\n String paramValue = suite.getParameter(prop.getName());\n // empty values may be valid for some properties\n if (paramValue != null) {\n initialValues.put(prop, paramValue);\n }\n }\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }",
"void init(Config config);",
"public void init() {\n if (getConfig().isEnabled()) {\n super.init();\n }\n }",
"private final void config() {\n\t\tfinal File configFile = new File(\"plugins\" + File.separator\n\t\t\t\t+ \"GuestUnlock\" + File.separator + \"config.yml\");\n\t\tif (!configFile.exists()) {\n\t\t\tthis.plugin.saveDefaultConfig();\n\t\t\tMain.INFO(\"Created default configuration-file\");\n\t\t}\n\t}",
"@BeforeAll\n public static void configInitialization() {\n System.setProperty(\"VSAC_DRC_URL\", \"https://vsac.nlm.nih.gov/vsac\");\n System.setProperty(\"SERVER_TICKET_URL\", \"https://vsac.nlm.nih.gov/vsac/ws/Ticket\");\n System.setProperty(\"SERVER_SINGLE_VALUESET_URL\", \"https://vsac.nlm.nih.gov/vsac/ws/RetrieveValueSet?\");\n System.setProperty(\"SERVER_MULTIPLE_VALUESET_URL_NEW\", \"https://vsac.nlm.nih.gov/vsac/svs/RetrieveMultipleValueSets?\");\n System.setProperty(\"SERVICE_URL\", \"http://umlsks.nlm.nih.gov\");\n System.setProperty(\"PROFILE_SERVICE\", \"https://vsac.nlm.nih.gov/vsac/profiles\");\n System.setProperty(\"VERSION_SERVICE\", \"https://vsac.nlm.nih.gov/vsac/oid/\");\n }",
"private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}",
"private static void loadConfig()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal Properties props = ManagerServer.loadProperties(ManagerServer.class, \"/resources/conf.properties\");\n\t\t\tasteriskIP = props.getProperty(\"asteriskIP\");\n\t\t\tloginName = props.getProperty(\"userName\");\n\t\t\tloginPwd = props.getProperty(\"password\");\n\t\t\toutboundproxy = props.getProperty(\"outBoundProxy\");\n\t\t\tasteriskPort = Integer.parseInt(props.getProperty(\"asteriskPort\"));\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tLOG.error(\"IO Exception while reading the configuration file.\", ex);\n\t\t}\n\t}",
"public void reload() {\n\t\tfileConfiguration = YamlConfiguration.loadConfiguration(configFile);\n\t\tfinal InputStream defaultConfigStream = plugin.getResource(fileName);\n\t\tif (defaultConfigStream != null) {\n\t\t\tfinal Reader defConfigStream = new InputStreamReader(defaultConfigStream, StandardCharsets.UTF_8);\n\t\t\tfinal YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);\n\t\t\tfileConfiguration.setDefaults(defConfig);\n\t\t}\n\t}",
"public void loadConfigurationFromDisk() {\r\n try {\r\n FileReader fr = new FileReader(CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\")) continue;\r\n if (line.equalsIgnoreCase(\"\")) continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n String aux;\r\n switch (str.nextToken().trim()) {\r\n case \"system.voidchain.protocol_version\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.protocolVersion = aux;\r\n continue;\r\n case \"system.voidchain.transaction.max_size\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.transactionMaxSize = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.block.num_transaction\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.numTransactionsInBlock = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.storage.data_file_extension\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.dataFileExtension = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.walletFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.data_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.dataDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.blockFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.walletFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.memory.block_megabytes\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.memoryUsedForBlocks = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.sync.block_sync_port\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockSyncPort = Integer.parseInt(aux);\r\n }\r\n continue;\r\n case \"system.voidchain.crypto.ec_param\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.ecParam = aux;\r\n continue;\r\n case \"system.voidchain.core.block_proposal_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockProposalTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n case \"system.voidchain.blockchain.chain_valid_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockchainValidTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n fr.close();\r\n rd.close();\r\n\r\n if (this.firstRun)\r\n this.firstRun = false;\r\n } catch (IOException e) {\r\n logger.error(\"Could not load configuration\", e);\r\n }\r\n }",
"public void initialize() throws IOException {\n\t\ttry{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Try-Catch to spot/handle potential BadConfigFormatExceptions\n\t\t\tloadSetupConfig();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Methods required to populate the board\n\t\t\tloadLayoutConfig();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Methods required to populate the board\n\t\t} catch(BadConfigFormatException e) { \t\t\t\t\t\t\t\t\t\t\t\t// Custom exception for formatting errors\t\t\n\t\t\tSystem.out.println(e);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Print the message generated by the exception\n\t\t}\n\t}",
"public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }",
"private void initConfig(String initParameter) {\n InputStream inputStream = null;\n inputStream = this.getClass().getClassLoader().getResourceAsStream(initParameter);\n try {\n properties.load(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Test\n public void initWithDefaultConfiguration() throws Exception {\n WifiApConfigStore store = new WifiApConfigStore(\n mContext, mLooper.getLooper(), mBackupManagerProxy, mFrameworkFacade,\n mApConfigFile.getPath());\n verifyDefaultApConfig(store.getApConfiguration(), TEST_DEFAULT_AP_SSID);\n }",
"private void config() {\n\t}",
"public SystemConfigurations() {\n\t\tsetOs();\n\t\tsetFileSeparator();\n\t\tsetWorkDiretory();\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@NeedsAttention(\"CAL logging should not be tied to AUTO_SCREEN_SHOT and WebReporter.java\")\n\tpublic synchronized static void initConfig(Map<CatPawConfigProperty, String> initialValues) {\n\t\t/*\n\t\t * Internally, HtmlUnit uses Apache commons logging. Each class that\n\t\t * uses logging in HtmlUnit creates a Logger by using the LogFactory,\n\t\t * and the defaults it generates. So to modify the Logger that is\n\t\t * created, we need to set this attribute\n\t\t * \"org.apache.commons.logging.Log\" to the Logger we want it to use.\n\t\t * \n\t\t * Note: this has to be the *first* thing done prior to any apache code\n\t\t * getting a handle, so we're putting it in here because the next call\n\t\t * is to XMLConfiguration (apache code).\n\t\t */\n\t\t// NoOpLog essentially disables logging of HtmlUnit\n\t\tLogFactory.getFactory().setAttribute(\"org.apache.commons.logging.Log\",\n\t\t\t\t\"org.apache.commons.logging.impl.NoOpLog\");\n\n\t\tconfig = new XMLConfiguration();\n\n\t\t// don't auto throw, let each config value decide\n\t\tconfig.setThrowExceptionOnMissing(false);\n\t\t// because we can config on the fly, don't auto-save\n\t\tconfig.setAutoSave(false);\n\n\t\t/*\n\t\t * Set defaults\n\t\t */\n\t\tCatPawConfigProperty[] configProps = CatPawConfigProperty.values();\n\t\tfor (int i = 0; i < configProps.length; i++) {\n\t\t\tconfig.setProperty(configProps[i].getName(), configProps[i].getDefaultValue());\n\t\t}\n\n\t\t/*\n\t\t * Load the user-defined config, (maybe) overriding defaults\n\t\t */\n\t\tXMLConfiguration userConfig = null;\n\t\ttry {\n\t\t\tuserConfig = new XMLConfiguration(CatPawConfig.class.getResource(configLocatiton));\n\t\t} catch (ConfigurationException e) {\n\t\t\t// we can safely ignore this exception\n\t\t} finally {\n\t\t\t// only load in the user config if defined\n\t\t\tif (userConfig != null) {\n\t\t\t\t/*\n\t\t\t\t * We need to treat this as a separate configuration, because if\n\t\t\t\t * we load it into our config, it will append values rather than\n\t\t\t\t * overwrite values... so lets do this manually\n\t\t\t\t */\n\t\t\t\tIterator<String> keys = userConfig.getKeys();\n\t\t\t\twhile (keys.hasNext()) {\n\t\t\t\t\tString key = keys.next();\n\t\t\t\t\t// System.out.println(\"key--->\"+key);\n\t\t\t\t\tconfig.setProperty(key, userConfig.getString(key));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Load in environment variables (if defined)\n\t\t */\n\t\tCatPawConfigProperty[] clawsConfigProps = CatPawConfigProperty.values();\n\t\tfor (int i = 0; i < clawsConfigProps.length; i++) {\n\t\t\tString value = System.getenv(\"CLAWS_\" + clawsConfigProps[i].name());\n\t\t\tif ((value != null) && (!value.equals(\"\"))) {\n\t\t\t\tconfig.setProperty(clawsConfigProps[i].getName(), value);\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Load in System properties variables (if defined)\n\t\t */\n\t\tfor (int i = 0; i < clawsConfigProps.length; i++) {\n\t\t\tString value = System.getProperty(\"CLAWS_\" + clawsConfigProps[i].name());\n\t\t\tif ((value != null) && (!value.equals(\"\"))) {\n\t\t\t\tconfig.setProperty(clawsConfigProps[i].getName(), value);\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Load in our supplied values (if defined)\n\t\t */\n\t\tif (initialValues != null) {\n\t\t\t// System.out.println(\"initialValues contains \" +\n\t\t\t// initialValues.size() + \" key value pair.\");\n\t\t\tfor (CatPawConfigProperty configProperty : initialValues.keySet()) {\n\t\t\t\t// System.out.println(\"configProperty.getName(--->\" +\n\t\t\t\t// configProperty.getName() + \"---->>>>\" +\n\t\t\t\t// initialValues.get(configProperty));\n\t\t\t\tconfig.setProperty(configProperty.getName(), initialValues.get(configProperty));\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Set dynamically configurable values which are safe to set at this\n\t\t * point Safe means they; 1. Do not connect to a remote machine to\n\t\t * determine value. 2. Do not have a requirement on another mandatory\n\t\t * config variable. Otherwise set the value dynamically at first use, in\n\t\t * loadValueAtFirstUsage(CatPawConfigProperty configProperty)\n\t\t */\n\n\t\t// Find Selenium configuration\n\t\tString useLocalRC = config.getString(CatPawConfigProperty.SELENIUM_USE_LOCAL_RC.getName());\n\t\tif (useLocalRC.equalsIgnoreCase(\"true\")) {\n\t\t\tconfig.setProperty(CatPawConfigProperty.SELENIUM_HOST.getName(), \"localhost\");\n\t\t}\n\n\t}",
"private void loadCustomConfig() {\r\n ResourceBundle bundle = ResourceLoader.getProperties(DEFAULT_CUSTOM_CONFIG_NAME);\r\n if (bundle != null) {\r\n putAll(bundle);\r\n LOG.info(\"Load custom Scope config from \" + DEFAULT_CUSTOM_CONFIG_NAME + \".properties\");\r\n } else {\r\n LOG.warn(\"Can't load custom Scope config from \" + DEFAULT_CUSTOM_CONFIG_NAME + \".properties\");\r\n }\r\n }",
"@Test\n public void testComplexInitialization() throws ConfigurationException\n {\n factory.setFile(INIT_FILE);\n CombinedConfiguration cc = (CombinedConfiguration) factory\n .getConfiguration();\n\n assertEquals(\"System property not found\", \"test.xml\",\n cc.getString(\"test_file_xml\"));\n PropertiesConfiguration c1 = (PropertiesConfiguration) cc\n .getConfiguration(1);\n assertTrue(\n \"Reloading strategy was not set\",\n c1.getReloadingStrategy() instanceof FileChangedReloadingStrategy);\n assertEquals(\"Refresh delay was not set\", 10000,\n ((FileChangedReloadingStrategy) c1.getReloadingStrategy())\n .getRefreshDelay());\n\n Configuration xmlConf = cc.getConfiguration(\"xml\");\n assertEquals(\"Property not found\", \"I'm complex!\", xmlConf\n .getString(\"element2/subelement/subsubelement\"));\n assertEquals(\"List index not found\", \"two\", xmlConf\n .getString(\"list[0]/item[1]\"));\n assertEquals(\"Property in combiner file not found\", \"yellow\", cc\n .getString(\"/gui/selcolor\"));\n\n assertTrue(\"Delimiter flag was not set\", cc\n .isDelimiterParsingDisabled());\n assertTrue(\"Expression engine was not set\",\n cc.getExpressionEngine() instanceof XPathExpressionEngine);\n }",
"public ClientConfiguration() {\n serverIp = DEFAULT_SERVER_IP;\n serverPort = DEFAULT_SERVER_PORT;\n }",
"private static void loadConfig() throws IOException { \t\t\n final InputStream input = Main.class.getResourceAsStream(\"/configuration.properties\");\n final Properties prop = new Properties();\n \n prop.load(input);\n System.out.println(\"Configuration loaded:\"); \n\n // PostgreSQL server access config\n dbmsUrl = prop.getProperty(\"dbms_url\");\n System.out.println(\"- dbms_url: \" + dbmsUrl);\n\n dbmsUser = prop.getProperty(\"dbms_user\");\n System.out.println(\"- dbms_user: \" + dbmsUser);\n\n userPw = prop.getProperty(\"user_pw\"); \n System.out.println(\"- user_pw: \" + userPw);\n\n\n // Benchmarks config\n noTransactions = Integer.parseInt(prop.getProperty(\"no_transactions\"));\n System.out.println(\"- no_transactions: \" + noTransactions);\n\n noStatementsPerTransaction = Integer.parseInt(prop.getProperty(\"no_statements_per_transaction\")); \n System.out.println(\"- no_statements_per_transaction: \" + noStatementsPerTransaction);\n\n noSelectStatements = Integer.parseInt(prop.getProperty(\"no_select_statements\")); \n System.out.println(\"- no_select_statements: \" + noSelectStatements + \"\\n\");\n\n input.close();\n }",
"private void init() throws IOException {\n if (Files.exists(getBaseConfigPath()) && !Files.isDirectory(getBaseConfigPath())) {\n throw new IOException(\"Base config path exists and is not a directory \" + getBaseConfigPath());\n }\n\n if (!Files.exists(getBaseConfigPath())) {\n Files.createDirectories(getBaseConfigPath());\n }\n\n\n if (Files.exists(nodeIdPath) && !Files.isRegularFile(nodeIdPath)) {\n throw new IOException(\"NodeId file is not a regular directory!\");\n }\n\n if (Files.exists(clusterNamePath) && !Files.isRegularFile(clusterNamePath)) {\n throw new IOException(\"Cluster name is not a regular directory!\");\n }\n\n if (!Files.isWritable(getBaseConfigPath())) {\n throw new IOException(\"Can't write to the base configuration path!\");\n }\n }",
"private ConfigReader() {\r\n\t\tsuper();\r\n\t}",
"@Override\n public void init() throws Exception {\n config = new Config();\n }",
"private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }",
"static void loadConfiguration() throws Exception {\n cleanConfiguration();\n\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"test_conf/stress/logging.xml\");\n cm.add(\"test_conf/stress/dbconnectionfactory.xml\");\n cm.add(\"test_conf/stress/simplecache.xml\");\n cm.add(\"test_conf/stress/profiletypes.xml\");\n cm.add(\"test_conf/stress/daofactory.xml\");\n cm.add(\"test_conf/stress/dao.xml\");\n }",
"public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}",
"@Test\n public void testLoadConfiguration() throws ConfigurationException\n {\n factory.setFile(TEST_FILE);\n checkConfiguration();\n }",
"@Override\n public Configuration getDefaultClusterConfiguration() throws\n FileNotFoundException {\n return ConfigHelper.loadMandatoryResource(\n \"org/apache/hoya/providers/hbase/hbase.xml\");\n }",
"private Map<String, Object> getDefaultConfiguration() {\n JavaFormattingOptions options = JavaFormattingOptions.createDefault();\n options.ClassBraceStyle = BraceStyle.EndOfLine;\n options.InterfaceBraceStyle = BraceStyle.EndOfLine;\n options.EnumBraceStyle = BraceStyle.EndOfLine;\n\n return ProcyonBuilderConfiguration\n .getBuilderConfiguration()\n .uploadClassReference(true)\n .excludeNestedTypes(false)\n .flattenSwitchBlocks(true)\n .forceExplicitImports(true)\n .forceExplicitTypeArguments(true)\n .setLanguage(new JavaLanguage())\n .setByteCodeOutputOptions(new BytecodeOutputOptions())\n .setJavaFormatterOptions(options)\n .showSyntheticMembers(false)\n .alwaysGenerateExceptionVariableForCatchBlocks(true)\n .includeErrorDiagnostics(false)\n .includeLineNumbersInByteCode(false)\n .retainRedundantCasts(false)\n .retainPointlessSwitches(true)\n .unicodeOutputEnabled(true)\n .showDebugLineNumbers(false)\n .mergeVariables(false)\n .simplifyMemberReferences(true)\n .disableForEachTransforms(false)\n .setForceFullyQualifiedReferences(false)\n .getConfiguration();\n }",
"@Override\n public void init(File jsonFile) throws PluginException {\n try {\n config = new JsonSimpleConfig(jsonFile);\n reset();\n } catch (IOException e) {\n log.error(\"Error reading config: \", e);\n }\n }",
"protected Configuration() {\r\n }",
"private static void resetConfiguration(Configuration defaultConfig) {\n new Resources(IEAApp.getInstance().getResources().getAssets(),\n IEAApp.getInstance().getResources().getDisplayMetrics(),\n defaultConfig);\n }",
"private void initConfigServices() {\n List<ServiceDTO> customizedConfigServices = getCustomizedConfigService();\n\n if (customizedConfigServices != null) {\n setConfigServices(customizedConfigServices);\n return;\n }\n\n // update from meta service\n this.tryUpdateConfigServices();\n this.schedulePeriodicRefresh();\n }",
"public ValidateConfiguration(Properties defaults) {\n super(defaults);\n }",
"public static synchronized void initializeLogger() {\n\t\t\n\t try {\n\t\t String workingDir = System.getProperty(\"user.dir\");\n\t\t String fileName = workingDir + File.separator + \"config\" + File.separator + \"logging.properties\";\n\t\t \n\t\t FileInputStream fileInputStream = new FileInputStream(fileName);\n\t\t LogManager.getLogManager().readConfiguration(fileInputStream);\n\t\t \n\t } catch (IOException ex) {\n\t\t System.err.println(\"Failed to load logging.properlies, please check the file and the path:\" + ex.getMessage()); \n\t ex.printStackTrace();\n\t System.exit(0);\n\t }\n\t}",
"protected void checkConfiguration() {\n \tsuper.checkConfiguration();\n \t\n if (this.customizations == null) {\n this.customizations = new ArrayList<String>();\n }\n if (this.options == null) {\n this.options = new HashMap<String, String>();\n }\n if (this.sourceDirectories == null) {\n \tthis.sourceDirectories = new ArrayList<String>();\n \tthis.sourceDirectories.add(DEFAULT_SOURCE_DIRECTORY);\n }\n }",
"@Override\n public String getDefaultConfigName() {\n return defaultConfigFileName;\n }"
] | [
"0.7057059",
"0.70035636",
"0.69701624",
"0.68637156",
"0.6844059",
"0.6831242",
"0.67811304",
"0.67533034",
"0.67150426",
"0.6643743",
"0.6608892",
"0.6608636",
"0.65983564",
"0.65874153",
"0.6582454",
"0.65792215",
"0.6560508",
"0.6559659",
"0.65071297",
"0.6499553",
"0.6433056",
"0.64257056",
"0.64143366",
"0.64120835",
"0.64077044",
"0.6399704",
"0.6373763",
"0.6368754",
"0.63481516",
"0.63446873",
"0.63233566",
"0.6319329",
"0.6307175",
"0.6277514",
"0.6272734",
"0.61927855",
"0.61846256",
"0.6158035",
"0.6150797",
"0.6143168",
"0.6110952",
"0.61082596",
"0.6103611",
"0.6082112",
"0.60820585",
"0.60813075",
"0.6078948",
"0.60741484",
"0.60302305",
"0.6015531",
"0.6015269",
"0.59894943",
"0.59764534",
"0.5975735",
"0.59649646",
"0.5952774",
"0.5950951",
"0.59374297",
"0.59333",
"0.59329236",
"0.5925862",
"0.5923377",
"0.58990437",
"0.58829826",
"0.5863799",
"0.58503497",
"0.5848847",
"0.58474016",
"0.58448905",
"0.5838738",
"0.58337575",
"0.5831859",
"0.5831841",
"0.58272475",
"0.5825796",
"0.5824795",
"0.5817337",
"0.58059055",
"0.58052516",
"0.5800201",
"0.5787321",
"0.57863176",
"0.57838595",
"0.57741094",
"0.5754837",
"0.5742983",
"0.5741593",
"0.5739028",
"0.57383454",
"0.5736163",
"0.57348156",
"0.5732839",
"0.57194656",
"0.57193506",
"0.5718943",
"0.57165694",
"0.57158446",
"0.57144994",
"0.571185",
"0.57111496",
"0.570205"
] | 0.0 | -1 |
Get generic element for given configName Configurations, String, or Float | public <T> T Get(String configName)
{
// divide path
if(configName.contains("."))
{
String firstName = configName.substring(0, configName.indexOf("."));
String lastName = configName.substring(configName.indexOf(".") + 1);
Configurations firstConfigurations = this.<Configurations>Get(firstName);
if(firstConfigurations == null)
{
return null;
}
return firstConfigurations.<T>Get(lastName);
}
// return first castable object
if(configurationMap.get(configName.toLowerCase()) != null)
{
for(Object obj : configurationMap.get(configName.toLowerCase()))
{
try
{
return (T) obj;
}
catch(Exception e)
{}
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public <T> T getElement(String name) {\n return elements.get(name);\n }",
"Element getGenericElement();",
"public abstract String getConfigElementName();",
"public String getConfigurationValue(String name);",
"Configuration getConfigByKey(String configKey);",
"IElementDef parse(ConfigSource configSource);",
"public TLProperty getElement(String elementName);",
"public Element getElement(String name) {\r\n return (Element)elements.get(name);\r\n }",
"ParameterConfiguration getParameterConfiguration(String name);",
"public static Element getTextureElement(String textureName) {\r\n\t\tElement textureElement = null;\r\n\t\tfor (Element tex : settings) {\r\n\t\t\tif (tex.getAttribute(\"name\").equals(textureName)) {\r\n\t\t\t\ttextureElement = tex;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn textureElement;\r\n\t}",
"<T> T getElementFromString(final String elementString, final Class<T> movilizerElementClass);",
"public static EndpointType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tEndpointType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"default Optional<ClassElement> getClassElement(String name) {\n return Optional.empty();\n }",
"public Optional<TypeUsage> getGenericParameterByName(String name) {\n int i = 0;\n for (TypeParameter tp : typeDeclaration.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(this.typeParameters.get(i));\n }\n i++;\n }\n return Optional.empty();\n }",
"public <T> T getProperty(String name, Class<T> type);",
"public String getType(String xmlName)\n {\n int index = getIndex(xmlName);\n \n if (index < 0)\n {\n return null;\n }\n return getType(index);\n }",
"ConfigType getConfigTypeByCode(String typeCode);",
"public <T extends NameClass> T getObject(T[] elementList, String name) {\r\n for (T singleElement : elementList) {\r\n if (singleElement.getName().equalsIgnoreCase(name)) {\r\n return singleElement;\r\n }\r\n }\r\n return null;\r\n }",
"public abstract Optional<FileConfiguration> getConfiguration(String name);",
"public <T> ArrayList<T> GetAll(String configName)\r\n\t{\r\n\t\tArrayList<T> ret = new ArrayList<T>();\r\n\r\n\t\t// divide path\r\n\t\tif(configName.contains(\".\"))\r\n\t\t{\r\n\t\t\tString firstName = configName.substring(0, configName.indexOf(\".\"));\r\n\t\t\tString lastName = configName.substring(configName.indexOf(\".\") + 1);\r\n\t\t\t\r\n\t\t\tArrayList<Configurations> allFirstConfigurations = this.<Configurations>GetAll(firstName);\r\n\t\t\tif(allFirstConfigurations == null)\r\n\t\t\t{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(Configurations firstConfigurations : allFirstConfigurations)\r\n\t\t\t{\r\n\t\t\t\tret.addAll(firstConfigurations.<T>GetAll(lastName));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t\t\r\n\t\t// return all castable objects\r\n\t\tif(configurationMap.get(configName.toLowerCase()) != null)\r\n\t\t{\r\n\t\t\tfor(Object obj : configurationMap.get(configName.toLowerCase()))\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tret.add((T) obj);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e) {}\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t}",
"abstract Object getXMLProperty(XMLName name);",
"protected String getComponentConfigProperty(\n String name,\n org.opencrx.kernel.admin1.jmi1.ComponentConfiguration componentConfiguration\n ) {\n String value = null;\n Collection<org.opencrx.kernel.base.jmi1.Property> properties = componentConfiguration.getProperty();\n for(org.opencrx.kernel.base.jmi1.Property p:properties) {\n if(\n p.getName().equals(name) &&\n (p instanceof org.opencrx.kernel.base.jmi1.StringProperty)\n ) {\n value = ((org.opencrx.kernel.base.jmi1.StringProperty)p).getStringValue();\n break;\n }\n }\n return value;\n }",
"protected Class<?> getOptionalElementType(String optionalName) {\n try {\n Method m = type.getMethod(optionalName);\n return m.getReturnType();\n } catch (NoSuchMethodException ex) {\n return null;\n }\n }",
"Type<?> get(String name);",
"public Optional<Map.Entry<String, Object>> findConfig(final String name)\n\t{\n\t\tfor (Map.Entry<String, Object> param : getConfig().entrySet())\n\t\t{\n\t\t\tif (param.getKey().equals(name))\n\t\t\t{\n\t\t\t\treturn Optional.of(param);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Optional.empty();\n\t}",
"public T get(String name) {\n\t\treturn get(name, 0);\n\t}",
"private Element createConfigElement(PentahoConfig config) {\n\t\tElement configElem = new Element(ROOT);\n\t\tthis.addConfigElement(configElem, String.valueOf(config.isDebug()), DEBUG);\n\t\tthis.addConfigElement(configElem, config.getServerUsername(), serverUsername_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerPassword(), serverPassword_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerLocalUrl(), serverLocalUrl_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerLocalPort(), serverLocalPort_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerLocalProtocol(), serverLocalProtocol_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerUrl(), serverUrl_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerPort(), serverPort_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerProtocol(), serverProtocol_ELEM);\n\t\tthis.addConfigElement(configElem, config.getServerContextPath(), serverContextPath_ELEM);\n\t\tthis.addConfigElement(configElem, config.getReportDefBasePath(), reportDefBasePath_ELEM);\n\t\tthis.addConfigElement(configElem, config.isServerVisibleFromClient(), serverVisibleFromClient_ELEM);\n\t\tthis.addConfigElement(configElem, config.getReportDetailPage(), reportDetailPage_ELEM);\n\t\tthis.addConfigElement(configElem, config.getDataIntegrationRepositoryName(), dataIntegrationRepositoryName_ELEM);\n\t\tthis.addConfigElement(configElem, config.getDataIntegrationUsername(), dataIntegrationUsername_ELEM);\n\t\tthis.addConfigElement(configElem, config.getDataIntegrationPassword(), dataIntegrationPassword_ELEM);\n\t\treturn configElem;\n\t}",
"public <T> T getProperty(String name, Class<T> type, T defaultValue);",
"private static Object prop(Map<String, ?> config, BundleContext bundleContext, String name) {\n Object value = bundleContext.getProperty(name);\n if (value != null) {\n return value;\n }\n\n //Fallback to one from config\n return config.get(name);\n }",
"public static DataType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tDataType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"TypeElement getTypeElement();",
"public static Element addOrGet(String name)\n\t{\n\t\tString lowerName = name.toLowerCase();\n\t\t\n\t\tif(LIST_OF_ACTIVE_ELEMENT.containsKey(lowerName))\n\t\t\treturn LIST_OF_ACTIVE_ELEMENT.get(lowerName);\n\t\telse if(LIST_OF_UNACTIVE_ELEMENT.containsKey(lowerName))\n\t\t\treturn LIST_OF_UNACTIVE_ELEMENT.get(lowerName);\n\t\telse\n\t\t\treturn new Element(lowerName);\n\t}",
"private Element createXmlElementForNameValuePair(Value name, Value value, Document xmlDocument, Constraint constraint) {\n\t\tif (excludedNames.contains(name.toString()))\n\t\t\treturn null;\n\t\t\n\t\tif (constraint != null)\n\t\t\tname = MultiValue.simplify(name, constraint);\n\t\telse {\n\t\t\tname = MultiValue.simplify(name);\n\t\t}\n\t\tif (name == Undefined.UNDEFINED)\n\t\t\treturn null;\n\n\t\t\t\n\t\tif (constraint != null)\n\t\t\tvalue = MultiValue.simplify(value, constraint);\n\t\telse {\n\t\t\tvalue = MultiValue.simplify(value);\n\t\t}\n\t\tif (value == Undefined.UNDEFINED || value instanceof NullValue)\n\t\t\treturn null;\n\t\t\n\t\tElement element = xmlDocument.createElement(XML_NAME_VALUE);\n\t\telement.setAttribute(XML_DESC, name.toString());\n\t\telement.setAttribute(XML_INFO1, value instanceof ObjectExtValue ? \"Object\" : value.toString());\n\t\t\n\t\tElement childElement = createXmlElementForValue(value, xmlDocument, constraint);\n\t\tif (childElement != null)\n\t\t\telement.appendChild(childElement);\n\t\t\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}",
"public By getLocator(String elementName) {\n\t\t// Read value using the logical name as Key\n\t\tString locator = properties.getProperty(elementName);\n\t\t// Split the value which contains locator type and locator value\n\t\tString temp[] = locator.split(\":\", 2);\n\t\tString locatorType = temp[0];\n\t\tString locatorValue = temp[1];\n\t\t// Return a instance of By class based on type of locator\n\t\tif (locatorType.toLowerCase().equals(\"id\")) {\n\t\t\treturn By.id(locatorValue);\n\t\t} else if (locatorType.toLowerCase().equals(\"name\"))\n\t\t\treturn By.name(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"classname\")) || (locatorType.toLowerCase().equals(\"class\")))\n\t\t\treturn By.className(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"tagname\")) || (locatorType.toLowerCase().equals(\"tag\")))\n\t\t\treturn By.tagName(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"mtagname\")) || (locatorType.toLowerCase().equals(\"mtag\")))\n\t\t\treturn MobileBy.tagName(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"linktext\")) || (locatorType.toLowerCase().equals(\"link\")))\n\t\t\treturn By.linkText(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"partiallinktext\"))\n\t\t\treturn By.partialLinkText(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"cssselector\")) || (locatorType.toLowerCase().equals(\"css\")))\n\t\t\treturn By.cssSelector(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"xpath\"))\n\t\t\treturn By.xpath(locatorValue);\n\t\telse\n\t\t\tAssert.fail(\"Locator type '\" + locatorType + \"' not defined!!\");\n\t\treturn null;\n\t}",
"public WebElement findElementByName(String NameValue) {\n\t\ttry {\n\t\t\tElement = driver.findElement(By.name(NameValue));\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t\treturn Element;\n\n\t}",
"public String getValue(String xmlName)\n {\n int index = getIndex(xmlName);\n \n if (index < 0)\n {\n return null;\n }\n return getValue(index);\n }",
"String getElementNameById(Integer elementId);",
"public static WebElement getElement(String elementName) {\n\t\treturn getElement(elementName, null);\n\t}",
"public static Template getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tTemplate result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"protected abstract Type loadDefaultElement();",
"private Element getNumberOrVariableOrStringElement(Token token) {\n switch (token.getType()) {\n case INT:\n return new ElementConstantInteger((int) token.getValue());\n case DOUBLE:\n return new ElementConstantDouble((double) token.getValue());\n case VARIABLE:\n return new ElementVariable((String) token.getValue());\n case STRING:\n return new ElementString((String) token.getValue());\n default:\n throw new SmartScriptParserException(\"Invalid argument inside for tag.\");\n }\n}",
"@SuppressWarnings(\"unchecked\")\r\n public static <T> T getProperty(String name) {\r\n return (T) propertyMap.get(name);\r\n }",
"public static CoverageType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCoverageType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"E getByName(String name);",
"public String getElement(String name) {\n\t\t\n\t\tField elementField = allElements.get(name);\n\t\tif (elementField == null) {\n\t\t\tthrow new ScenarioException(String.format(\"Element '%s' cannot be found among all classes. It may not have been defined\", name));\n\t\t}\n\t\t\n\t\tClass<?> pageClass = elementField.getDeclaringClass(); \n\t\t\n\t\t// create new page if we are not on it\n\t\tif (currentPage.get() == null || pageClass != currentPage.get().getClass()) {\n\t\t\ttry {\n\t\t\t\tcurrentPage.set((PageObject)pageClass.newInstance());\n\t\t\t} catch (InstantiationException | IllegalAccessException e) {\n\t\t\t\tthrow new ScenarioException(String.format(\"Page '%s' don't have default constructor, add it to avoid this error\", pageClass.getSimpleName()));\n\t\t\t}\n\t\t\tlogger.info(\"switching to page \" + pageClass.getSimpleName());\n\t\t}\n\t\t\n\t\tif (name.split(\"\\\\.\").length == 1) {\n\t\t\treturn name;\n\t\t} else {\n\t\t\treturn name.split(\"\\\\.\")[1];\n\t\t}\n\t}",
"public Optional<ResolvedType> getGenericParameterByName(String name) {\n for (ResolvedTypeParameterDeclaration tp : typeDeclaration.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(this.typeParametersMap().getValue(tp));\n }\n }\n return Optional.empty();\n }",
"String getConfigName();",
"protected abstract Class<C> getConfigClass();",
"public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}",
"@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\tbuilder.setLength(0);\n\t\tif (localName.equals(\"dimen\")) {\n\t\t\tconfigDimen = new ConfigDimen();\n\t\t\tbuilder.setLength(0);\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tconfigDimen.name = name;\n\t\t\tconfigDimen.type = type;\n\t\t} else if (localName.equals(\"boolean\")) {\n\t\t\tconfigBoolean = new ConfigBoolean();\n\t\t\tconfigBoolean.name = atts.getValue(\"name\");\n\t\t} else if (localName.equals(\"interger\")) {\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString value = atts.getValue(\"value\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tif (type == null || type.isEmpty() || type.equals(\"px\")) {\n\t\t\t\tmInteger.put(name, Integer.parseInt(value));\n\t\t\t} else if (type.equals(\"dp\") || type.equals(\"dip\")) {\n\t\t\t\tmInteger.put(name,\n\t\t\t\t\t\tTools.dip2px(mContext, Integer.parseInt(value)));\n\t\t\t}\n\t\t} else if (localName.equals(\"float\")) {\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString value = atts.getValue(\"value\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tif (type == null || type.isEmpty() || type.equals(\"px\")) {\n\t\t\t\tmFloat.put(name, Float.parseFloat(value));\n\t\t\t} else if (type.equals(\"dp\") || type.equals(\"dip\")) {\n\t\t\t\tfinal float scale = appContext.mContainerContext.getResources()\n\t\t\t\t\t\t.getDisplayMetrics().density;\n\t\t\t\tmFloat.put(name, (Float.parseFloat(value) * scale));\n\t\t\t}\n\t\t} else if (localName.equals(\"string\")) {\n\t\t\tconfigString = new ConfigString();\n\t\t\tconfigString.name = atts.getValue(\"name\");\n\n\t\t} else if (localName.equals(\"string-array\")) {\n\t\t\tparentName = atts.getValue(\"name\");\n\t\t\tparentTag = \"string-array\";\n\t\t\tstringList = new ArrayList<String>();\n\t\t\tif (mStringArray.containsKey(parentName)) {\n\t\t\t\tmStringArray.remove(parentName);\n\t\t\t}\n\t\t} else if (localName.equals(\"item\")) {\n\t\t\tif (parentTag.equals(\"string-array\")) {\n\n\t\t\t}\n\t\t}\n\t}",
"public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }",
"public static ConfigProperty find(String name) {\n for (ConfigProperty prop : ConfigProperty.values()) {\n if (prop.getName().equals(name)) {\n return prop;\n }\n }\n return null;\n }",
"public static HydroPlantType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tHydroPlantType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"String getModeledType(Object elementID) throws Exception;",
"@TestMethod(value=\"testGetParameterType_String\")\n public Object getParameterType(String name) {\n \tif (\"maxIterations\".equals(name)) return Integer.MAX_VALUE;\n \tif (\"lpeChecker\".equals(name)) return Boolean.TRUE;\n \tif (\"maxResonStruc\".equals(name)) return Integer.MAX_VALUE;\n return null;\n }",
"default Optional<ClassElement> getClassElement(String name, ElementAnnotationMetadataFactory annotationMetadataFactory) {\n return Optional.empty();\n }",
"@NonNull\n ElementFactory<?, ?, ?, ?> getElementFactory();",
"public interface ConfigReader {\n\n /**\n * Checks if the config contains the given Path\n *\n * @return boolean\n */\n boolean contains();\n\n /**\n * Returns the requested value as int\n *\n * @return int\n */\n int getInt();\n\n /**\n * Returns the requested value as boolean\n *\n * @return boolean\n */\n boolean getBoolean();\n\n /**\n * Returns the requested value as String\n *\n * @return String\n */\n String getString();\n\n /**\n * Returns a list as string\n *\n * @return String\n */\n String getStringList();\n\n /**\n * Returns the requested value as List\n *\n * @return List\n */\n List<?> getList();\n\n /**\n * Returns the requested value as Object\n *\n * @return Object\n */\n Object getObject();\n\n}",
"public Object getProperty(String attName);",
"Map<String, String> getTemplateProperties(String elementName) throws IllegalArgumentException;",
"Object getProperty(String name);",
"private static Config loadConfig(String name) {\n\n\t\tString path;\n\t\tif (name == null) {\n\t\t\tpath = \"application.json\";\n\t\t} else {\n\t\t\tpath = \"src/\"+extensionsPackage+\"/\" + name + \"/config.json\";\n\t\t}\n\n\t\tGson gson = new Gson();\n\t\tConfig config = null;\n\n\t\ttry {\n\t\t\tconfig = gson.fromJson(new FileReader(path), Config.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn config;\n\t}",
"@Override\n public ICacheElement<K, V> getCacheElement( final K name )\n {\n return this.getCacheControl().get( name );\n }",
"public static XMLConfiguration getNewXMLConfiguration(String configName) throws ConfigurationException, IOException{\n\t\tif (configList.containsKey(configName)){\n\t\t\tconfigList.remove(configName);\n\t\t}\n\t\treturn getXMLConfiguration(configName);\n\t}",
"public abstract <T> T read(String name, Class<T> clazz);",
"public static VisualizationType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tVisualizationType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static Element getGameSetting(String settingAttName) {\r\n\t\tElement settingElement = null;\r\n\t\tfor (Element sett : settings) {\r\n\t\t\tif (sett.getAttribute(settingAttName).equals(settingAttName)) {\r\n\t\t\t\tsettingElement = sett;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn settingElement;\r\n\t}",
"public static Object findElement(List<Object> elements, QName elementName) {\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (Object element : elements) {\n\t\t\tif (elementName.equals(getElementQName(element))) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Element findByName(String name) {\n for (Element element : this){\n if (element.getName().equals(name)) return element;\n }\n return null;\n }",
"public static XMLConfiguration getXMLConfiguration(String configName) throws ConfigurationException, IOException {\n\t\treturn getXMLConfiguration(configName, true);\n\t}",
"private static String getLocalConfigString(String name) {\n\t\ttry {\n\t\t\treturn (String) LOCAL_CONFIG_CLASS.getField(name).get(null);\n\t\t} catch (Exception e) {\n\t\t\tLog.e(LOG_TAG, \"No local configuration found with key \" + name);\n\t\t\treturn null;\n\t\t}\n\t}",
"public static PluginConfig getConfigType(String configType) {\n\t\tPluginConfig subsConfig = null;\n\t\tfor (PluginConfig config : PluginConfig.values()) {\n\t\t\tif (configType.equalsIgnoreCase(config.configType)) {\n\t\t\t\tsubsConfig = config;\n\t\t\t}\n\t\t}\n\t\treturn subsConfig;\n\t}",
"String getProperty(String name);",
"private ExtensibilityElement getExtElementFromDefinition(Definition definition){\n\t\ttry{\n\t\t\tMap<?, ?> serviceMap = definition.getAllServices();\n\t\t Iterator<?> serviceItr = serviceMap.entrySet().iterator();\n\t\t ExtensibilityElement extensibilityElement = null;\n\t\t \n\t\t while(serviceItr.hasNext()){\n\t\t \tMap.Entry<?, ?> svcEntry = (Map.Entry<?, ?>)serviceItr.next();\n\t\t \tService svc = (Service)svcEntry.getValue();\n\t\t \tMap<?, ?> portMap = svc.getPorts();\n\t\t \tIterator<?> portItr = portMap.entrySet().iterator();\n\t\t \t\n\t\t \twhile(portItr.hasNext()){\n\t\t \t\tMap.Entry<?, ?> portEntry = (Map.Entry<?, ?>)portItr.next();\n\t\t \t\tPort port = (Port)portEntry.getValue();\n\t\t \t\textensibilityElement = (ExtensibilityElement)port.getExtensibilityElements().get(0);\n\t\t \t}\n\t\t }\n\t\t return extensibilityElement;\n\t\t}catch(Exception e){\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\treturn null;\n\t\t}\n\t}",
"public Object lookupConfigurationEntry(String key);",
"@TestMethod(value=\"testGetParameterType_String\")\n public Object getParameterType(String name) {\n \tif (\"maxIterations\".equals(name)) return Integer.MAX_VALUE;\n return null;\n }",
"public ValueTypeElement getByValueType(IValueType valueType) {\n return new ValueTypeElement(valueType);\n }",
"public static APIVersionType getByName(String name) {\n for (int i = 0; i < VALUES_ARRAY.length; ++i) {\n APIVersionType result = VALUES_ARRAY[i];\n if (result.getName().equals(name)) {\n return result;\n }\n }\n return null;\n }",
"public static ExpressionType construire(Element elemType) {\n ExpressionType expr = null;\n Element classeElem = (Element) elemType\n .getElementsByTagName(\"expression-class\").item(0);\n String classe = classeElem.getChildNodes().item(0).getNodeValue();\n Element motCleElem = (Element) elemType.getElementsByTagName(\"keyword\")\n .item(0);\n String motCleNom = motCleElem.getChildNodes().item(0).getNodeValue();\n ConstraintOperator keyWord = ConstraintOperator\n .shortcut(StringEscapeUtils.unescapeXml(motCleNom));\n if (classe.equals(ConfigExpressionType.class.getSimpleName())) {\n expr = new ConfigExpressionType(null, keyWord);\n } else if (classe.equals(MarginExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"margin\")\n .item(0);\n Double pourcent = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n double pourcentage = 0.0;\n if (pourcent != null)\n pourcentage = pourcent.doubleValue();\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n expr = new MarginExpressionType(null, keyWord, pourcentage, unite);\n } else if (classe.equals(ReductionExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n double pourcentage = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n expr = new ReductionExpressionType(null, keyWord, pourcentage);\n } else {\n // on récupère la valeur\n Element valElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n String valeurS = valElem.getChildNodes().item(0).getNodeValue();\n CharacterValueType type = getTypeSimple(valeurS);\n Object valeur = valeurS;\n if (type.equals(CharacterValueType.INT))\n valeur = Integer.valueOf(valeurS);\n else if (type.equals(CharacterValueType.REAL))\n valeur = Double.valueOf(valeurS);\n else if (type.equals(CharacterValueType.BOOLEAN))\n valeur = Boolean.valueOf(valeurS);\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n if (classe.equals(ThreshExpressionType.class.getSimpleName()))\n expr = new ThreshExpressionType(null, keyWord, valeur, unite);\n else\n expr = new ControlExpressionType(null, keyWord, valeur, unite);\n }\n return expr;\n }",
"public String getProperty(String name);",
"static <T extends BuildSystemExtensionPoint> T getInstance(\n ExtensionPointName<T> extensionPointName, BuildSystemName buildSystemName) {\n ImmutableSet<T> matching =\n Arrays.stream(extensionPointName.getExtensions())\n .filter(f -> f.getSupportedBuildSystems().contains(buildSystemName))\n .collect(toImmutableSet());\n checkState(\n !matching.isEmpty(), \"No %s for build system %s\", extensionPointName, buildSystemName);\n checkState(\n matching.size() == 1,\n \"Multiple instances of %s for build system %s: %s\",\n extensionPointName,\n buildSystemName,\n matching);\n return matching.iterator().next();\n }",
"Object getElementID(String elementName) throws Exception;",
"default ClassElement getRequiredClassElement(String name, ElementAnnotationMetadataFactory annotationMetadataFactory) {\n return getClassElement(name, annotationMetadataFactory).orElseThrow(() -> new IllegalStateException(\"Unknown type: \" + name));\n }",
"String getElementName(Object element);",
"public Element getData()\n {\n // Ask the generic configuration's holder to export the list of specific\n // configuration's data.\n ArrayList<Element> specific_data = this._toXml_();\n\n // Build the specific configuration.\n Element generic = new Element(\"data\");\n for (int index = 0; index < specific_data.size(); index++)\n {\n generic.addContent(specific_data.get(index));\n }\n\n return generic;\n }",
"public T getElement();",
"Element getElement(String id);",
"public SelenideElement getSettingsItem(String name) {\n ElementsCollection items = this.getSettingsItems().shouldBe(sizeGreaterThan(0));\n log.info(\"searching for {} in {} items\", name, items.size());\n for (SelenideElement item : items) {\n String title = item.$(Element.SETTINGS_TITLE).shouldBe(visible).getText();\n if (name.equals(title)) {\n return item;\n }\n }\n throw new IllegalArgumentException(String.format(\"item%s not found\", name));\n }",
"ParamConfig getWrappedParam(String name);",
"private Element getElement(String elementName) {\n if (getModel() == null) {\n return null;\n }\n return getModel().getActiveRange().getElement(elementName);\n }",
"public static CollectionTypes getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCollectionTypes result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static Element getTowerInfo(String towerTagName) {\r\n\t\tElement settingElement = null;\r\n\t\tfor (Element tower : settings) {\r\n\t\t\tif (tower.getTagName().equals(towerTagName)) {\r\n\t\t\t\tsettingElement = tower;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn settingElement;\r\n\t}",
"<T> T getSysParameterValue(Class<T> dataType, String code) throws UnifyException;",
"public static Type getByHttpName(String httpName) {\n/* 126 */ if (httpName == null) return null; \n/* 127 */ return byName.get(httpName.toUpperCase(Locale.ROOT));\n/* */ }",
"private T convert(String value)\n {\n if (value == null)\n {\n return null;\n }\n\n Object result = null;\n\n if (this.converter != null)\n {\n try\n {\n result = converter.convert(value);\n }\n catch (Exception e)\n {\n throw ExceptionUtils.throwAsRuntimeException(e);\n }\n }\n else if (String.class.equals(configEntryType))\n {\n result = value;\n }\n else if (Class.class.equals(configEntryType))\n {\n result = ClassUtils.tryToLoadClassForName(value);\n }\n else if (Boolean.class.equals(configEntryType))\n {\n Boolean isTrue = \"TRUE\".equalsIgnoreCase(value);\n isTrue |= \"1\".equalsIgnoreCase(value);\n isTrue |= \"YES\".equalsIgnoreCase(value);\n isTrue |= \"Y\".equalsIgnoreCase(value);\n isTrue |= \"JA\".equalsIgnoreCase(value);\n isTrue |= \"J\".equalsIgnoreCase(value);\n isTrue |= \"OUI\".equalsIgnoreCase(value);\n\n result = isTrue;\n }\n else if (Integer.class.equals(configEntryType))\n {\n result = Integer.parseInt(value);\n }\n else if (Long.class.equals(configEntryType))\n {\n result = Long.parseLong(value);\n }\n else if (Float.class.equals(configEntryType))\n {\n result = Float.parseFloat(value);\n }\n else if (Double.class.equals(configEntryType))\n {\n result = Double.parseDouble(value);\n }\n\n return (T) result;\n }",
"String getBlipIdByElement(T element);",
"String getElement();",
"private static List<IConfigElement> getConfigElements()\n {\n\n List<IConfigElement> configElements = new ArrayList<IConfigElement>();\n\n if (ConfigReference.getInstance().isLoaded())\n {\n\n IConfigElement generalConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(Configuration.CATEGORY_GENERAL));\n IConfigElement blockConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(ConfigReference.CATEGORY_BLOCKIDS));\n\n while (generalConfigs.getChildElements().iterator().hasNext())\n {\n Object config = generalConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n\n while (blockConfigs.getChildElements().iterator().hasNext())\n {\n Object config = blockConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n }\n else\n {\n LogHelper.error(\"Attempted to retrieve config information from an unloaded config file.\");\n }\n \n return configElements;\n }",
"private static final XMLReader getXMLReaderInstance(Element config)\n throws ClassNotFoundException, NoSuchMethodException, InstantiationException,\n IllegalAccessException, java.lang.reflect.InvocationTargetException {\n String className = null;\n try {\n className = DOMUtils.getAttribute(config, CLASS_NAME_ATTR, true);\n config = DOMUtils.getElement(config, XML_READER_ELEMENT, true);\n } catch (IllegalArgumentException e) {\n return null;\n }\n\n Class[] c = { Element.class };\n Object[] o = { config };\n return (XMLReader) Class.forName(className).getConstructor(c).newInstance(o);\n }",
"public Configuration getConfiguration(String gameName, String confName) {\n\n Configuration thisConf = new Configuration();\n\n for(Configuration conf : configurations) {\n\n if(conf.getGame().getTitle().equals(gameName) && conf.getConfName().equals(confName)) {\n thisConf = conf;\n }\n }\n\n return thisConf;\n }"
] | [
"0.6157134",
"0.6039885",
"0.58539546",
"0.5751693",
"0.5593752",
"0.5561005",
"0.55150867",
"0.5452988",
"0.5410651",
"0.5295434",
"0.5240112",
"0.5208432",
"0.518534",
"0.51784766",
"0.51221174",
"0.512003",
"0.51118135",
"0.5109878",
"0.5108155",
"0.50685537",
"0.5038267",
"0.5036214",
"0.49686167",
"0.4957331",
"0.49490896",
"0.49480364",
"0.4930806",
"0.49047452",
"0.49045894",
"0.49029157",
"0.48963958",
"0.48900834",
"0.48790374",
"0.4854277",
"0.48456576",
"0.48323262",
"0.48022377",
"0.47811386",
"0.47671434",
"0.4761914",
"0.47590443",
"0.47538033",
"0.47485927",
"0.47331417",
"0.47157183",
"0.47070178",
"0.46863127",
"0.46855643",
"0.46843177",
"0.4679179",
"0.4678316",
"0.46766272",
"0.46765235",
"0.4668901",
"0.46646044",
"0.46570575",
"0.46565133",
"0.46510708",
"0.46416157",
"0.46394116",
"0.4637663",
"0.46320507",
"0.46249378",
"0.46162894",
"0.46022585",
"0.45999148",
"0.45990443",
"0.45943728",
"0.45861694",
"0.45818052",
"0.45712942",
"0.45661098",
"0.45634058",
"0.45605806",
"0.4559988",
"0.45488858",
"0.4548009",
"0.4545704",
"0.45421144",
"0.45409518",
"0.45399252",
"0.45342854",
"0.45282024",
"0.45262557",
"0.4522532",
"0.45216697",
"0.45167685",
"0.45131445",
"0.45094708",
"0.4501653",
"0.45005006",
"0.4494274",
"0.4480754",
"0.44787434",
"0.44737178",
"0.4472391",
"0.4462921",
"0.44526622",
"0.44517493",
"0.4445236"
] | 0.64334565 | 0 |
Get a list of generic elements for given configName Configurations, String, or Float | public <T> ArrayList<T> GetAll(String configName)
{
ArrayList<T> ret = new ArrayList<T>();
// divide path
if(configName.contains("."))
{
String firstName = configName.substring(0, configName.indexOf("."));
String lastName = configName.substring(configName.indexOf(".") + 1);
ArrayList<Configurations> allFirstConfigurations = this.<Configurations>GetAll(firstName);
if(allFirstConfigurations == null)
{
return null;
}
for(Configurations firstConfigurations : allFirstConfigurations)
{
ret.addAll(firstConfigurations.<T>GetAll(lastName));
}
return ret;
}
// return all castable objects
if(configurationMap.get(configName.toLowerCase()) != null)
{
for(Object obj : configurationMap.get(configName.toLowerCase()))
{
try
{
ret.add((T) obj);
}
catch(Exception e) {}
}
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static List<IConfigElement> getConfigElements()\n {\n\n List<IConfigElement> configElements = new ArrayList<IConfigElement>();\n\n if (ConfigReference.getInstance().isLoaded())\n {\n\n IConfigElement generalConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(Configuration.CATEGORY_GENERAL));\n IConfigElement blockConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(ConfigReference.CATEGORY_BLOCKIDS));\n\n while (generalConfigs.getChildElements().iterator().hasNext())\n {\n Object config = generalConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n\n while (blockConfigs.getChildElements().iterator().hasNext())\n {\n Object config = blockConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n }\n else\n {\n LogHelper.error(\"Attempted to retrieve config information from an unloaded config file.\");\n }\n \n return configElements;\n }",
"public List<Object> getList( String name )\n {\n List<Object> values = null;\n if ( config != null )\n {\n values = config.getList( name );\n LOG.debug( \"getList name [{}]\", name );\n }\n else\n {\n String warn = \"getList invalid config, can't read prop [\" + name + \"]\";\n LOG.warn( warn );\n }\n return values;\n }",
"public List<T> getAll(String name) {\n\t\tList<T> result = new ArrayList<T>();\n\t\tint sz = size();\n\t\tfor (int i = 0; i < sz; i++) {\n\t\t\tString n = getName(i);\n\t\t\tif (name == n || (name != null && name.equals(n))) {\n\t\t\t\tresult.add(getVal(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"List<Map<String,Object>> getConfigList(Request request, String configtype);",
"public List getDescriptorList(final String xmlName) {\n List list = (List) _xmlNameMap.get(xmlName);\n \n if (list == null) {\n list = new ArrayList();\n _xmlNameMap.put(xmlName, list);\n }\n \n return list;\n }",
"public <T> T getElement(String name) {\n return elements.get(name);\n }",
"List<? extends T> getPropertiesLike(String name);",
"public <T> T Get(String configName)\r\n\t{\r\n\t\t// divide path\r\n\t\tif(configName.contains(\".\"))\r\n\t\t{\r\n\t\t\tString firstName = configName.substring(0, configName.indexOf(\".\"));\r\n\t\t\tString lastName = configName.substring(configName.indexOf(\".\") + 1);\r\n\t\t\t\r\n\t\t\tConfigurations firstConfigurations = this.<Configurations>Get(firstName);\r\n\t\t\tif(firstConfigurations == null)\r\n\t\t\t{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn firstConfigurations.<T>Get(lastName);\r\n\t\t}\r\n\t\t\r\n\t\t// return first castable object\r\n\t\tif(configurationMap.get(configName.toLowerCase()) != null)\r\n\t\t{\r\n\t\t\tfor(Object obj : configurationMap.get(configName.toLowerCase()))\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\treturn (T) obj;\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e)\r\n\t\t\t\t{}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"static <T extends BuildSystemExtensionPoint> ImmutableList<T> getInstances(\n ExtensionPointName<T> extensionPointName, BuildSystemName buildSystemName) {\n return Arrays.stream(extensionPointName.getExtensions())\n .filter(f -> f.getSupportedBuildSystems().contains(buildSystemName))\n .collect(toImmutableList());\n }",
"public List<ATNConfig> elements() { return configs; }",
"List<WrappedKeyValue<TKey, TValue>> GetElements() throws IOException;",
"private List<Type> getTypes(final String name) {\n\t\tfinal List<String> baseTypes = new ArrayList<>();\n\t\tfinal String typeOrTypes = bundleConstants.getString(name + SEPERATOR + TYPES);\n\t\tif (typeOrTypes.contains(\" \")) {\n\t\t\t// has more then one type!\n\t\t\tbaseTypes.addAll(Arrays.asList(typeOrTypes.split(\" \")));\n\t\t} else {\n\t\t\t// has only one type\n\t\t\tbaseTypes.add(typeOrTypes);\n\t\t}\n\n\t\t// Convert type as String to type as Type\n\t\treturn baseTypes.stream().map(typeName -> Type.valueOf(typeName.toUpperCase())).collect(Collectors.toList());\n\t}",
"public List<ConfigurationNode> getSubNodes(String name)\n {\n if (name == null)\n {\n return getSubNodes();\n }\n\n List<ConfigurationNode> result;\n if (nodes == null)\n {\n result = null;\n }\n else\n {\n result = namedNodes.get(name);\n }\n\n if (result == null)\n {\n return Collections.emptyList();\n }\n else\n {\n return Collections.unmodifiableList(result);\n }\n }",
"IElementDef parse(ConfigSource configSource);",
"Element getGenericElement();",
"public List getList(String name) {\n Object paramValues = get(name);\n if (paramValues == null) {\n return Collections.emptyList();\n }\n if (paramValues.getClass().isArray()) {\n return Arrays.asList((Object[])paramValues);\n }\n if (paramValues instanceof Collection) {\n return new ArrayList((Collection)paramValues);\n }\n return Collections.singletonList(paramValues);\n }",
"public abstract List<Component> getComponentsByName(String name);",
"public List<ProgressConfigurationType> getConfigType(String type);",
"@SuppressWarnings(\"unchecked\")\n public List getList(String name)\n {\n Object v = getProperty(name);\n return (v == null) ? null : (List) v;\n }",
"public abstract String getConfigElementName();",
"public Template[] getTemplates(String name) {\n\tArrayList res = new ArrayList();\n\tfor (Iterator iterator = fTemplates.iterator(); iterator.hasNext();) {\n\t Template curr = (Template) iterator.next();\n\t if (curr.getName().equals(name)) {\n\t\tres.add(curr);\n\t }\n\t}\n\treturn (Template[]) res.toArray(new Template[res.size()]);\n }",
"public List<String>getHeaderElementByName(String headerName,String elementName)\n\t\t{\n\t\t\tList<Header>headers=getHeaderByName(headerName);\n\t\t\tif(headers==null)\n\t\t\t\treturn null;\n\t\t\tList<String> result=null;\n\t\t\tfor(Header header : headers)\n\t\t\t{\n\t\t\t\tfor(HeaderElement he : header.getElements())\n\t\t\t\t{\t\n\t\t\t\t\tif(he.getName().equalsIgnoreCase(elementName) && he.getValue()!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(result==null)\n\t\t\t\t\t\t\tresult=new ArrayList<String>();\n\t\t\t\t\t\tresult.add(he.getValue());\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}",
"List<Map<String,Object>> getConfigList(VirtualHost vhost, String configtype);",
"<T extends AbstractToscaType> T getElementInDependencies(Class<T> elementClass, Set<CSARDependency> dependencies, String... keyValueFilters);",
"public JSONObject handleListConfigs(MapReduceXml xml) {\n JSONObject retValue = new JSONObject();\n JSONArray configArray = new JSONArray();\n Set<String> names = xml.getConfigurationNames();\n for (String name : names) {\n String configXml = xml.getTemplateAsXmlString(name);\n ConfigurationTemplatePreprocessor preprocessor = \n new ConfigurationTemplatePreprocessor(configXml);\n configArray.put(preprocessor.toJson(name));\n }\n try {\n retValue.put(\"configs\", configArray);\n } catch (JSONException e) {\n throw new RuntimeException(\"Hard coded string is null\");\n }\n return retValue;\n }",
"public String getConfigurationValue(String name);",
"public ArrayList<Configuration> confWithThisModel(String modelName){\n\n ArrayList<Configuration> thisConf = new ArrayList<>();\n\n for(Configuration conf : configurations)\n if(conf.getModel().getName().equals(modelName))\n thisConf.add(conf);\n\n return thisConf;\n }",
"protected List<Type> getAllTNS(Map<String, Type> localMap, String tnsType){\r\n\t\r\n\t\tList<Type> types=new ArrayList<Type>();\r\n\t\tif(tnsType.startsWith(\"tns:\")){\r\n\t\t\r\n\t\tString tnsName=tnsType.substring(tnsType.indexOf(\":\")+1);\r\n\t\tif(localMap.containsKey(tnsName.trim())){\r\n\t\t\t\t\r\n\t\t\tType originalComplex=localMap.get(tnsName.trim());\r\n\t\tif(originalComplex instanceof SequenceType){\t\r\n\t\t\tSequenceType t1=(SequenceType)originalComplex;\t\r\n\t\t\treturn t1.getElements();\r\n\t\t}\r\n\t\tif(originalComplex instanceof ChoiceType){\r\n\t\t\t\t\t\r\n\t\t\tChoiceType t2=(ChoiceType)originalComplex;\r\n\t\t\treturn t2.getElements();\r\n\t\t}\r\n\t\tif(originalComplex instanceof AllComplexType){\r\n\t\t\t\t\t\r\n\t\t\tAllComplexType t3=(AllComplexType)originalComplex;\r\n\t\t\treturn t3.getElements();\r\n\t\t}\r\n\t}\t \r\n\t} \r\n\t\treturn types; //will always be an empty set.\r\n\t}",
"public List getList(String name)\n\t\t{\n\t\t\tif(m_structuredArtifact == null)\n\t\t\t{\n\t\t\t\tm_structuredArtifact = new Hashtable();\n\t\t\t}\n\t\t\tObject value = m_structuredArtifact.get(name);\n\t\t\tList rv = new Vector();\n\t\t\tif(value == null)\n\t\t\t{\n\t\t\t\tm_structuredArtifact.put(name, rv);\n\t\t\t}\n\t\t\telse if(value instanceof Collection)\n\t\t\t{\n\t\t\t\trv.addAll((Collection)value);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\trv.add(value);\n\t\t\t}\n\t\t\treturn rv;\n\n\t\t}",
"public ConfigListDTO getListProperty(final String name) {\n \t\treturn listProperties.get(name);\n \t}",
"protected java.util.List getAttributeListForElement(String elementName){\n String dtdName = null;\n if(UpgradeConstants.VERSION_91.equals(commonInfoModel.getTargetVersion())) { \n dtdName = \"sun-domain_1_3.dtd\";\n } else {\n dtdName = \"sun-domain_1_2.dtd\";\n }\t \n String dtdFileName = this.commonInfoModel.getTargetInstallDir()+File.separator+\"lib\"+File.separator+\"dtds\"+File.separator+dtdName;\n return AttributeExtracter.getExtracter(dtdFileName).getAttributeList(elementName); \n }",
"List<Type> getTypeList(String type);",
"public Element getData()\n {\n // Ask the generic configuration's holder to export the list of specific\n // configuration's data.\n ArrayList<Element> specific_data = this._toXml_();\n\n // Build the specific configuration.\n Element generic = new Element(\"data\");\n for (int index = 0; index < specific_data.size(); index++)\n {\n generic.addContent(specific_data.get(index));\n }\n\n return generic;\n }",
"private List<MongoElement> elementsUnder (String documentName) {\n List<MongoElement> elements = new ArrayList<>();\n\n genElements.forEach(consumer -> {\n if (consumer.parent.equals(documentName))\n elements.add(consumer);\n });\n\n return elements;\n }",
"public List<String> getT();",
"List<ITypeDescriptor> getSubTypes(String type) throws StoreException;",
"Map<String, List<String>> getElementBaseConfigurationOptions();",
"public Iterator getDescriptors(final String xmlName) {\n return this.getDescriptorList(xmlName).iterator();\n }",
"private List<String> readTemperatureValues(XmlPullParser xpp)\n throws XmlPullParserException, IOException\n {\n List<String> values = new ArrayList<String>();\n\n int eventType = xpp.next();\n while (eventType != XmlPullParser.END_DOCUMENT)\n {\n if (eventType == XmlPullParser.START_TAG)\n {\n if (xpp.getName().equalsIgnoreCase(VALUE))\n {\n String value = xpp.nextText();\n if(value.length() != 0)\n values.add(value);\n else\n // sometimes you get an empty value like <value type=\"nil\" />\n values.add(INVALID); \n }\n }\n else if (eventType == XmlPullParser.END_TAG)\n {\n // exit when we get to \"</temperature>\"\n if (xpp.getName().equalsIgnoreCase(TEMPERATURE))\n break;\n }\n eventType = xpp.next();\n }\n return values;\n }",
"org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList();",
"public interface ConfigReader {\n\n /**\n * Checks if the config contains the given Path\n *\n * @return boolean\n */\n boolean contains();\n\n /**\n * Returns the requested value as int\n *\n * @return int\n */\n int getInt();\n\n /**\n * Returns the requested value as boolean\n *\n * @return boolean\n */\n boolean getBoolean();\n\n /**\n * Returns the requested value as String\n *\n * @return String\n */\n String getString();\n\n /**\n * Returns a list as string\n *\n * @return String\n */\n String getStringList();\n\n /**\n * Returns the requested value as List\n *\n * @return List\n */\n List<?> getList();\n\n /**\n * Returns the requested value as Object\n *\n * @return Object\n */\n Object getObject();\n\n}",
"public static CollectionTypes getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCollectionTypes result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public List<ConfigurationNode> getChildren(String name)\n {\n return children.getSubNodes(name);\n }",
"public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}",
"Map<Double, Element> getElements();",
"Map<String, String> getTemplateProperties(String elementName) throws IllegalArgumentException;",
"public <T extends NameClass> T getObject(T[] elementList, String name) {\r\n for (T singleElement : elementList) {\r\n if (singleElement.getName().equalsIgnoreCase(name)) {\r\n return singleElement;\r\n }\r\n }\r\n return null;\r\n }",
"public Optional<TypeUsage> getGenericParameterByName(String name) {\n int i = 0;\n for (TypeParameter tp : typeDeclaration.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(this.typeParameters.get(i));\n }\n i++;\n }\n return Optional.empty();\n }",
"java.util.List getClassPathElements();",
"private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }",
"java.util.List<java.lang.Float> getInList();",
"Collection<String> readConfigs();",
"private static List<GModuleConfiguration> getModuleConfigurationInstances(Object parent,\n\t\tGModuleDef moduleDef)\n\t{\n\t\tEList<? extends GPackageableElement> elements = null;\n\t\tif (parent instanceof GARPackage)\n\t\t{\n\t\t\telements = ((GARPackage) parent).gGetElements();\n\t\t}\n\t\tif ((elements == null) || (moduleDef == null))\n\t\t{\n\t\t\treturn Collections.emptyList();\n\t\t}\n\n\t\t// retrieve only module configuration instances having specified\n\t\t// definition\n\n\t\t// CHECKSTYLE:OFF\n\t\t// disabled checkstyles in order to be able to have an ArrayList\n\t\t// instance variable.\n\t\tArrayList<GModuleConfiguration> result = new ArrayList<GModuleConfiguration>();\n\t\t// CHECKSTYLE:ON\n\t\tfor (GPackageableElement element: elements)\n\t\t{\n\t\t\tif (GModuleConfiguration.class.isAssignableFrom(element.getClass()))\n\t\t\t{\n\t\t\t\tGModuleConfiguration moduleConfiguration = (GModuleConfiguration) element;\n\t\t\t\tif (moduleDef.equals(moduleConfiguration.gGetDefinition()))\n\t\t\t\t{\n\t\t\t\t\tresult.add(moduleConfiguration);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tresult.trimToSize();\n\t\treturn result;\n\t}",
"public List<String> getDataPointTypes() {\n Object[] dpTypes = (Object[])configMap.get(DATA_POINT_TYPES);\n List<String> types = Utility.downcast( dpTypes );\n return types;\n }",
"public XStream getConfigEntriesXstream() {\n XStream xstream = new XStream(new DomDriver(\"UTF-8\"));\n xstream.alias(\"configEntries\", List.class);\n\n ClassAliasingMapper mapper = new ClassAliasingMapper(xstream.getMapper());\n mapper.addClassAlias(\"configEntry\", ConfigEntry.class);\n xstream.registerConverter(new CollectionConverter(mapper));\n\n return xstream;\n }",
"public List<Configuration> getAll();",
"<E extends CtElement> List<E> getElements(Filter<E> filter);",
"List<String> getListInput(String fieldName);",
"public static <T> List<T> getByName(Class<T> type, String name) {\n Session session = null;\n Transaction tx = null;\n List<T> list = null;\n try {\n session = Db.getInstance().createSession();\n tx = session.beginTransaction();\n Query query = session.createQuery(\"from \" + type.getName() +\n \" where name = :name\");\n query.setParameter(\"name\", name);\n list = query.list();\n tx.commit();\n } catch(HibernateException ex) {\n // TODO add logging statements\n tx.rollback();\n return null;\n } finally {\n if(session != null) { session.close(); }\n }\n return list;\n }",
"public static ArrayList<ConfigurationItem> getAllConfigurationItems() {\n\t\tString path = CONFIGURATION;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\tArrayList<ConfigurationItem> items = getConfigItems(response);\n\t\treturn items;\n\t}",
"public Element getElement(String name) {\r\n return (Element)elements.get(name);\r\n }",
"public static List<WebElement> getElements(WebDriver driver, String element) throws ConfigurationException,\r\n SecurityException, InstantiationException, IllegalAccessException, ClassNotFoundException, IOException, InterruptedException {\r\n String xPath = getXPath(element);\r\n waitUntilDocumentIsReady(driver);\r\n WebDriverWait wait = new WebDriverWait(driver, 30);\r\n wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy((By.xpath(xPath))));\r\n return driver.findElements(By.xpath(xPath));\r\n }",
"public TLProperty getElement(String elementName);",
"public String getSearchForConfigElements()\n {\n return searchForConfigElements;\n }",
"List<ConfigCategory> getCategoryOfTypeAndDisplayName(String typeConstant, String catDisplayName);",
"public static final List<DataTypeDescription<?>> list(){\r\n List<DataTypeDescription<?>> list = new ArrayList<DataTypeDescription<?>>();\r\n list.add(STRING.getDescription());\r\n list.add(ORDERED_STRING.getDescription());\r\n list.add(DATE.getDescription());\r\n list.add(DECIMAL.getDescription());\r\n list.add(INTEGER.getDescription());\r\n return list;\r\n }",
"private List<String> getTemplateList(String portletName, String category) throws Exception {\n List<String> templateOptionList = new ArrayList<String>();\n List<Node> templateNodeList = templateManagerService.getTemplatesByCategory(portletName, category, SessionProvider.createSystemProvider());\n for (Node templateNode : templateNodeList) {\n templateOptionList.add(templateNode.getPath());\n }\n return templateOptionList;\n }",
"ParameterConfiguration getParameterConfiguration(String name);",
"public List<String> getListOfTemplatesInGadget(){\r\n\t\tList<String> templates = new ArrayList<String>();\r\n\t\tList<WebElement> ele = driver.findElements(By.xpath(\"//div[contains(@class,'x-gadget')]//div[contains(@class,'helpdesk-newcall')]//div[@class='tplLabel']\"));\r\n\t\tfor(WebElement template : ele)\r\n\t\t\ttemplates.add(template.getText());\r\n\t\treturn templates;\r\n\t}",
"List<ConfigData> selectByExample(ConfigDataExample example);",
"@SuppressWarnings(\"unchecked\")\n\tpublic static ArrayList<String> listObjects(String name){\n\t\tRegistryInterface stub = null;\n\t\ttry{\n\t\t\tstub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t}catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn (ArrayList<String>)stub.listObjects(name);\n\t\t\t\n\t}",
"@Override\n public Map<K, ICacheElement<K, V>> getCacheElements( final Set<K> names )\n {\n return this.getCacheControl().getMultiple( names );\n }",
"public java.util.List<String> getConfigurationTemplates() {\n if (configurationTemplates == null) {\n configurationTemplates = new java.util.ArrayList<String>();\n }\n return configurationTemplates;\n }",
"public static void generateGenericConfigs(ArrayList<EurAddConfig> configs, int h1, int h2, int thr, int maxBars, int tp, int sl,\r\n\t\t\tdouble stdfactor) {\n\t\t\r\n\t\tfor (int i=h1;i<=h2;i++){\r\n\t\t\tEurAddConfig config = configs.get(i);\r\n\t\t\tif (config==null){\r\n\t\t\t\tconfig = new EurAddConfig(i,thr,maxBars,tp,sl,stdfactor);\r\n\t\t\t\tconfigs.set(i, config);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tconfig.setParams(i,thr,maxBars,tp,sl,stdfactor);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@GetMapping(\"/config-parameters\")\n @Timed\n public List<ConfigParameter> getAllConfigParameters() {\n log.debug(\"REST request to get all ConfigParameters\");\n return configParameterRepository.findAll();\n }",
"public static PropertyDescriptionBuilder<List<String>> listOfStringsProperty(String name) {\n // Trick to work-around type erasure\n // https://stackoverflow.com/a/30754982/2535153\n @SuppressWarnings(\"unchecked\")\n Class<List<String>> clazz = (Class<List<String>>)(Class<?>)List.class;\n return PropertyDescriptionBuilder.start(name, clazz, Parsers.parseList(Parsers::parseString));\n }",
"public interface DynamicValueConfig {\n List<Integer> mo2065a();\n\n int mo2066b();\n }",
"@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\tbuilder.setLength(0);\n\t\tif (localName.equals(\"dimen\")) {\n\t\t\tconfigDimen = new ConfigDimen();\n\t\t\tbuilder.setLength(0);\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tconfigDimen.name = name;\n\t\t\tconfigDimen.type = type;\n\t\t} else if (localName.equals(\"boolean\")) {\n\t\t\tconfigBoolean = new ConfigBoolean();\n\t\t\tconfigBoolean.name = atts.getValue(\"name\");\n\t\t} else if (localName.equals(\"interger\")) {\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString value = atts.getValue(\"value\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tif (type == null || type.isEmpty() || type.equals(\"px\")) {\n\t\t\t\tmInteger.put(name, Integer.parseInt(value));\n\t\t\t} else if (type.equals(\"dp\") || type.equals(\"dip\")) {\n\t\t\t\tmInteger.put(name,\n\t\t\t\t\t\tTools.dip2px(mContext, Integer.parseInt(value)));\n\t\t\t}\n\t\t} else if (localName.equals(\"float\")) {\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString value = atts.getValue(\"value\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tif (type == null || type.isEmpty() || type.equals(\"px\")) {\n\t\t\t\tmFloat.put(name, Float.parseFloat(value));\n\t\t\t} else if (type.equals(\"dp\") || type.equals(\"dip\")) {\n\t\t\t\tfinal float scale = appContext.mContainerContext.getResources()\n\t\t\t\t\t\t.getDisplayMetrics().density;\n\t\t\t\tmFloat.put(name, (Float.parseFloat(value) * scale));\n\t\t\t}\n\t\t} else if (localName.equals(\"string\")) {\n\t\t\tconfigString = new ConfigString();\n\t\t\tconfigString.name = atts.getValue(\"name\");\n\n\t\t} else if (localName.equals(\"string-array\")) {\n\t\t\tparentName = atts.getValue(\"name\");\n\t\t\tparentTag = \"string-array\";\n\t\t\tstringList = new ArrayList<String>();\n\t\t\tif (mStringArray.containsKey(parentName)) {\n\t\t\t\tmStringArray.remove(parentName);\n\t\t\t}\n\t\t} else if (localName.equals(\"item\")) {\n\t\t\tif (parentTag.equals(\"string-array\")) {\n\n\t\t\t}\n\t\t}\n\t}",
"public List<Goods> goodsFindByTypeName(String name) {\n\t\treturn null;\r\n\t}",
"@Override\n public List<ConfigurationNode> getAttributes(String name)\n {\n return attributes.getSubNodes(name);\n }",
"public Optional<Map.Entry<String, Object>> findConfig(final String name)\n\t{\n\t\tfor (Map.Entry<String, Object> param : getConfig().entrySet())\n\t\t{\n\t\t\tif (param.getKey().equals(name))\n\t\t\t{\n\t\t\t\treturn Optional.of(param);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Optional.empty();\n\t}",
"public static final\n List<String> ccListAllFieldName(Class<?> pxClass, Class<?>pxFieldType){\n \n //-- check in\n if(pxClass==null){return null;}\n \n //-- retrieve\n Field[] lpDesField = pxClass.getDeclaredFields();\n if(lpDesField==null){return null;}\n if(lpDesField.length==0){return null;}\n \n //-- filtering\n List<String> lpRes=new LinkedList<String>();\n for(Field it:lpDesField){\n if(it==null){continue;}\n if(pxFieldType==null){continue;}\n if(it.getType().equals(pxFieldType)){\n lpRes.add(it.getName());\n }//+++\n }//..~\n \n return lpRes;\n \n }",
"@Override\n\tpublic BindingResult<Object> bind(ConfijNode config) {\n\t\tList<BindingResult<?>> bindingResultChildren = new ArrayList<>();\n\t\t// TODO: add config to allow null values in array\n\t\tList<ConfijNode> childNodes = CollectionUtil.childrenAsContinuousList(config);\n\t\tObject result = Array.newInstance(componentType.getErasedType(), childNodes.size());\n\t\tint i = 0;\n\t\tfor (ConfijNode childNode : childNodes) {\n\t\t\tBindingResult<?> item = componentDescription.bind(childNode);\n\t\t\tArray.set(result, i++, item.getValue());\n\t\t\tbindingResultChildren.add(item);\n\t\t}\n\t\treturn BindingResult.of(result, config, bindingResultChildren);\n\t}",
"@Override\n\t\tpublic abstract List<T> parse(Object valueToParse, Type elementType);",
"public List<String> getSolutionsOverviewNamesFromConfig() throws Exception\n {\n DMLogger.methodStarted();\n // TODO add path for QH DM2Web config (system-config.json)\n String jsonTxt = ssh.runCommand( \"less /etc/ddn/directmon/system-config.json\" );\n\n JSONObject json = ( JSONObject ) JSONSerializer.toJSON( jsonTxt );\n Set<?> s = json.keySet();\n\n List<String> result = new ArrayList<String>();\n for( Object value : s )\n {\n Set<String> keySet = json.getJSONObject( value.toString() ).keySet();\n result.addAll( keySet );\n }\n\n for( int i = 0; i < result.size(); i++ )\n {\n String element = result.get( i ).toString();\n element = element.substring( 0, element.indexOf( \":\" ) );\n //skip ES solutions\n if( !\"es\".equals( element.indexOf( \":\" ) ) )\n {\n result.set( i, element );\n }\n\n }\n DMLogger.methodFinished( result );\n return result;\n }",
"protected Collection<CommandParameter> getContainerChildDescriptors(GContainer containerConfig)\n\t{\n\t\tGContainerDef containerDef = containerConfig.gGetDefinition();\n\t\tList<CommandParameter> result = new ArrayList<CommandParameter>();\n\t\tif (containerDef instanceof GParamConfContainerDef)\n\t\t{\n\t\t\tEList<? extends GContainerDef> childContainerDefs = ((GParamConfContainerDef) containerDef).gGetSubContainers();\n\t\t\tresult.addAll(collectSubcontainerDescriptors(childContainerDefs, containerConfig));\n\t\t}\n\t\telse if (containerDef instanceof GChoiceContainerDef)\n\t\t{\n\t\t\tEList<? extends GContainerDef> childContainerDefs = ((GChoiceContainerDef) containerDef).gGetChoices();\n\t\t\tresult.addAll(collectSubcontainerDescriptors(childContainerDefs, containerConfig));\n\t\t}\n\n\t\treturn result;\n\t}",
"public List getChildren(String name) {\n List elements = new ArrayList();\n NodeList nodes = element.getChildNodes();\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n if ((node.getNodeType() == Node.ELEMENT_NODE) && node.getNodeName().equals(name)) {\n elements.add(new Element((org.w3c.dom.Element)node));\n }\n }\n\n return elements;\n }",
"Configuration getConfigByKey(String configKey);",
"private static void populateList(String name) throws Exception {\n\t\tDocument dom = null;\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\ttry {\n\t\t\t// Using factory get an instance of document builder\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"populateList: Boolean Model XML location passed: \"\n\t\t\t\t\t\t\t+ name);\n\t\t\t// parse using builder to get DOM representation of the XML file\n\t\t\tdom = db.parse(name);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"populateList: Error\");\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\t// get a nodelist of 'expression' elements\n\t\tNodeList nl = dom.getElementsByTagName(EXPRESSION_TAG);\n\t\tSystem.out.println(\"populateList: Node Size: \" + nl.getLength());\n\t\t\n\t\tString expression;\n\t\tNode node;\n\n\t\tif (null != nl && nl.getLength() > 0) {\n\t\t\tfor (int expCount = 0; expCount < nl.getLength(); expCount++) {\n\t\t\t\texpression = null;\n\t\t\t\t// get the expression element\n\t\t\t\tnode = (Node) nl.item(expCount);\n\n\t\t\t\ttry {\n\t\t\t\t\texpression = node.getTextContent();\n\t\t\t\t\tSystem.out.println(\"populateList: EXPRESSION: \" + expression);\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tSystem.out.println(\"populateList: Error: \");\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tallterms.add(expression);\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"populateList: Added \" + allterms.size()\n\t\t\t\t+ \" entries to expressions Arraylist.\");\n\n\t}",
"public static List getList(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.getList(key);\n }",
"public Collection<Requirement> getGenericRequirements();",
"private List<MongoElement> arraysUnder (String documentName) {\n List<MongoElement> elements = new ArrayList<>();\n\n genElements.forEach(consumer -> {\n if (consumer.parent.equals(documentName))\n elements.add(consumer);\n });\n\n return elements;\n }",
"@Override\n final public Collection<Supplier<?>> get(Class<?>[] parameters) {\n if (parameters == null || parameters.length == 0)\n return Collections.emptyList();\n // Step 2. Sequential check\n Collection<Supplier<?>> resultGenerators = new ArrayList<Supplier<?>>();\n for (Class<?> parameter : parameters) {\n if (parameter != null)\n resultGenerators.add(get(parameter));\n }\n return resultGenerators;\n }",
"List<Options> getAllOptions(Configuration config) {\r\n\t\tList<Options> result = new ArrayList<Options>();\r\n\r\n\t\tfor (SimilarityStrategy simStrat : config.getSimilarityStrategies()) {\r\n\t\t\tfor (int kN = config.getKNStart(); kN <= config.getKNEnd(); kN += config\r\n\t\t\t\t\t.getKNStep()) {\r\n\t\t\t\tfor (RatingPredictor pred : config.getPredictionStrategies()) {\r\n\t\t\t\t\tfor (double favThreshold = config.getFavThresholdStart(); favThreshold <= config\r\n\t\t\t\t\t\t\t.getFavThresholdEnd(); favThreshold += config\r\n\t\t\t\t\t\t\t.getFavThresholdStep()) {\r\n\t\t\t\t\t\tfor (double testPercentage : config\r\n\t\t\t\t\t\t\t\t.getTestSetPercentages()) {\r\n\t\t\t\t\t\t\tresult.add(new Options(simStrat, kN, pred, 10,\r\n\t\t\t\t\t\t\t\t\tfavThreshold, testPercentage));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"Collection<String> getStringListValue(int type);",
"Container getContainer(ContentType type, List<Element> elements);",
"Map<String, Element> getElements();",
"public List<IConfigProperty> getConfigPropertiesList(boolean listCategoriesFirst);",
"public abstract <T> List<T> loadAll(Class<T> paramClass);",
"@SuppressWarnings(\"unchecked\")\n private static List<Appliance> parseApplianceConfiguration() {\n List<Appliance> appliances = new ArrayList<>();\n SAXReader reader = new SAXReader();\n try {\n Document document = reader.read(new File(ConfigUtil.getConfigFilesDir() +\n File.separator + CONFIG_FILE));\n // Get the root node (appliances)\n Element root = document.getRootElement();\n // Get each sub-node (appliance) for the root\n List<Element> nodes = root.elements();\n for (Element node : nodes) {\n appliances.add(parseAppliance(node));\n }\n } catch (DocumentException e) {\n logger.warn(\"Error at parsing {}.\", CONFIG_FILE);\n }\n\n return appliances;\n }"
] | [
"0.625231",
"0.61384344",
"0.5614437",
"0.55502677",
"0.55239886",
"0.54327106",
"0.5398889",
"0.53955775",
"0.5114174",
"0.508927",
"0.50598687",
"0.5054969",
"0.5033326",
"0.5031744",
"0.4988656",
"0.4957663",
"0.4947994",
"0.49461055",
"0.49354243",
"0.4906633",
"0.49027056",
"0.48958865",
"0.4882415",
"0.48496315",
"0.48337343",
"0.4832961",
"0.48320535",
"0.48296922",
"0.48284295",
"0.4827745",
"0.48189768",
"0.47913322",
"0.4788369",
"0.47787905",
"0.47561213",
"0.47541413",
"0.47540176",
"0.4739923",
"0.4724808",
"0.4714339",
"0.47042978",
"0.46979982",
"0.46927255",
"0.46787825",
"0.4678202",
"0.46721485",
"0.46687844",
"0.46378344",
"0.4636911",
"0.46333838",
"0.4619695",
"0.4617868",
"0.46025756",
"0.4600155",
"0.4598612",
"0.45932585",
"0.45913056",
"0.4580934",
"0.4576529",
"0.45739573",
"0.4561198",
"0.45589837",
"0.45451644",
"0.4542679",
"0.45254984",
"0.45194268",
"0.44877177",
"0.44814643",
"0.4472665",
"0.4463911",
"0.44605306",
"0.4458595",
"0.4457531",
"0.44568074",
"0.4445778",
"0.4437434",
"0.44297153",
"0.4424122",
"0.44013268",
"0.44008315",
"0.43870103",
"0.43831134",
"0.43752742",
"0.43740764",
"0.4371826",
"0.43654335",
"0.436255",
"0.43429822",
"0.4340961",
"0.43222654",
"0.43204466",
"0.4318251",
"0.43151444",
"0.43103808",
"0.4302388",
"0.4300411",
"0.42957017",
"0.42909467",
"0.42854318",
"0.42764962"
] | 0.67671263 | 0 |
The ID of the spreadsheet to retrieve data from. | public static void main(String args[]) throws IOException, GeneralSecurityException {
String spreadsheetId = "1er12_Tp-m1IJNRfz-72VwVY14Gj10b-IexY60fzZiGg"; // TODO: Update placeholder value.
// The A1 notation of the values to retrieve.
String range = "a1:b4"; // TODO: Update placeholder value.
// How values should be represented in the output.
// The default render option is ValueRenderOption.FORMATTED_VALUE.
String valueRenderOption = ""; // TODO: Update placeholder value.
// How dates, times, and durations should be represented in the output.
// This is ignored if value_render_option is
// FORMATTED_VALUE.
// The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
String dateTimeRenderOption = ""; // TODO: Update placeholder value.
/* Sheets sheetsService = createSheetsService();
Sheets.Spreadsheets.Values.Get request =
sheetsService.spreadsheets().values().get(spreadsheetId, range);
request.setValueRenderOption(valueRenderOption);
request.setDateTimeRenderOption(dateTimeRenderOption);
ValueRange response = request.execute();
// TODO: Change code below to process the `response` object:
System.out.println(response);
}
/* public static Sheets createSheetsService() throws IOException, GeneralSecurityException {
HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();
JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
// TODO: Change placeholder below to generate authentication credentials. See
// https://developers.google.com/sheets/quickstart/java#step_3_set_up_the_sample
//
// Authorize using one of the following scopes:
// "https://www.googleapis.com/auth/drive"
// "https://www.googleapis.com/auth/drive.file"
// "https://www.googleapis.com/auth/drive.readonly"
// "https://www.googleapis.com/auth/spreadsheets"
// "https://www.googleapis.com/auth/spreadsheets.readonly"
/* static Urlshortener newUrlshortener() {
AppIdentityCredential credential =
new AppIdentityCredential(Arrays.asList(UrlshortenerScopes.URLSHORTENER));
return new Urlshortener.Builder(new UrlFetchTransport(), JacksonFactory.getDefaultInstance(), credential)
.build();
return new Sheets.Builder(httpTransport, jsonFactory, credential)
.setApplicationName("Google-SheetsSample/0.1")
.build();*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getSheetId() {\r\n return sheetId;\r\n }",
"public StrColumn getSheetId() {\n return delegate.getColumn(\"sheet_id\", DelegatingStrColumn::new);\n }",
"public String getWorkbookId() {\n return this.workbookId;\n }",
"public void setSheetId(long value) {\r\n this.sheetId = value;\r\n }",
"public int getSheetNumber(){\n return sheetNumber;\n }",
"public String getVsheetId() {\n return vsheetId;\n }",
"public String id() {\n return definition.getString(ID);\n }",
"public SpreadSheet getSpreadSheet(int id){\n\t\tfor (SpreadSheet s : getBubbleSpreadsheetSet()) {\n\t\t\tif (s.getId() == id)\n\t\t\t\treturn s;\n\t\t}\n\t\treturn null;\n\t}",
"public int getSheetIndex() {\r\n return sheetIndex;\r\n }",
"public String getStyleSheetId() {\n return styleSheetId;\n }",
"public int getId() {\n\t\treturn definition.get().getId();\n\t}",
"public Integer getTimesheetItemId() {\n return timesheetItemId;\n }",
"public String user_id(int a) throws IOException {\r\n\t\t\t \r\n\t\t\t FileInputStream fil = new FileInputStream(new File(\"\"));\r\n\t\t\t XSSFWorkbook workbook = new XSSFWorkbook(fil);\r\n\t\t\t XSSFSheet sheet=workbook.getSheet(\"Sheet1\");\r\n\t\t\t int count=sheet.getLastRowNum();\r\n\t\t\t System.out.println(count);\r\n\t\t\t \r\n\t\t\t\t XSSFRow row =sheet.getRow(a);\r\n\t\t\t\t XSSFCell cell=row.getCell(0);\r\n\t\t\t\t String un=cell.getStringCellValue();\r\n\t\t\t\t \r\n\t \r\n\t\t\treturn un;\r\n\t}",
"java.lang.String getDataId();",
"java.lang.String getDataId();",
"@Schema(description = \"The ID of the worklog record.\")\n public String getId() {\n return id;\n }",
"public String getId() {\n\t\treturn docid;\n\t}",
"String getID();",
"String getID();",
"String getID();",
"String getID();",
"int getCellid();",
"public String getSheetName(){\n return sheetName;\n }",
"java.lang.String getID();",
"public String getCellid() {\n return cellid;\n }",
"public String getCellid() {\n return cellid;\n }",
"public int getId() {\n\t\treturn this.data.getId();\n\t}",
"public String getID();",
"public String getID();",
"public String getID();",
"public String getID();",
"public String getID();",
"public String getID();",
"public String getID();",
"public String getId() {\r\n\t\treturn sId;\r\n\t}",
"@Import(\"id\")\n\tint getId();",
"Integer getID();",
"Integer getID();",
"public String getCellid() {\r\n return cellid;\r\n }",
"public int getCellid() {\n return cellid_;\n }",
"public String getSheetName() {\n return sheetName;\n }",
"public void setSheetNumber(int number){\n this.sheetNumber = number;\n }",
"public static String id()\n {\n return _id;\n }",
"public String getCellIdProperty() {\r\n return getAttributeAsString(\"cellIdProperty\");\r\n }",
"public String getID() {\n\t\treturn this.region.getFileName();\n\t}",
"public String getID() {\n return id;\n }",
"public String getID() {\r\n return id;\r\n }",
"public String id()\n {\n return id;\n }",
"java.lang.String getDocumentId();",
"public int getId() {\n\t\t\treturn id_;\n\t\t}",
"public int getId() {\n\t\t\treturn id_;\n\t\t}",
"public java.lang.String getId() {\n return this._id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public int getId() {\n\t\t\t\treturn id_;\n\t\t\t}",
"public int getId() {\n\t\t\t\treturn id_;\n\t\t\t}",
"public String id() {\r\n return id;\r\n }",
"public Number getID();",
"public java.lang.String getId() {\r\n return this._id;\r\n }",
"public java.lang.String getId() {\n return _id;\n }",
"public int getID() {\n return this._id;\n }",
"public int getID() {\r\n\t\treturn idNumber;\r\n\t}",
"public String getId () {\n return id;\n }",
"public int getCellid() {\n return cellid_;\n }",
"public String getId ()\n {\n return id;\n }",
"public String id() {\n\t\treturn id;\n\t}",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public java.lang.String getId() {\n return id;\n }",
"public String id() {\n return id;\n }",
"public String id() {\n return id;\n }",
"public String getID()\r\n {\r\n return id;\r\n }",
"public String getId() {\n return id;\n }",
"public int getId() {\n\t\t\treturn id;\n\t\t}",
"public int getId() {\n\t\t\treturn id;\n\t\t}",
"public int getId() {\n\t\treturn ID;\n\t}",
"public final String getId() {\n return id;\n }",
"String getSlingId();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"int getID();",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }",
"public int getId() {\n return id_;\n }"
] | [
"0.783562",
"0.7429824",
"0.6793672",
"0.67700356",
"0.6485121",
"0.62853557",
"0.61633486",
"0.6116779",
"0.6059787",
"0.59288454",
"0.5836401",
"0.57963854",
"0.5793852",
"0.5767531",
"0.5767531",
"0.5759368",
"0.5745798",
"0.5740203",
"0.5740203",
"0.5740203",
"0.5740203",
"0.5739404",
"0.57005787",
"0.5681518",
"0.5665897",
"0.5665897",
"0.5652988",
"0.5640219",
"0.5640219",
"0.5640219",
"0.5640219",
"0.5640219",
"0.5640219",
"0.5640219",
"0.5618609",
"0.56172585",
"0.55977833",
"0.55977833",
"0.55967784",
"0.55786395",
"0.5569345",
"0.55655366",
"0.5561986",
"0.554401",
"0.5528768",
"0.55252457",
"0.55188876",
"0.55102926",
"0.5509982",
"0.5508537",
"0.5508537",
"0.5505027",
"0.5501279",
"0.549877",
"0.549877",
"0.54861206",
"0.548542",
"0.54794264",
"0.5478664",
"0.547264",
"0.5470194",
"0.5468639",
"0.5467999",
"0.5467717",
"0.54667145",
"0.5466317",
"0.5466317",
"0.5466317",
"0.5460553",
"0.5460553",
"0.5451875",
"0.5449897",
"0.54471964",
"0.54471964",
"0.5445815",
"0.54400754",
"0.54374987",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.543538",
"0.54349023",
"0.54349023",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323",
"0.54320323"
] | 0.0 | -1 |
Called after an edge is added to the DAG. | public boolean addEdge(Edge edge) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addEdge(JNode edge) {\n List<JNode> newEdges = this.getEdges();\n newEdges.add(edge);\n this.setEdges(newEdges);\n }",
"protected void addEdge(CyEdge edge) {\n\tLayoutEdge newEdge = new LayoutEdge(edge);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"protected void processEdge(Edge e) {\n\t}",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"void add(Edge edge);",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"public void addEdge(Edge e){\n\t\tedges.put(e.hashCode(), e);\n\t\te.getHead().addConnection(e);\n\t\te.getTail().addConnection(e);\n\t}",
"public void addEdge(Edge edgeToAdd){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == edgeToAdd.end()){\n edge.setWeight(edgeToAdd.weight()); // Change weight and return if edge is present\n return;\n }\n }\n this.edges.add(edgeToAdd); // Add edge normally\n }",
"protected void addEdge(IEdge edge) {\n\n if (edge != null) {\n\n this.ids.add(edge.getID());\n this.edgeMap.put(edge.getID(), edge);\n }\n }",
"public void addEdge(Edge e){\n edgeList.add(e);\n }",
"public void edgeHeadChanged(GraphEvent e);",
"void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }",
"public void edgeTailChanged(GraphEvent e);",
"public void addEdge(StubEdge e) {\n }",
"public void addEdge(DrawView edge){\n drawnEdges.add(edge);\n }",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"public void addEdge(Edge e) {\n incident.add(e);\n }",
"public void addEdge( Edge edge ) {\r\n if ( edge == null ) return;\r\n edges.addElement(edge);\r\n }",
"void updateEdgeData(EdgeGraph edge) {\n\t\tedge = PedSimCity.edgesMap.get(edge.getID()); //in case it was a subgraph edge\n\t\tif (UserParameters.empiricalABM) edge.densities.replace(agp.groupName, edge.densities.get(agp.groupName)+1);\n\t\telse edge.densities.replace(ap.routeChoice, edge.densities.get(ap.routeChoice)+1);\n\t}",
"@Override\n public void addEdge(E pEdge, TimeFrame tf) {\n \n // If The Edge ID is not initialized yet, initalialize it\n if (pEdge.getId() < 0) {\n int id = edgeIdGen.getNextAvailableID();\n pEdge.setId(id);\n mapAllEdges.add(id, pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() edge (id, mapAllEdges.size) = \" + id + \", \" + mapAllEdges.size());\n }\n // Adding to the adjacent list\n if (!darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getSource().getId()).get(tf).add(pEdge);\n //System.out.println(\"\\t\\t\\t\\t\\t\\t====***************** DynamicGraph.addEdge() ading to darrGlobalAdjList \");\n if(!pEdge.isDirected() &&\n !darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).contains(pEdge)) {\n darrGlobalAdjList.get(pEdge.getDestination().getId()).get(tf).add(pEdge);\n }\n }\n \n hmpGraphsAtTimeframes.get(tf).addEdge(pEdge);\n \n }",
"public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n }\n }",
"public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}",
"public void insert(Edge edge) {\r\n edges[edge.getSource()].add(edge);\r\n if (!isDirected()) {\r\n edges[edge.getDest()].add(new Edge(edge.getDest(),\r\n edge.getSource(),\r\n edge.getWeight()));\r\n }\r\n }",
"protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge */\r\n\t\tList<DirectedEdge> edgeList = adjList.get(src);\r\n\t\tif(edgeList==null)\r\n\t\t\tedgeList = new ArrayList<DirectedEdge>();\r\n\t\t\r\n\t\tedgeList.add(edge);\r\n\t\tadjList.put(src, edgeList);\r\n\t}",
"public void addEdge(Edge edge) {\n\t\tthis.edges.add(edge);\n\t\tnrOfEdges++;\n\t}",
"@Override\n\tpublic void edge() {\n\t\tsuper.edge();\n\t\t\n\t\tIterator<Instruction> iterator = instructions_n.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tInstruction instruction = iterator.next();\n\t\t\tinstructionRegister.add(instruction);\n\t\t}\n\t\t\n\t\tinstructions_n.clear();\n\t}",
"boolean addEdge(E edge);",
"public void treeEdge(Edge e) {}",
"public void nodeAdded(GraphEvent e);",
"public void add(DefaultEdge edge) {\n edges.add(edge);\n groupObject.add(edge);\n }",
"public void loadEdge()\r\n {\r\n town.createConnection();\r\n }",
"public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }",
"public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"public abstract boolean putEdge(Edge incomingEdge);",
"void setupEdge(EdgeGraph edge) {\n\n\t\tif (UserParameters.socialInteraction) updateCrowdness(edge);\n\t\tcurrentEdge = edge;\n\t\t//transform GeomPlanarGraphEdge in Linestring\n\t\tLineString line = edge.getLine();\n\t\t//index the Linestring\n\t\tsegment = new LengthIndexedLine(line);\n\t\tstartIndex = segment.getStartIndex();\n\t\tendIndex = segment.getEndIndex();\n\t\tlinkDirection = 1;\n\n\t\t// check to ensure that Agent is moving in the right direction (direction)\n\t\tdouble distanceToStart = line.getStartPoint().distance(agentLocation.geometry);\n\t\tdouble distanceToEnd = line.getEndPoint().distance(agentLocation.geometry);\n\n\t\tif (distanceToStart <= distanceToEnd) {\n\t\t\t// closer to start\n\t\t\tcurrentIndex = startIndex;\n\t\t\tlinkDirection = 1;\n\t\t}\n\t\telse if (distanceToEnd < distanceToStart) {\n\t\t\t// closer to end\n\t\t\tcurrentIndex = endIndex;\n\t\t\tlinkDirection = -1;\n\t\t}\n\n\t}",
"public void addEdge(DocTokenInf newEdge) {\n\t\tlist[newEdge.end].put(newEdge);\n\t}",
"public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }",
"protected void addHyperEdge(IHyperEdge hyperedge) {\n\n if (hyperedge != null) {\n\n this.ids.add(hyperedge.getID());\n this.hyperEdgeMap.put(hyperedge.getID(), hyperedge);\n }\n }",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"protected boolean addEdge(Edge<N, E> edge)\n throws GraphLogicException {\n return edge.attach();\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"@Override\n\tpublic boolean addEdge(ET edge)\n\t{\n\t\tif (edge == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (edgeList.contains(edge))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tList<N> graphNodes = edge.getAdjacentNodes();\n\t\tfor (N node : graphNodes)\n\t\t{\n\t\t\taddNode(node);\n\t\t\tnodeEdgeMap.get(node).add(edge);\n\t\t}\n\t\tedgeList.add(edge);\n\t\tgcs.fireGraphEdgeChangeEvent(edge, EdgeChangeEvent.EDGE_ADDED);\n\t\treturn true;\n\t}",
"public void addVirtualEdge(E e){\n\t\tedges.add(e);\n\t\tvirtualEdges.add(e);\n\t}",
"private void releasedEdge(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {\r\n if (edgeTool.getDrawState() == true && graphX.nodesContains(e.getPoint()) == true) {\r\n edgeTool.setSeccondPoint(e.getPoint());\r\n\r\n addEdge(graphX.getNode(edgeTool.getFirstPoint()), graphX.getNode(edgeTool.getSeccondPoint()));\r\n }\r\n /* Reset the tool in any case */\r\n edgeTool.reset();\r\n }\r\n }",
"private void addEdge() {\n childMatrix[randomParent][childMatrix[randomParent][0]] = randomChild;\n childMatrix[randomParent][0]++;\n parentMatrix[randomChild][parentMatrix[randomChild][0]] = randomParent;\n parentMatrix[randomChild][0]++;\n }",
"@Override\r\n\tpublic void DAGfinished() {\n\t\t\r\n\t}",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"public void editEdge(){\n\t}",
"public void addEdge(String inLabel, double inDistance, String inMode,\n int inTime, int inPeakTime, DSAGraphNode<E> inNode)\n {\n links.insertLast(inNode);\n DSAGraphEdge<E> edge = new DSAGraphEdge<E>(inLabel, inDistance, inMode,\n inTime, inPeakTime, this,\n inNode);\n edgeList.insertLast(edge);\n }",
"void addEdges(Collection<ExpLineageEdge> edges);",
"public void addEdge(Vertex other) {\n edges.add(other);\n other.edges.add(this);\n }",
"public void addFigEdge(final FigEdge figEdge, final String sourcePortFigId,\n final String destPortFigId, final String sourceFigNodeId,\n final String destFigNodeId) {\n figEdges.add(new EdgeData(figEdge, sourcePortFigId, destPortFigId,\n sourceFigNodeId, destFigNodeId));\n }",
"void addEdge(int x, int y);",
"public void addEdge(Edge e) {\r\n int v = e.from();\r\n int w = e.to();\r\n validateVertex(v);\r\n validateVertex(w);\r\n adj[v].add(e);\r\n indegree[w]++;\r\n E++;\r\n }",
"private void attachEdges(Diagram d) {\n for (EdgeData edgeData : figEdges) {\n final FigEdge edge = edgeData.getFigEdge();\n\n Object modelElement = modelElementsByFigEdge.get(edge);\n if (modelElement != null) {\n if (edge.getOwner() == null) {\n edge.setOwner(modelElement);\n }\n }\n }\n\n for (EdgeData edgeData : figEdges) {\n final FigEdge edge = edgeData.getFigEdge();\n\n Fig sourcePortFig = findFig(edgeData.getSourcePortFigId());\n Fig destPortFig = findFig(edgeData.getDestPortFigId());\n final FigNode sourceFigNode = getFigNode(edgeData\n .getSourceFigNodeId());\n final FigNode destFigNode = getFigNode(edgeData.getDestFigNodeId());\n\n if (sourceFigNode instanceof FigEdgePort) {\n sourcePortFig = sourceFigNode;\n }\n\n if (destFigNode instanceof FigEdgePort) {\n destPortFig = destFigNode;\n }\n\n if (sourcePortFig == null && sourceFigNode != null) {\n sourcePortFig = getPortFig(sourceFigNode);\n }\n\n if (destPortFig == null && destFigNode != null) {\n destPortFig = getPortFig(destFigNode);\n }\n\n if (sourcePortFig == null || destPortFig == null\n || sourceFigNode == null || destFigNode == null) {\n LOG.log(Level.SEVERE,\n \"Can't find nodes for FigEdge: \" + edge.getId() + \":\"\n + edge.toString());\n edge.removeFromDiagram();\n } else {\n edge.setSourcePortFig(sourcePortFig);\n edge.setDestPortFig(destPortFig);\n edge.setSourceFigNode(sourceFigNode);\n edge.setDestFigNode(destFigNode);\n }\n }\n\n // Once all edges are connected do a compute route on each to make\n // sure that annotations and the edge port is positioned correctly\n // Only do this after all edges are connected as compute route\n // requires all edges to be connected to nodes.\n // TODO: It would be nice not to have to do this and restore annotation\n // positions instead.\n for (Object edge : d.getLayer().getContentsEdgesOnly()) {\n FigEdge figEdge = (FigEdge) edge;\n figEdge.computeRouteImpl();\n }\n }",
"public void setEdge(IEdge<?> edge) {\n\t\tthis.edge = edge;\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tObject obj = GetSelectedTreeViewerObject();\n\t\t\t\tif(obj instanceof Edge) {\n\t\t\t\t\t\n\t\t\t\t\tEdge edge = (Edge) obj;\n\t\t\t\t\tif (edge.getAnEClass().getEAttributes().size()==0) {\n\t\t\t\t\t\tMessageDialog.openInformation(getShell(),\"Information about add edge name\",\n\t\t\t\t\t\t\t\t\"The Class does not contain Attributes\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tEdgeLabelEAttribute edgeLabel = Graphic_representationFactory.eINSTANCE.createEdgeLabelEAttribute();\n\t\t\t\t\t\tedgeLabel.setLabelEAttribute(edge.getAnEClass().getEAllAttributes().get(0));\n\t\t\t\t\t\tedge.setEdgeLabel(edgeLabel);\t\n\t\t\t\t\t\tgetTreeViewer().refresh(obj);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Add Label EAttribute to an Edge\");\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\r\n mode = InputMode.ADD_EDGES;\r\n instr.setText(\"Drag from one node to another to add an edge.\");\r\n }",
"@Test\n\tpublic void addEdgeTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tassertTrue(graph.addEdge(edge_0));\n\t\tassertFalse(graph.addEdge(edge_0));\n\t}",
"public abstract void addEdge(Point p, Direction dir);",
"@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tif (this.currentShape instanceof Edge) {\n\t\t\tPoint2D point = new Point2D.Double(e.getX(), e.getY());\n\t\t\tfor (Shape shape: shapes) {\n\t\t\t\tif (shape.verifyShapeExists(point)){\n\t\t\t\t\t/**\n\t\t\t\t\t * Ignore if current shape is JoinPoint or EdgeLabel\n\t\t\t\t\t */\n\t\t\t\t\tif (shape instanceof JoinPoint || shape instanceof EdgeLabel) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t/**\n\t\t\t\t\t * Otherwise, set current edge point to this shape\n\t\t\t\t\t */\n\t\t\t\t\t((Edge) currentShape).setDest(shape);\n\t\t\t\t\tcurrentShape.setDrawing(false);\n\t\t\t\t\tcurrentShape = null;\n\t\t\t\t\tvalidate();\n\t\t\t\t\trepaint();\n\t\t\t\t\t/**\n\t\t\t\t\t * Notify to automata that it have changes\n\t\t\t\t\t */\n\t\t\t\t\tsetAutomataChanges();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * If it doesn't have any shape, create a new one\n\t\t\t */\n\t\t\tShape shape = shapeFactory.getShape(shapeType);\n\t\t\tshape.setPosition(point);\n\t\t\taddShape(shape);\n\t\t\t((Edge) currentShape).setDest(shape);\n\t\t\tsetAutomataChanges();\n\t\t}\n\t\tif (currentShape != null) {\n\t\t\tcurrentShape.setDrawing(false);\n\t\t\tcurrentShape = null;\n\t\t}\n\t\tvalidate();\n\t\trepaint();\n\t}",
"public static void insertEdge(Edge edge,Context context) {\n DatabaseContext dbContext = new DatabaseContext(context);\n SQLiteHelper helper = new SQLiteHelper(dbContext,\"BLEdevice.db\");\n helper.insertEdge(edge);\n // Log.e(\"insertEdge\", \"edge cout = \" +coutEdge(context));\n }",
"@Override\n\tpublic boolean insertOneEdge(NodeRelation nodeRelation) {\n\t\treturn false;\n\t}",
"private void buildEdgeFigure(IFigure contents, Edge edge) {\n\t\tPolylineConnection connx = new PolylineConnection();\n\t\tPointList points = edge.getPoints();\n\t\tXYAnchor sourceAnchor = new XYAnchor(points.getFirstPoint());\n\t\tXYAnchor targetAnchor = new XYAnchor(points.getLastPoint());\n\t\tconnx.setSourceAnchor(sourceAnchor);\n\t\tconnx.setTargetAnchor(targetAnchor);\n\t\tcontents.add(connx);\n\t}",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}",
"void addEdge(int source, int destination, int weight);",
"@Override\n public void onAddBreadRaised() {\n }",
"public void addEdges(Edge value)\r\n\t{\r\n\t\tedges.add(value);\r\n\t}",
"protected void attachEdgeTargetAnchor(String edge, String oldTargetPin, String targetPin) {\n ((ConnectionWidget) findWidget(edge)).setTargetAnchor(getPinAnchor(targetPin));\n }",
"public void addSize(double edgeSize)\r\n\t{\r\n\t\tsize= size + edgeSize;\r\n\t}",
"public void addEdge(int start, int end, double weight);",
"public void addIncomingEdge(Edge e) {\n\t\tincomingEdges.add(e);\n\t\tconnectedNodes.add(e.getStart());\n\t\taddIncomingWeight(e.getWeight());\n\t}",
"@Override\n\tpublic void mousePressed(MouseEvent e) throws NullPointerException {\n\t\tif (!enabler2) {\n\t\t\treturn;\n\t\t}\n\t\tx = e.getX();\n\t\ty = e.getY();\n\t\tedg = new GraphDrawComponent(x, y, \"Edge\");\n\t\tAssignment.frame.add(edg);\n\t\tedg.revalidate();\n\t\tenabler2 = false;\n\n\t}",
"void downgradeLastEdge();",
"@Override\n public boolean deleteEdge(Edge edge) {\n return false;\n }",
"public void testContainsEdgeEdge( ) {\n init( );\n\n //TODO Implement containsEdge().\n }",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }",
"EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void addEdge(Node from, Node to);",
"public void addEdge(int start, int end);",
"public void initialisationComplete(Collection<DAGNode> nodes,\r\n\t\t\tCollection<DAGEdge> edges) {\r\n\t}",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public void insertEdges(Edge[] E){\n\t\tthis.edges = E;\n\t\tthis.nodesLength = nodesLength(E);\n\t\tthis.nodes = new Node[(int)this.nodesLength];\n\t\tfor (long n = 0; n < this.nodesLength; n++) {\n\t\t\tthis.nodes[(int)n] = new Node(n);\n\t\t}\n\t\tthis.edgesLength = E.length;\n\t\t\n\t\t\n\t\tfor (long edgeToAdd = 0; edgeToAdd < this.edgesLength; edgeToAdd++) {\n\t\t\tthis.nodes[(int)E[(int)edgeToAdd].getFrom()].getEdges().add(E[(int)edgeToAdd]);\n\t\t\tthis.nodes[(int)E[(int)edgeToAdd].getTo()].getEdges().add(E[(int)edgeToAdd]);\n\t\t}\n\t\t\n\t}",
"void addEdge(int a, int b) {\n Edge e = new Edge(V[a], V[b]);\n V[a].Adj.add(e);\n V[b].Adj.add(e);\n }",
"@Override\r\n public void execute() {\r\n if (newSource != null) {\r\n edge.setSource(newSource);\r\n } else if (newTarget != null) {\r\n edge.setTarget(newTarget);\r\n }\r\n }",
"public void addEOGEdge(Node prev, Node next) {\n prev.getNextEOG().add(next);\n next.getPrevEOG().add(prev);\n }",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"public void updateCrowdness(EdgeGraph newEdge) {\n\t\tif (currentEdge != null) {\n\t\t\tArrayList<Pedestrian> currentVolume = PedSimCity.edgesVolume.get(currentEdge);\n\t\t\tcurrentVolume.remove(this);\n\t\t}\n\n\t\t// update new edge traffic\n\t\tif (PedSimCity.edgesVolume.get(newEdge) == null) PedSimCity.edgesVolume.put(newEdge, new ArrayList<Pedestrian>());\n\t\tPedSimCity.edgesVolume.get(newEdge).add(this);\n\t}",
"void setEdgeLabel(int edge, String label);",
"public void addEdgeTo(int dstId){\n\t\tcurrMethod.flowGraph.addEdge(vid, dstId);\r\n\t}",
"public void setEdgeCollection(String edgeCollection) {\n this.edgeCollection = edgeCollection;\n }",
"public void testAddEdgeEdge( ) {\n init( );\n\n try {\n m_g1.addEdge( m_eLoop ); // loops not allowed\n assertFalse( );\n }\n catch( IllegalArgumentException e ) {\n assertTrue( );\n }\n\n try {\n m_g3.addEdge( null );\n assertFalse( ); // NPE\n }\n catch( NullPointerException e ) {\n assertTrue( );\n }\n\n Edge e = m_eFactory.createEdge( m_v2, m_v1 );\n\n try {\n m_g1.addEdge( e ); // no such vertex in graph\n assertFalse( );\n }\n catch( IllegalArgumentException ile ) {\n assertTrue( );\n }\n\n assertEquals( false, m_g2.addEdge( e ) );\n assertEquals( false, m_g3.addEdge( e ) );\n assertEquals( true, m_g4.addEdge( e ) );\n }",
"void objectCreated (HyperEdge hedge);",
"private void removeEdge(Edge edge) {\n\t\tshapes.remove(edge);\n\t\tshapes.remove(edge.getEdgeLabel());\n\t\tremove(edge.getEdgeLabel());\n\t}",
"public void nodeRemoved(GraphEvent e);"
] | [
"0.69456834",
"0.685111",
"0.67814755",
"0.67713034",
"0.67600846",
"0.6655925",
"0.6632346",
"0.66241556",
"0.66232073",
"0.6604492",
"0.65794486",
"0.6518183",
"0.6491171",
"0.64885056",
"0.6453364",
"0.6435259",
"0.6415736",
"0.6403648",
"0.63744575",
"0.6370784",
"0.63420236",
"0.633345",
"0.6332742",
"0.6273331",
"0.62714624",
"0.6266208",
"0.62659365",
"0.6256709",
"0.6228044",
"0.62236917",
"0.6185667",
"0.61689425",
"0.6164712",
"0.611505",
"0.6114234",
"0.60962653",
"0.6091219",
"0.6065644",
"0.6062622",
"0.6054581",
"0.60469204",
"0.6038653",
"0.6034705",
"0.6007673",
"0.6001929",
"0.5990574",
"0.59884787",
"0.5976845",
"0.59640366",
"0.5946917",
"0.5930418",
"0.59260434",
"0.59094894",
"0.5908239",
"0.5872282",
"0.5771577",
"0.57646036",
"0.57419825",
"0.57095397",
"0.5687392",
"0.56289315",
"0.5628711",
"0.5626299",
"0.56230104",
"0.5602669",
"0.55822563",
"0.558196",
"0.557517",
"0.55706674",
"0.5569792",
"0.55623",
"0.55596566",
"0.555334",
"0.55525184",
"0.5547506",
"0.5543726",
"0.5536304",
"0.5525237",
"0.5521716",
"0.5516667",
"0.5513776",
"0.55030894",
"0.5500013",
"0.5490189",
"0.5490164",
"0.5488078",
"0.5487049",
"0.5486898",
"0.5483309",
"0.5479362",
"0.5462537",
"0.54564136",
"0.5429522",
"0.5428623",
"0.54019266",
"0.5399376",
"0.53968567",
"0.53950465",
"0.5379612",
"0.53722227"
] | 0.63123703 | 23 |
Called after a node is added to the DAG. | public boolean addNode(DAGNode node) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void nodeAdded(GraphEvent e);",
"@Override\n\tpublic void postProcess(NodeCT node) {\n\t}",
"@Override\n public void visit(Node node) {\n nodes.add(node);\n }",
"public void addNode(NodeImpl node) {\n supervisedNodes.add(node);\n \n colorNodes();\n shortenNodeLabels();\n colorNodeLabels();\n colorNodeLabelBorders();\n }",
"private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }",
"void onNodePlaced(World world, BlockPos pos);",
"@Override\r\n public void nodeActivity() {\n }",
"private void addNode(NeuralNode node) {\r\n\t\tinnerNodes.add(node);\r\n\t}",
"private void add_node(Node node) {\n if (this.nodes.get(node.name) != null) {\n throw new RuntimeException(\"Node \" + node.name + \" already exists!\");\n }\n this.nodes.put(node.name, node);\n this.bars.put(node.name, new TreeMap<String, Bar>());\n }",
"@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}",
"public void treeNodesInserted(TreeModelEvent e) {\n //To change body of implemented methods use Options | File Templates.\n }",
"public void addNode(Node node){subNodes.add(node);}",
"public void addAfter(DoublyLinkedNode<E> node) {\n if (node.getNext() != null) {\n this.linkWith(node.getNext());\n }\n node.linkWith(this);\n }",
"void addNode()\n {\n Node newNode = new Node(this.numNodes);\n this.nodeList.add(newNode);\n this.numNodes = this.numNodes + 1;\n }",
"@Override\r\n\tpublic void DAGfinished() {\n\t\t\r\n\t}",
"public void postLayout(ZGroup node) {\n }",
"private void addNode(DLinkedNode node) {\n\t\t\tnode.pre = head;\n\t\t\tnode.post = head.post;\n\n\t\t\thead.post.pre = node;\n\t\t\thead.post = node;\n\t\t}",
"void addNode(Entity entity) {\n\t\tProcessing.nodeSet.add(entity);\n\t\tSystem.out.println(\"the entity was successfully added to the network.\");\n\t}",
"void after(final Node currentNode, final ActivityResult activityResult);",
"public abstract void addChild(Node node);",
"public void addNode (NodeState node) throws RepositoryException, IOException\n\t{\n\t}",
"@Override\n\tprotected void nodesInserted ( TreeModelEvent event ) {\n\t\tif ( this.jumpNode != null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tObject[] children = event.getChildren ( );\n\n\t\tif ( children != null ) {\n\n\t\t\t// only problem with this could occure when\n\t\t\t// then children[0] element isn't the topmost element\n\t\t\t// in the tree that has been inserted. at this condition \n\t\t\t// that behaviour is undefined\n\t\t\tthis.jumpNode = ( ProofNode ) children[0];\n\t\t} else {\n\t\t\tthis.jumpNode = null;\n\t\t}\n\t}",
"@Override\r\n public void addChild (TreeNode node)\r\n {\r\n super.addChild(node);\r\n\r\n // Side effect for note, since the geometric parameters of the chord\r\n // are modified\r\n if (node instanceof Note) {\r\n reset();\r\n }\r\n }",
"@Override\n\tpublic void addChild(Node node) {\n\t\t\n\t}",
"private void addNode(DLinkedNode node){\n node.pre = head;\n node.post = head.post;\n\n head.post.pre = node;\n head.post = node;\n }",
"protected void addingNode( SearchNode n ) { }",
"public void addAfter(Node prevNode , Integer newdata){\n if (prevNode==null){\n return;\n }\n\n Node n = new Node(newdata);\n n.next = prevNode.next;\n prevNode.next = n;\n\n }",
"@Override\n\tpublic void preVisit(ASTNode node) {\n\t\tnodeList.add(node);\n\t}",
"@Override\n\tpublic void insert(Node node) {\n\t\tchildren.add(node);\n\t}",
"public void add(DefaultGraphCell node) {\n nodes.add(node);\n groupObject.add(node);\n fragmentName.append(((NodeData)node.getUserObject()).getName() + \" \");\n \n }",
"@Override\n public void childAdded(Node child) {\n }",
"public void addNodeAfterThis( int newdata ) {\r\n\t\tlink = new IntNode( newdata, link );\r\n\t}",
"void addNode(Node n) {\n nodes.put(n.id, n);\n }",
"protected void submitNewNode(NNode node) {\n\t\tNNode newnode = new NNode(node);\n\t\tnodes.put(newnode.ID, newnode);\n\t}",
"public void nodeRemoved(GraphEvent e);",
"public void addNode() {\r\n \r\n Nod nod = new Nod(capacitate_noduri);\r\n numar_noduri++;\r\n noduri.add(nod);\r\n }",
"private void addNode(DLinkedNode node) {\n\t\tnode.prev = head;\n\t\tnode.next = head.next;\n\n\t\thead.next.prev = node;\n\t\thead.next = node;\n\t}",
"protected void linkAfterNode(Node<U> newNode, Node<U> node) {\n\t\t\tmLength++;\n\t\t\tif (mTail == null) {\n\t\t\t\tmHead = newNode;\n\t\t\t\tmTail = newNode;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (node == null) {\n\t\t\t\tnode = mTail;\n\t\t\t}\n\t\t\tif (node == mTail) {\n\t\t\t\tmTail = newNode;\n\t\t\t}\n\n\t\t\tnewNode.setNext(node.getNext());\n\t\t\tif (node.getNext() != null) {\n\t\t\t\tnode.getNext().setPrev(newNode);\n\t\t\t}\n\t\t\tnewNode.setPrev(node);\n\t\t\tnode.setNext(newNode);\n\t\t}",
"public void addNode(String node) {\n this.graph.put(node, new LinkedList<>());\n }",
"protected void actionDone(iNamedObject node)\n\t{\n\t}",
"public void addNode(Node p_node) {\n\t\tnodes.add(p_node);\n\t}",
"public void add(Node node) {\n if (node.getId() != null) {\n if (node.getId().equals(\"DestructibleBlock\")) {\n staticElements.add(node);\n destructibleBlocks.add((DestructibleBlock) node);\n }\n if (node.getId().equals(\"IndestructibleBlock\")) {\n staticElements.add(node);\n }\n }\n fieldPane.getChildren().add(node);\n }",
"public void addNode(org.ow2.petals.cloud.controllers.api.runtime.Runtime runtime) {\n if (runtime == null) {\n LOG.warn(\"Can not add a null runtime to the topology\");\n return;\n }\n\n LOG.debug(\"Adding node to the topology {}\", runtime);\n\n Iterator<NotificationListener> iter = topologyListeners.iterator();\n while(iter.hasNext()) {\n NotificationListener listener = iter.next();\n // TODO : Do it async...\n // TODO : Generics...\n listener.on(\"add\", runtime);\n }\n }",
"private void addNode(Node node)\n\t{\n\t\tif (node == null)\n\t\t\treturn;\n\t\tthis.nodes[node.getRowIndex()][node.getColumnIndex()] = node;\n\t}",
"public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }",
"public void addNode(Node node) {\n\t\tnodes.add(node);\n\t}",
"void addNode(String node);",
"protected void notifyChildRemoval(FONode node) {\n //nop\n }",
"@Override\n public void add(EventNode node) {\n nodes.add(node);\n // Invalidate the relations cache.\n //\n // NOTE: The reason we do not update the relations here is because the\n // node might not be finalized yet. That is, the node's transitions\n // might not be created/added yet, so at this point we do not know the\n // exact set of relations associated with this node.\n cachedRelations = null;\n }",
"public void append(Node newNode)\r\n {\n newNode.prev = this;\r\n newNode.next = next;\r\n if (next != null)\r\n {\r\n next.prev = newNode;\r\n }\r\n next = newNode;\r\n System.out.println(\"Node added with Traffic Data \" + Arrays.toString(newNode.trafficEntry.toStringArray()) + \" added ontop of \" \r\n + prev.trafficEntry.convertToString());\r\n \r\n }",
"protected void insertAfter(\n LogicalOperator after,\n LogicalOperator newNode,\n Map<Integer, Integer> projectionMapping)\n throws VisitorException, FrontendException {\n List<LogicalOperator> successors = mPlan.getSuccessors(after);\n if(successors==null) {\n mPlan.addAsLeaf(newNode);\n return;\n }\n if (successors.size() != 1) {\n throw new RuntimeException(\"insertAfter only valid to insert \" + \n \"after a node with single output.\");\n }\n insertBetween(after, newNode, successors.get(0), projectionMapping);\n }",
"protected void onNodeChanged(AbstractNode node) {\r\n\t\t//Activator.getLogger().debug(\"Selection changed: \" + node, null);\r\n\t}",
"public void addNode(Node node) {\n\t\tthis.nodes.add(node);\n\t}",
"private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }",
"private void addNode(Node node) {\n node.prev = fakeHead;\n node.next = fakeHead.next;\n \n fakeHead.next.prev = node;\n fakeHead.next = node;\n }",
"private void addNewNode(Node newNode) {\r\n\t\tNode[] temp = new Node[this.treeNodes.length -1];\r\n\t\ttemp[0] = newNode;\r\n\r\n\t\tfor(int tempIndex = 1, i=2; i < this.treeNodes.length; i++, tempIndex++) {\r\n\t\t\ttemp[tempIndex] = this.treeNodes[i];\r\n\t\t}\r\n\t\tthis.treeNodes = temp;\r\n\t\tsortLeaves();\r\n\t}",
"@Override\n\tpublic void nodeRemoved(TGGraph graph, TGNode node) {\n gLogger.log(TGLogger.TGLevel.Debug, \"Node is removed\");\n removedList.put(((AbstractEntity) node).getVirtualId(), node);\n\t}",
"private void addNode(Node<E> node, E value) {\n if (node.children == null) {\n node.children = new ArrayList<>();\n }\n node.children.add(new Node<>(value));\n }",
"public void onRemoveNode(Node node) {\n\t}",
"public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }",
"void addNode(int node);",
"public void doAfterAttach(final PNode node) {\n for (int index = 0; index < operators.length; index++) {\n if (operators[index] == null) { // attaching a clone\n operators[index] = (OperatorNode) node;\n operators[index].setRemoveAfterDrop(false);\n operators[index].disableMenu();\n operators[index].disableChildrenMenu();\n break;\n }\n\n if (((OperatorNode) node).equalsByContent(operators[index])) { // reattaching an operation\n node.removeFromParent(); // simply ignore everything that comes in\n break;\n }\n }\n }",
"public Node insertAfter(Node node);",
"private void insert(Node node) {\n//\t\t//A*\n\t\topen.add(node);\n\t\tCollections.sort(open);\n//\t\t\n//\t\t//dfs\n//\t\topen.add(0, node);\n\t\t\n\t\t//bfs\n//\t\topen.add(node);\n\t}",
"public void add(NODE node) {\n root = root == null ? node : root.add(node);\n }",
"public void addChild(Node node){\n children.add(node);\n \n }",
"protected void addNode(INode node) {\n\n if (node != null) {\n\n this.ids.add(node.getID());\n this.nodeMap.put(node.getID(), node);\n }\n }",
"public void addNode(GraphNode<T> node) {\n\tmRoot.addNode(node);\n\tmNodesCount++;\n }",
"public void addNode(Character charId, Node node) {\n graph.put(charId, node);\n }",
"public void addCurrentNode(String currentNodeID)\r\n {\r\n visitedNodes.add(currentNodeID);\r\n }",
"public Node appendNode(Node node);",
"void addFlight(Node toNode);",
"void nodeStarted();",
"@Override\n public void onAddBreadRaised() {\n }",
"public void addDoneNode(int nodeFrom) {\n // status change\n done.add(nodeFrom);\n dtable.remove(nodeFrom);\n\n // iterate over every connection from new node - looking for better connection\n // to another node. Node can not exist in this wage list.\n for (Map.Entry<Integer, Integer> entry : wages.getOrDefault(nodeFrom, new HashMap<>()).entrySet()) {\n int nodeTo = entry.getKey(), wage = entry.getValue();\n // check if node is already added to graph\n if (!done.contains(nodeTo)) {\n // check if new wage is better then old one\n if (!(dtable.containsKey(nodeTo) && wage > dtable.get(nodeTo).getWage())) {\n // updating d table with new egde\n dtable.put(nodeTo, new PrimEdge(nodeFrom, nodeTo, wage));\n }\n }\n }\n }",
"public void visit(Node node) {\n if (this.labelling[node.vertexIndex] == -1) {\n this.labelling[node.vertexIndex] = this.currentLabel;\n this.currentLabel++;\n }\n if (comparator != null) {\n Collections.sort(node.children, comparator);\n }\n for (Node child : node.children) {\n child.accept(this);\n }\n }",
"TreeNode addChild(TreeNode node);",
"public void processNode(Node node, float delta);",
"public void Nodemap (String addedNode, String[] connectNode) {\n\t\tNodeswithconnect.put(addedNode, connectNode);\n\t}",
"public void PostOrder() {\n\t\tPostOrder(root);\n\t}",
"public void addNodeToTheObjects(Node theNode) {\r\n getTheObjects().add(theNode);\r\n }",
"public void postOrderTravel(Node node) {\n\t\tif(node != null) {\r\n\t\t\tpostOrderTravel(node.leftChild);\r\n\t\t\tpostOrderTravel(node.rightChild);\r\n\t\t\tSystem.out.println(node);\r\n\t\t}\r\n\t}",
"public void addedToDom() {\n activateTab();\n }",
"public void addChild(TreeNode toAdd) {\n\t\t\tthis.children.add(toAdd);\n\t\t}",
"public boolean removeNode(DAGNode node) {\r\n\t\treturn false;\r\n\t}",
"public void addNode(ConfigurationNode node)\n {\n if (node == null || node.getName() == null)\n {\n throw new IllegalArgumentException(\n \"Node to add must have a defined name!\");\n }\n node.setParentNode(null); // reset, will later be set\n\n if (nodes == null)\n {\n nodes = new ArrayList<ConfigurationNode>();\n namedNodes = new HashMap<String, List<ConfigurationNode>>();\n }\n\n nodes.add(node);\n List<ConfigurationNode> lst = namedNodes.get(node.getName());\n if (lst == null)\n {\n lst = new LinkedList<ConfigurationNode>();\n namedNodes.put(node.getName(), lst);\n }\n lst.add(node);\n }",
"public void addChild(WSLNode node) {children.addElement(node);}",
"public void nodeRemoved(TreeNode removedNode) {\n\t\t\tdefaultHandle(removedNode);\n\t\t}",
"public void addNode(final Instruction instruction) {\n instructions.add(instruction);\n if (prevInstruction != null) {\n addEdge(prevInstruction, instruction);\n }\n prevInstruction = instruction;\n }",
"public void addAfter(MovieNode target, Object item){\n MovieNode insert = new MovieNode(item);\n insert.next = target.next;\n target.next = insert;\n size++;\n }",
"public void addNode(INode node) {\r\n\t\tnodeList.add(node);\r\n\t}",
"public void insertAfter(Node prev_node, int new_data) \r\n\t\t{ \r\n\t\t if (prev_node == null) \r\n\t\t { \r\n\t\t System.out.println(\"\\nThe given previous node cannot be null\"); \r\n\t\t return; \r\n\t\t } \r\n\t\t \r\n\t\t Node new_node = new Node(new_data); \r\n\t\t new_node.next = prev_node.next; \r\n\t\t prev_node.next = new_node; \r\n\t\t}",
"public void addChild(Node node) {\n\t\tthis.children.add(node);\n\t}",
"@Override\n public void onNodeTouched(int NodeId) {\n }",
"public synchronized void addChild (TreeNode node)\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"addChild node=\" + node + \" for \" + this);\r\n }\r\n\r\n children.add(node);\r\n node.setParent(this);\r\n }",
"public void addNode(Node newNode){\r\n\t\t\tNode temp = this.head;\r\n\t\t\tnewNode.prev = null;\r\n\t\t\tif(this.head == null){\r\n\t\t\t\tthis.head = newNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twhile(temp.next!=null){\r\n\t\t\t\t\ttemp = temp.next;\r\n\t\t\t\t}\r\n\t\t\t\ttemp.next = newNode;\r\n\t\t\t\tnewNode.prev = temp;\r\n\t\t\t}\r\n\t\t}",
"public void addToPane(Node node) {\n pane.getChildren().add(node);\n }",
"@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}",
"public void actionPerformed(ActionEvent e) {\r\n mode = InputMode.ADD_NODES;\r\n instr.setText(\"Click to add new nodes or change their location.\");\r\n }",
"protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node)\n\t{\n\t}"
] | [
"0.680011",
"0.6744793",
"0.6548229",
"0.6498146",
"0.63134897",
"0.6235182",
"0.62167084",
"0.62094057",
"0.6204657",
"0.6150065",
"0.6127071",
"0.61233896",
"0.611074",
"0.610892",
"0.60903627",
"0.6043352",
"0.6037898",
"0.6032591",
"0.60145473",
"0.5998638",
"0.59954053",
"0.59581244",
"0.5928092",
"0.59205145",
"0.59184337",
"0.5903537",
"0.5902787",
"0.58663064",
"0.5861292",
"0.5855008",
"0.58497727",
"0.58469516",
"0.57893586",
"0.5777732",
"0.5766417",
"0.57124823",
"0.5707056",
"0.57057077",
"0.5705394",
"0.57014287",
"0.5688255",
"0.5687016",
"0.5684036",
"0.56623054",
"0.56529015",
"0.5651216",
"0.5627373",
"0.5626889",
"0.5625752",
"0.5620868",
"0.5617119",
"0.56167614",
"0.5615592",
"0.56106985",
"0.5597722",
"0.55933076",
"0.55925226",
"0.5589844",
"0.5574462",
"0.5547785",
"0.5547045",
"0.5533333",
"0.5517354",
"0.55162597",
"0.55133885",
"0.55023617",
"0.54967535",
"0.54958415",
"0.54857177",
"0.5475455",
"0.5468319",
"0.54612845",
"0.5457637",
"0.54401225",
"0.5439474",
"0.5435656",
"0.5429792",
"0.542817",
"0.54264385",
"0.5425678",
"0.5418837",
"0.5413109",
"0.5407819",
"0.5406802",
"0.54051685",
"0.54014695",
"0.5401311",
"0.5392317",
"0.53920966",
"0.5385335",
"0.5376984",
"0.53738207",
"0.53708494",
"0.53707194",
"0.5364967",
"0.5364435",
"0.5358937",
"0.535167",
"0.53497815",
"0.5349384"
] | 0.6342002 | 4 |
A method that is called once initialisation of a DAG is complete. Note that this method may not be called, and no functionality is required. | public void initialisationComplete(Collection<DAGNode> nodes,
Collection<DAGEdge> edges) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void DAGfinished() {\n\t\t\r\n\t}",
"public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}",
"@Override\n public void init() {\n this.log.pri1(LoggingInterface.INIT_START, \"\");\n // Any task initialization code goes here.\n this.log.pri1(LoggingInterface.INIT_END, \"\");\n }",
"public void initialize(ADag dag, PegasusBag bag) {\n super.initialize(dag, bag);\n mGlobalLog = mProps.logJobAggregatorProgressToGlobal();\n mLogProgress = mProps.logJobAggregatorProgress();\n // set abort of first job failure\n this.setAbortOnFirstJobFailure(mProps.abortOnFirstJobFailure());\n }",
"void prepareForExecution(boolean alwaysPopulateWorkGraph);",
"@Override protected void onPreExecute() { g = new UndirectedGraph(10); }",
"@Override\n public void populateDAG(DAG dag, Configuration conf)\n {\n\n RandomNumberGenerator randomGenerator = dag.addOperator(\"randomGenerator\", RandomNumberGenerator.class);\n randomGenerator.setNumTuples(10000);\n SetupOperator setupOperator = dag.addOperator(\"SetupOperator\", SetupOperator.class);\n\n dag.addStream(\"randomData\", randomGenerator.out, setupOperator.inputPort);\n }",
"public void buildGraph(){\n\t}",
"@Override\n public void onStarting(Flow flow) {\n //init flow\n List<BaseFlowStep> steps = flow.getFlowSteps();\n totalNumberOfJobs = steps.size();\n runnigJobs = 0;\n currentFlowId = flow.getID();\n\n // convert the graph generated by cascading toDAGNodes Graph to be sent to ambrose\n AmbroseCascadingGraphConverter convertor = new AmbroseCascadingGraphConverter((SimpleDirectedGraph) Flows.getStepGraphFrom(flow), dagNodeNameMap);\n convertor.convert();\n try {\n statsWriteService.sendDagNodeNameMap(null, this.dagNodeNameMap);\n } catch (IOException e) {\n log.error(\"Couldn't send dag to StatsWriteService\", e);\n }\n Workflow workflow = new Workflow(currentFlowId, currentFlowId, jobs);\n try {\n outputStatsData(workflow);\n } catch (IOException e) {\n log.error(\"Exception outputting workflow\", e);\n }\n }",
"@Override\n protected void doAfterTopologyStartup(ClusteredTopology topology) {\n }",
"@Override\n public void initialize() {\n time = 0;\n //noinspection ConstantConditions\n this.runningTasks.addAll(getInitialNode().getTasks());\n for (Node node : nodes) {\n node.initialize();\n }\n }",
"protected void init() {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n RosFragmentActivity.this.init(nodeMainExecutorService);\n //Let everyone know that init is called\n synchronized (mNodeInitListeners) {\n for (final NodeInitListener nodeInitListener : mNodeInitListeners) {\n nodeInitListener.onNodeInit(nodeMainExecutorService, getMasterUri());\n }\n mNodeInitListeners.clear();\n }\n return null;\n }\n }.execute();\n }",
"@Override\n public void onInitializeTasks() {\n }",
"void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }",
"protected synchronized void initGraph() throws Throwable {\r\n\t\tif (!initialized) {\r\n\t\t\tinitialized = true;\r\n\t\t\tif (rootGenerator instanceof MultipleRootGenerator) {\r\n\t\t\t\tCollection<Node<T, V>> roots = ((MultipleRootGenerator<T>) rootGenerator).getRoots().stream().map(n -> newNode(null, n)).collect(Collectors.toList());\r\n\t\t\t\tfor (Node<T, V> root : roots) {\r\n\t\t\t\t\tlabelNode(root);\r\n\t\t\t\t\topen.add(root);\r\n\t\t\t\t\tlogger.info(\"Labeled root with {}\", root.getInternalLabel());\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tNode<T, V> root = newNode(null, ((SingleRootGenerator<T>) rootGenerator).getRoot());\r\n\t\t\t\tlabelNode(root);\r\n\t\t\t\topen.add(root);\r\n\t\t\t}\r\n\r\n\t\t\t// check if the equals method is explicitly implemented.\r\n\t\t\t// Method [] methods = open.peek().getPoint().getClass().getDeclaredMethods();\r\n\t\t\t// boolean containsEquals = false;\r\n\t\t\t// for(Method m : methods)\r\n\t\t\t// if(m.getName() == \"equals\") {\r\n\t\t\t// containsEquals = true;\r\n\t\t\t// break;\r\n\t\t\t// }\r\n\t\t\t//\r\n\t\t\t// if(!containsEquals)\r\n\t\t\t// this.parentDiscarding = ParentDiscarding.NONE;\r\n\t\t}\r\n\t}",
"@Setup(Level.Trial)\n public void setupGraph() {\n initializeMethod();\n prepareRequest();\n emitFrontEnd();\n }",
"@Setup(Level.Trial)\n public void setupGraph() {\n initializeMethod();\n prepareRequest();\n emitFrontEnd();\n }",
"@Setup(Level.Trial)\n public void setupGraph() {\n initializeMethod();\n prepareRequest();\n emitFrontEnd();\n }",
"public Graph() {\r\n\t\tinit();\r\n\t}",
"protected void initialize() { \tthePrintSystem.printWithTimestamp(getClass().getName()); \n\tthis.isDone = false;\n\t\n\ttheLoader.setSetpoint(1.5);\n\t\n }",
"@Override\n\tpublic void dagPrepare(DAG dag, AssembleOpType opType, Vertex<?>... vertex) {\n\t\ttraceDAGAssembleOps(dag, opType, vertex);\n\t}",
"@Override\n\tpublic void init() {\n\t\tGraph<Number,Number> ig = Graphs.<Number,Number>synchronizedDirectedGraph(new DirectedSparseMultigraph<Number,Number>());\n\t\tObservableGraph<Number,Number> og = new ObservableGraph<Number,Number>(ig);\n\t\tog.addGraphEventListener(new GraphEventListener<Number,Number>() {\n\n\t\t\tpublic void handleGraphEvent(GraphEvent<Number, Number> evt) {\n\t\t\t\tSystem.err.println(\"got \"+evt);\n\n\t\t\t}});\n\t\tthis.g = og;\n\n\t\tthis.timer = new Timer();\n\t\tthis.layout = new FRLayout2<Number,Number>(g);\n\t\t// ((FRLayout)layout).setMaxIterations(200);\n\t\t// create a simple pickable layout\n\t\tthis.vv = new VisualizationViewer<Number,Number>(layout, new Dimension(600,600));\n\n\n\n\t}",
"public void begin() {\n if (!checkParams()) return;\n\n buildModel();\n buildSchedule();\n buildDisplay();\n\n displaySurf.display();\n populationPlot.display();\n }",
"@Override\n public void initialize() throws GlitterException {\n this.nodeConverter = new NodeConverter(this.context.getNodeLayout());\n // start a transaction (if necessary), create a temp table with OK named graph IDs\n Glitter.getLog().debug(\"Creating temporary graph tables and indexes\");\n this.myLock = !this.context.getDatasource().isInTransaction(this.context.getConnection());\n if (this.myLock) {\n try {\n this.context.getDatasource().begin(this.context.getConnection(), false, false);\n } catch (AnzoException ae) {\n if (log.isDebugEnabled()) {\n log.debug(LogUtils.RDB_MARKER, \"Error initializing serversolutiongenerator\", ae);\n }\n throw new GlitterException(ae.getErrorCode(), ae);\n }\n }\n // long start = System.currentTimeMillis();\n // System.err.println(\"Start:\" + start);\n super.initialize();\n // System.err.println(\"Init:\" + (System.currentTimeMillis() - start));\n }",
"public boolean isDAG() {\n return false;\n }",
"public void goapPlanFinished();",
"protected void initialize()\n {\n logger.info(\"Initializing stack: {}\", this.getClass().getSimpleName());\n Function function = createLambdaFunction();\n createAthenaDataCatalog(function);\n }",
"public DAGraph(NodeT rootNode) {\n this.parentDAGs = new ArrayList<>();\n this.rootNode = rootNode;\n this.queue = new ConcurrentLinkedQueue<>();\n this.rootNode.setPreparer(true);\n this.addNode(rootNode);\n }",
"private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}",
"@Override protected void pathInit() {\r\n\r\n // place any initialization code here\r\n\r\n }",
"@Override\n\t\tprotected void initialise() {\n\n\t\t}",
"protected TaskChain() {\n\t}",
"private void setup(){\n buildTree(2);\n }",
"public void initOperation() {\n\t\tinitialized = true;\r\n\t}",
"private void initialize() {\n }",
"@Override\n\tprotected void initialise() {\n\t}",
"@Override\n public void runInit() {\n }",
"public DirectedAcyclicGraphImpl() {\r\n super();\r\n topologicalsorting = new TopologicalSorting( this );\r\n }",
"public void initialize() {\r\n }",
"@Override\n public void init() throws IOException {\n ToDoData.getInstance().loadTasks();\n }",
"private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}",
"public void initialize() {\n\n\t\tthis.subNetGenes = getSubNetGenes(species, xmlFile);\n\t\tthis.subNetwork = getSubNetwork(subNetGenes, oriGraphFile);\n\t\tHPNUlilities.dumpLocalGraph(subNetwork, subNetFile);\n\t\t/* Create level file for the original graph */\n\t\tHPNUlilities.createLevelFile(codePath, oriGraphFile, oriLevel,\n\t\t\t\tglobalLevelFile, penaltyType, partitionSize);\n\n\t}",
"public void prepareForDeferredProcessing() {\n\n }",
"private void load() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tloadPairs();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"void createGraphForSingleLoad();",
"public abstract void initialise();",
"public abstract void initialise();",
"public abstract void initialise();",
"public void init() {\n \n }",
"public void initialize() {\n }",
"@Override\n public void populateDAG(DAG dag, Configuration conf)\n {\n DummyOutputOperator combinedConsole = dag.addOperator(\"console\", new DummyOutputOperator());\n \n FileInputReaderWithShutDown inputOp = dag.addOperator(\"inputWordsReader\", new FileInputReaderWithShutDown());\n inputOp.setDirectory(\"/media/isha/apex-samples/sampleInput1\");\n dag.addStream(\"stream1\", inputOp.output, combinedConsole.input1);\n \n FileInputReaderWithoutShutDownException inputOp1 = dag.addOperator(\"inputTextReader1\", new FileInputReaderWithoutShutDownException());\n inputOp1.setDirectory(\"/media/isha/apex-samples/sampleInput2\");\n dag.addStream(\"stream2\", inputOp1.output, combinedConsole.input2);\n }",
"public void init() {\n log.info(\"initialization\");\n }",
"protected void sequence_Compilation_initial(ISerializationContext context, Compilation_initial semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"public void initialize()\n {\n }",
"public void initialize() {\n // empty for now\n }",
"@PostConstruct\n\tpublic void init()\n\t{\n\t\tlogModule.info(TaskGenerator.class, \"初始化 Task generator...\");\n\t}",
"private void init() {\n }",
"private void initFromGraph() {\n CHPreparationGraph prepareGraph;\n if (chConfig.getTraversalMode().isEdgeBased()) {\n TurnCostStorage turnCostStorage = graph.getTurnCostStorage();\n if (turnCostStorage == null) {\n throw new IllegalArgumentException(\"For edge-based CH you need a turn cost storage\");\n }\n logger.info(\"Creating CH prepare graph, {}\", getMemInfo());\n CHPreparationGraph.TurnCostFunction turnCostFunction = CHPreparationGraph.buildTurnCostFunctionFromTurnCostStorage(graph, chConfig.getWeighting());\n prepareGraph = CHPreparationGraph.edgeBased(graph.getNodes(), graph.getEdges(), turnCostFunction);\n nodeContractor = new EdgeBasedNodeContractor(prepareGraph, chBuilder, pMap);\n } else {\n logger.info(\"Creating CH prepare graph, {}\", getMemInfo());\n prepareGraph = CHPreparationGraph.nodeBased(graph.getNodes(), graph.getEdges());\n nodeContractor = new NodeBasedNodeContractor(prepareGraph, chBuilder, pMap);\n }\n maxLevel = nodes;\n // we need a memory-efficient priority queue with an efficient update method\n // TreeMap is not memory-efficient and PriorityQueue does not support an efficient update method\n // (and is not memory efficient either)\n sortedNodes = new MinHeapWithUpdate(prepareGraph.getNodes());\n logger.info(\"Building CH prepare graph, {}\", getMemInfo());\n StopWatch sw = new StopWatch().start();\n CHPreparationGraph.buildFromGraph(prepareGraph, graph, chConfig.getWeighting());\n logger.info(\"Finished building CH prepare graph, took: {}s, {}\", sw.stop().getSeconds(), getMemInfo());\n nodeContractor.initFromGraph();\n }",
"public void initialize() {\n }",
"public void postInit() {\n }",
"public void initialize() {\n // TODO\n }",
"@Override\n public void taskStarting() {\n\n }",
"@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }",
"public void initialize() {\n // add direct connections to routing table\n for (Bunker neighbour : neighbours) {\n routing.put(neighbour.getId(), neighbour);\n }\n // add yourself\n routing.put(id, this);\n bunkerIdToCount.put(id, count);\n // kick off the algo\n initiate();\n }",
"public void buildGraph() {\n //System.err.println(\"Build Graph \"+this);\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );\n }",
"private void initialize() {\n\t}",
"@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }",
"private TbusRoadGraph() {}",
"public abstract void postInit();",
"public ProcessingTarget buildGraph(){\n \t\tgetTibbrGraph();\n \n \t\t//Init a project - and therefore a workspace\n \t\tProjectController pc = Lookup.getDefault().lookup(ProjectController.class);\n \t\tpc.newProject();\n \t\tWorkspace workspace = pc.getCurrentWorkspace();\n \n \t\t//Get a graph model - it exists because we have a workspace\n \t\tGraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();\n \t\tAttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();\n \t\tImportController importController = Lookup.getDefault().lookup(ImportController.class);\n \n \t\t//Import file \n \t\tContainer container;\n \t\ttry {\n \t\t\tFile f = new File(this.filename);\n \t\t\tcontainer = importController.importFile(f);\n \t\t\tcontainer.getLoader().setEdgeDefault(EdgeDefault.DIRECTED); //Force DIRECTED\n \t\t container.setAllowAutoNode(false); //Don't create missing nodes\n \t\t} catch (Exception ex) {\n \t\t\tex.printStackTrace();\n \t\t\treturn null;\n \t\t}\n \n \t\t//Append imported data to GraphAPI\n \t\timportController.process(container, new DefaultProcessor(), workspace);\n \n \t\t//See if graph is well imported\n \t\t//DirectedGraph graph = graphModel.getDirectedGraph();\n \t\t//---------------------------\n \n \t\t//Layout for 1 minute\n \t\tAutoLayout autoLayout = new AutoLayout(5, TimeUnit.SECONDS);\n \t\tautoLayout.setGraphModel(graphModel);\n \t\t//YifanHuLayout firstLayout = new YifanHuLayout(null, new StepDisplacement(1f));\n \t\tForceAtlasLayout secondLayout = new ForceAtlasLayout(null);\n \t\tAutoLayout.DynamicProperty adjustBySizeProperty = AutoLayout.createDynamicProperty(\"forceAtlas.adjustSizes.name\", Boolean.TRUE, 0.1f);//True after 10% of layout time\n \t\tAutoLayout.DynamicProperty repulsionProperty = AutoLayout.createDynamicProperty(\"forceAtlas.repulsionStrength.name\", new Double(10000.), 0f);//500 for the complete period\n \t\t//autoLayout.addLayout( firstLayout, 0.5f );\n \t\tautoLayout.addLayout(secondLayout, 1f, new AutoLayout.DynamicProperty[]{adjustBySizeProperty, repulsionProperty});\n \t\tautoLayout.execute();\n \n \n \n \n \n \t\t//Rank color by Degree\n \t\tRankingController rankingController = Lookup.getDefault().lookup(RankingController.class);\n\t\tRanking<?> degreeRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, Ranking.DEGREE_RANKING);\n\t\tAbstractColorTransformer<?> colorTransformer = (AbstractColorTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_COLOR);\n \n \t\tcolorTransformer.setColors(new Color[]{new Color(0xFEF0D9), new Color(0xB30000)});\n \t\trankingController.transform(degreeRanking,colorTransformer);\n \n \t\t//Get Centrality\n \t\tGraphDistance distance = new GraphDistance();\n \t\tdistance.setDirected(true);\n \t\tdistance.execute(graphModel, attributeModel);\n \n \t\t//Rank size by centrality\n \t\tAttributeColumn centralityColumn = attributeModel.getNodeTable().getColumn(GraphDistance.BETWEENNESS);\n\t\tRanking<?> centralityRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> sizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_SIZE);\n \t\tsizeTransformer.setMinSize(3);\n \t\tsizeTransformer.setMaxSize(20);\n \t\trankingController.transform(centralityRanking,sizeTransformer);\n \n \t\t//Rank label size - set a multiplier size\n\t\tRanking<?> centralityRanking2 = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> labelSizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.LABEL_SIZE);\n \t\tlabelSizeTransformer.setMinSize(1);\n \t\tlabelSizeTransformer.setMaxSize(3);\n \t\trankingController.transform(centralityRanking2,labelSizeTransformer);\n \n \t\tfloat[] positions = {0f,0.33f,0.66f,1f};\n \t\tcolorTransformer.setColorPositions(positions);\n \t\tColor[] colors = new Color[]{new Color(0x0000FF), new Color(0xFFFFFF),new Color(0x00FF00),new Color(0xFF0000)};\n \t\tcolorTransformer.setColors(colors);\n \n \t\t\n \t\t//---------------------------------\n \t\t//Preview configuration\n \t\tPreviewController previewController = Lookup.getDefault().lookup(PreviewController.class);\n \t\tPreviewModel previewModel = previewController.getModel();\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.DIRECTED, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.BACKGROUND_COLOR, Color.BLACK);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.NODE_LABEL_COLOR, new DependantOriginalColor(Color.YELLOW));\n \t\t\n \t\t\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_CURVED, Boolean.TRUE);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_OPACITY, 100);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_RADIUS, 1f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_THICKNESS,0.2f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.ARROW_SIZE,0.2f);\n \n \t\tpreviewController.refreshPreview();\n \n \t\t//----------------------------\n \n \t\t//New Processing target, get the PApplet\n \t\tProcessingTarget target = (ProcessingTarget) previewController.getRenderTarget(RenderTarget.PROCESSING_TARGET);\n \t\t\n \t\tPApplet applet = target.getApplet();\n \t\tapplet.init();\n \n \t\t// Add .1 second delay to fix stability issue - per Gephi forums\n try {\n \t\t\t\tThread.sleep(100);\n \t\t\t} catch (InterruptedException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \n \t\t\n \t\t//Refresh the preview and reset the zoom\n \t\tpreviewController.render(target);\n \t\ttarget.refresh();\n \t\ttarget.resetZoom();\n \t\ttarget.zoomMinus();\n \t\ttarget.zoomMinus();\n \t\t\n \t\treturn target;\n \t\t\n \n \t}",
"public void init(){\r\n\t\tbuild(0);\r\n\t\taddFestiveCity(1);\r\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"public Scheduler()\r\n {\r\n town = new Graph<String>();\r\n }",
"private GraphParser(){ \n\t}",
"public final void execute() {\n\t\tLogUtils.i(TAG, \"execute\");\n\t\tpurelySetState(TaskState.Preparing);\n\t\tTaskQueue.addTask(this);\n\t}",
"public DSAGraph()\n\t{\n\t\tvertices = new DSALinkedList();\n\t\tedgeCount = 0;\n\t}",
"private void initializeQueue() {\n this.queue.clear();\n for (Map.Entry<String, NodeT> entry : nodeTable.entrySet()) {\n if (!entry.getValue().hasDependencies()) {\n this.queue.add(entry.getKey());\n }\n }\n if (queue.isEmpty()) {\n throw logger.logExceptionAsError(new IllegalStateException(\"Detected circular dependency\"));\n }\n }",
"public void initialize () {\n }",
"private void buildInternalRepresentations() {\n new DAGBuilder(data).buildMethods(this);//.dump();\n }",
"@Override public void postInit()\n\t\t{\n\t\t}",
"public void init() {\n\ttsp.init();\n }",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"public void initialize() {\n\n getStartUp();\n }",
"private void initialize() {\n\t\t\n\t}",
"public void init()\r\n {\r\n ;\r\n }",
"public void init() {\n\t\t}",
"public void loading() {\n if (state == null) {\n state = new NodeState();\n }\n state.setState(ENodeState.Loading);\n }",
"public void initialize() {\n\t}",
"public void initialize() {\n\t}",
"public final void init() {\n onInit();\n }",
"@Override\n public void commucateInitAall() {\n mCommunciation.commucateInitAall();\n }",
"@Override\n\tpublic void onInit(RptParams params) throws Exception {\n\t}",
"public void initialize() {\n this.loadDownloadList();\n }",
"@Test\n\tpublic void testDAG() {\n\t\tDirectedGraph<Integer, DirectedEdge<Integer>> directedGraph = new DirectedGraph<Integer, DirectedEdge<Integer>>();\n\t\tdirectedGraph.addNode(1);\n\t\tdirectedGraph.addNode(2);\n\t\tdirectedGraph.addNode(3);\n\t\tdirectedGraph.addNode(4);\n\t\tdirectedGraph.addNode(5);\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(1, 2));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(1, 3));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(2, 3));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(4, 5));\n\t\t\n\t\t// tested method calls\n\t\tSet<Integer> reachableNodesFrom1 = service.getReachableNodes(directedGraph, 1);\n\t\tSet<Integer> reachableNodesFrom2 = service.getReachableNodes(directedGraph, 2);\n\t\tSet<Integer> reachableNodesFrom3 = service.getReachableNodes(directedGraph, 3);\n\t\tSet<Integer> reachableNodesFrom4 = service.getReachableNodes(directedGraph, 4);\n\t\tSet<Integer> reachableNodesFrom5 = service.getReachableNodes(directedGraph, 5);\n\t\t\n\t\t// assertions\n\t\tassertEquals(ImmutableSet.of(2, 3), reachableNodesFrom1);\n\t\tassertEquals(ImmutableSet.of(3), reachableNodesFrom2);\n\t\tassertEquals(ImmutableSet.of(), reachableNodesFrom3);\n\t\tassertEquals(ImmutableSet.of(5), reachableNodesFrom4);\n\t\tassertEquals(ImmutableSet.of(), reachableNodesFrom5);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t\tvoid init() {\n\t\t\tsetNodes(offHeapService.newArray(JudyIntermediateNode[].class, NODE_SIZE, true));\n\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}"
] | [
"0.7352745",
"0.60236967",
"0.5965964",
"0.59451354",
"0.5908111",
"0.58830494",
"0.5864451",
"0.5842484",
"0.5808993",
"0.5808887",
"0.5760516",
"0.5755972",
"0.5743766",
"0.5730262",
"0.57237536",
"0.5679281",
"0.5679281",
"0.5679281",
"0.5661698",
"0.56575847",
"0.5632206",
"0.5584704",
"0.5548331",
"0.55048245",
"0.5503829",
"0.54693407",
"0.54554987",
"0.5453394",
"0.5418689",
"0.54052025",
"0.5404832",
"0.5404703",
"0.54007536",
"0.5399072",
"0.53903055",
"0.5377009",
"0.5376878",
"0.5373355",
"0.53522384",
"0.53513205",
"0.5348201",
"0.5347217",
"0.5341455",
"0.5322533",
"0.53152996",
"0.5314583",
"0.5314583",
"0.5314583",
"0.53001076",
"0.52946305",
"0.5292893",
"0.5290299",
"0.5286237",
"0.52843463",
"0.52835685",
"0.5281877",
"0.5280055",
"0.5272589",
"0.52718353",
"0.5271499",
"0.526971",
"0.5263168",
"0.52570385",
"0.5250612",
"0.5241942",
"0.52353877",
"0.5234592",
"0.5233888",
"0.52278924",
"0.52277917",
"0.52274853",
"0.52236825",
"0.52236825",
"0.52236825",
"0.52236825",
"0.5222313",
"0.52182704",
"0.5216375",
"0.5213862",
"0.52084243",
"0.52084076",
"0.5208054",
"0.5204459",
"0.5200376",
"0.5200353",
"0.51924646",
"0.51893723",
"0.51873535",
"0.51863164",
"0.5175004",
"0.5171855",
"0.5171855",
"0.51685244",
"0.51664156",
"0.5164491",
"0.51638913",
"0.516207",
"0.5160722",
"0.5160283",
"0.5160283"
] | 0.67717105 | 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.